This commit is contained in:
zmj 2024-04-13 18:06:26 +08:00
parent 5b307e7193
commit ac1ddac17c
7 changed files with 39 additions and 21 deletions

View File

@ -129,7 +129,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="纳税人识别号" prop="taxpayer_identification_number">
<el-input v-model="formData.taxpayer_identification_number" clearable
<el-input v-model="formData.taxpayer_identification_number" clearable v-type="'code'"
placeholder="请输入纳税人识别号" />
</el-form-item>
@ -188,7 +188,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="邮寄单号" prop="mailing_no">
<el-input v-model="formData.mailing_no" clearable placeholder="请输入邮寄单号" />
<el-input v-model="formData.mailing_no" clearable placeholder="请输入邮寄单号" v-type="'code'" />
</el-form-item>
</el-col>
</el-row>

View File

@ -18,7 +18,7 @@
<el-input class="w-[220px]" v-model="person_name" clearable placeholder="请选择项目人员" />
</el-form-item> </el-col>
<el-col :span="8">
<el-form-item label="身份证号" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-form-item label="身份证号">
<el-input class="w-[220px]" v-model="idcard" clearable placeholder="系统自动填写" />
</el-form-item> </el-col>
<el-col :span="8">

View File

@ -86,7 +86,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="项目交付日期" prop="delivery_date"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }, { validator: checkDate, trigger: 'blur' }]">
<el-date-picker v-model="formData.delivery_date" clearable type="date"
value-format="YYYY-MM-DD " placeholder="选择项目交付日期" class="flex-1 !flex">
</el-date-picker>
@ -218,6 +218,19 @@ const formData = reactive({
})
const checkDate = (rule: any, value: any, callback: any) => {
if (new Date(formData.delivery_date) < new Date(formData.project_approval_date)) {
callback(new Error('项目交付日期不能早于立项日期'))
}
else if (new Date(formData.delivery_date) < new Date(formData.start_date)) {
callback(new Error('项目交付日期不能早于项目开始日期'))
}
else {
callback()
}
}
//
const formRules = reactive<any>({

View File

@ -54,8 +54,7 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['quality.quality_detection_temp/detail']" link
@click="handleDetail(row.id)">
<el-button v-perms="['quality.quality_detection_temp/detail']" link @click="handleDetail(row)">
详情
</el-button>
</template>
@ -133,11 +132,11 @@ const handleDelete = async (id: number | any[]) => {
}
//
const handleDetail = async (id: any) => {
let res = await qualitydetectiontempDetail({ id })
// let res = await qualitydetectiontempDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
detailRef.value?.setFormData(id)
}

View File

@ -30,6 +30,9 @@
<el-descriptions-item label="检查单位" label-align="left" align="left" label-class-name="my-label">
{{ formData.check_company }}
</el-descriptions-item>
<el-descriptions-item label="整改人" label-align="left" align="left" label-class-name="my-label">
{{ formData.modify_user }}
</el-descriptions-item>
<el-descriptions-item label="整改单位" label-align="left" align="left" label-class-name="my-label">
{{ formData.modify_company }}
</el-descriptions-item>
@ -45,9 +48,7 @@
<el-descriptions-item label="检查结果" label-align="left" align="left" label-class-name="my-label">
{{ formData.check_result }}
</el-descriptions-item>
<el-descriptions-item label="整改人" label-align="left" align="left" label-class-name="my-label">
{{ formData.modify_user }}
</el-descriptions-item>
</el-descriptions>
</popup>
</div>

View File

@ -65,6 +65,11 @@
<el-input v-model="formData.check_company" clearable placeholder="请输入检查单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="整改人" prop="modify_user">
<el-input v-model="formData.modify_user" clearable placeholder="请输入整改人" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -98,11 +103,6 @@
</el-col>
<el-col :span="8">
<el-form-item label="整改人" prop="modify_user">
<el-input v-model="formData.modify_user" clearable placeholder="请输入整改人" />
</el-form-item>
</el-col>
<!-- <el-col :span="24">

View File

@ -55,14 +55,12 @@
</el-col>
<el-col :span="24">
<el-form-item label="合格率(%)" prop="pass_rate">
<el-input-number v-model="formData.pass_rate" :min="0" :max="100" class="flex flex-1"
placeholder="偏差范围为0-100" />
<el-input v-model="formData.pass_rate" clearable placeholder="请输入" type="number" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="允许偏差" prop="deviation">
<el-input-number v-model="formData.deviation" :min="1" :max="200" class="flex flex-1"
placeholder="偏差范围为1-200" />
<el-form-item label="允许偏差" prop="deviation" :rules="[{ validator: checkNum, trigger: 'blur' }]">
<el-input v-model="formData.deviation" clearable placeholder="请输入" type="number" />
</el-form-item>
</el-col>
<el-col :span="24">
@ -140,6 +138,13 @@ const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑安全目标表' : '新增安全目标表'
})
const checkNum = (rules: any, value: any, callback: any) => {
(+value < 1 || +value > 200) ? callback(new Error("偏差范围为1-200"))
: callback();
}
//
const formData = reactive({
id: '',