|
|
@ -28,7 +28,7 @@ |
|
|
|
:stretch="false" |
|
|
|
> |
|
|
|
<el-tab-pane |
|
|
|
v-for="item in data.subList" |
|
|
|
v-for="(item,index) in data.subList" |
|
|
|
:key="item.name" |
|
|
|
:label="item.processCode" |
|
|
|
:name="item.name" |
|
|
@ -116,7 +116,7 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<!-- <el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="动态修改规则编码" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode" |
|
|
@ -129,7 +129,7 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> --> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="是否允许修改特征值" |
|
|
@ -179,12 +179,35 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,key) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="key"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"> |
|
|
|
<el-date-picker |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
|
type="datetime" |
|
|
|
placeholder="请选择开始时间" |
|
|
|
style="width: 100%" |
|
|
|
value-format="x" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"> |
|
|
|
<el-date-picker |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
|
type="datetime" |
|
|
|
placeholder="请选择结束时间" |
|
|
|
style="width: 100%" |
|
|
|
value-format="x" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,i) in data.subList[index].inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"> |
|
|
|
<el-row> |
|
|
|
<!-- 汇总录入的时候显示 --> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
|
<el-form-item label="合格数量" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> |
|
|
|
<el-form-item label="合格数量"> |
|
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
@ -410,58 +433,17 @@ const rules = ref({ |
|
|
|
{ required: true, message: '请输入小数位', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ |
|
|
|
{ required: true, message: '请输入选择集编码', trigger: 'blur' } |
|
|
|
] |
|
|
|
{ required: true, message: '请输入选择集编码', trigger: 'change' } |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [ |
|
|
|
{ required: true, message: '请输入选择开始时间', trigger: 'change'} |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ |
|
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
// const rules = ref({ |
|
|
|
// itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }], |
|
|
|
// version: [{ required: true, message: '请填写版本', trigger: 'blur' }], |
|
|
|
// testTypeCode: [{ required: true, message: '请选择检验类型编码', trigger: ['blur', 'change'] }], |
|
|
|
// programmeTemplateCode: [ |
|
|
|
// { required: true, message: '请选择检验模板编码', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change'] }], |
|
|
|
// aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }], |
|
|
|
// inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], |
|
|
|
// effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change'] }], |
|
|
|
// expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change'] }], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
// { required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ |
|
|
|
// { required: true, message: '请选择检验方法编码', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [ |
|
|
|
// { required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [ |
|
|
|
// { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [ |
|
|
|
// { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.featureType': [ |
|
|
|
// { required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [ |
|
|
|
// { required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [ |
|
|
|
// { required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [ |
|
|
|
// { required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [ |
|
|
|
// { required: true, message: '请选择计量单位', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [ |
|
|
|
// { required: true, message: '请输入小数位', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ |
|
|
|
// { required: true, message: '请输入选择集编码', trigger: 'blur' } |
|
|
|
// ] |
|
|
|
// }) |
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
|
let tabIndex = 1 |
|
|
@ -647,9 +629,36 @@ const validateForm = (formRef) => { |
|
|
|
|
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
const validateForm1 = await validateForm(formProcessRef.value) |
|
|
|
// console.log(validateForm1) |
|
|
|
// await formMainRef.value.validate() |
|
|
|
|
|
|
|
console.log(data.value.subList) |
|
|
|
// const validateForm1 = await validateForm(formMainRef.value) |
|
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
|
const valid = await elForm.validate() |
|
|
|
if (!valid) return |
|
|
|
// const bol1 = await validateForm(formProcessRef.value) |
|
|
|
// const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
// console.log(bol2) |
|
|
|
// if (!bol2) { |
|
|
|
// message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
|
let arrBol = data.value.subList.map((item, index) => { |
|
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){ |
|
|
|
return item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(arrBol) |
|
|
|
let isEmpty1 = arrBol.some(item=>item== true) |
|
|
|
if (isEmpty1) { |
|
|
|
proxy.$modal.msgError("请填写完整信息"); |
|
|
|
return; |
|
|
|
} |
|
|
|
return |
|
|
|
// if (!data.value.process || data.value.process.length == 0) { |
|
|
|
// message.error(`请添加工序`) |
|
|
|
// return |
|
|
|