|
|
@ -13,9 +13,9 @@ |
|
|
|
<el-step title="质量通知" /> |
|
|
|
<el-step title="质量物料批次" /> |
|
|
|
</el-steps> |
|
|
|
<NotaicType v-show="active == 0" ref="notaicTypeFrom" :data='data' /> |
|
|
|
<NotaicType v-show="active == 0" ref="notaicTypeFrom" :data='data' :disabled='disabled'/> |
|
|
|
<qualityNotice v-show="active == 1" ref="qualityNoticeFrom" :data='data' :type="notaicTypeFrom?.type||1"/> |
|
|
|
<qualityBatch v-show="active == 2" ref="qualityBatchFrom" :subListData='data.subList'/> |
|
|
|
<qualityBatch v-show="active == 2" ref="qualityBatchFrom" :subListData='data.subList' :number='data.number'/> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<el-button @click="prov" type="primary" v-if="active != 0">上一步</el-button> |
|
|
@ -126,7 +126,7 @@ if (props.basicFormWidth) { |
|
|
|
const rules = ref({ |
|
|
|
...props.rules |
|
|
|
}) |
|
|
|
|
|
|
|
const disabled = ref(false) |
|
|
|
/** 打开弹窗 */ |
|
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
|
if (titleName) { |
|
|
@ -134,6 +134,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} else { |
|
|
|
dialogTitle.value = t('action.' + type) |
|
|
|
} |
|
|
|
// 详情设置不可输入 |
|
|
|
disabled.value=false |
|
|
|
if(type == 'detail'){ |
|
|
|
disabled.value = true |
|
|
|
} |
|
|
|
formType.value = type |
|
|
|
active.value =0 |
|
|
|
if (row) { |
|
|
@ -195,7 +200,6 @@ const submitForm = async () => { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(data.value) |
|
|
|
data.value.subList = qualityBatchFrom.value.subList |
|
|
|
if(data.value.subList.length==0){ |
|
|
|
message.error('请填写质量物料批次') |
|
|
@ -310,50 +314,7 @@ const opensearchTable = ( |
|
|
|
// 弹层确定返回所选数据 |
|
|
|
// val : 弹层列表row 数据 |
|
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (type == 'features') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code |
|
|
|
if (formField == 'inspectionMethodCode') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description |
|
|
|
} else if (formField == 'dynamicUpdateCode') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description |
|
|
|
} else if (formField == 'inspectionMethod') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description |
|
|
|
} |
|
|
|
} else if (type == 'main') { |
|
|
|
data.value[formField] = val[0].code |
|
|
|
if (formField == 'itemCode') { |
|
|
|
data.value.itemName = val[0].name |
|
|
|
} else if (formField == 'testTypeCode') { |
|
|
|
data.value.testTypeName = val[0].description |
|
|
|
} else if (formField == 'programmeTemplateCode') { |
|
|
|
data.value.programmeTemplateName = val[0].description |
|
|
|
} |
|
|
|
if (formField == 'programmeTemplateCode') { |
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = |
|
|
|
false |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.subList = list |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
} |
|
|
@ -362,6 +323,7 @@ const next = () => { |
|
|
|
if (active.value == 2) return |
|
|
|
if (active.value == 0) { |
|
|
|
if (notaicTypeFrom.value.type == 1) { |
|
|
|
if(!props.disabled){ |
|
|
|
notaicTypeFrom.value.formRef1.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
active.value++ |
|
|
@ -370,7 +332,9 @@ const next = () => { |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} else if (notaicTypeFrom.value.type == 2) { |
|
|
|
if(!props.disabled){ |
|
|
|
notaicTypeFrom.value.formRef2.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
active.value++ |
|
|
@ -378,7 +342,9 @@ const next = () => { |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} else if (notaicTypeFrom.value.type == 3) { |
|
|
|
if(!props.disabled){ |
|
|
|
notaicTypeFrom.value.formRef3.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
active.value++ |
|
|
@ -388,7 +354,9 @@ const next = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}else if (active.value == 1) { |
|
|
|
if(!props.disabled){ |
|
|
|
qualityNoticeFrom.value.formRef.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
// 要求开始时间应小于要求结束时间 |
|
|
@ -415,6 +383,7 @@ const next = () => { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 上一步 |
|
|
|
const prov = () => { |
|
|
|
if (active.value == 0) return |
|
|
|