|
@ -13,9 +13,9 @@ |
|
|
<el-step title="质量通知" /> |
|
|
<el-step title="质量通知" /> |
|
|
<el-step title="质量物料批次" /> |
|
|
<el-step title="质量物料批次" /> |
|
|
</el-steps> |
|
|
</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"/> |
|
|
<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> |
|
|
</div> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<el-button @click="prov" type="primary" v-if="active != 0">上一步</el-button> |
|
|
<el-button @click="prov" type="primary" v-if="active != 0">上一步</el-button> |
|
@ -126,7 +126,7 @@ if (props.basicFormWidth) { |
|
|
const rules = ref({ |
|
|
const rules = ref({ |
|
|
...props.rules |
|
|
...props.rules |
|
|
}) |
|
|
}) |
|
|
|
|
|
const disabled = ref(false) |
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
if (titleName) { |
|
|
if (titleName) { |
|
@ -134,6 +134,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
} else { |
|
|
} else { |
|
|
dialogTitle.value = t('action.' + type) |
|
|
dialogTitle.value = t('action.' + type) |
|
|
} |
|
|
} |
|
|
|
|
|
// 详情设置不可输入 |
|
|
|
|
|
disabled.value=false |
|
|
|
|
|
if(type == 'detail'){ |
|
|
|
|
|
disabled.value = true |
|
|
|
|
|
} |
|
|
formType.value = type |
|
|
formType.value = type |
|
|
active.value =0 |
|
|
active.value =0 |
|
|
if (row) { |
|
|
if (row) { |
|
@ -195,7 +200,6 @@ const submitForm = async () => { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log(data.value) |
|
|
|
|
|
data.value.subList = qualityBatchFrom.value.subList |
|
|
data.value.subList = qualityBatchFrom.value.subList |
|
|
if(data.value.subList.length==0){ |
|
|
if(data.value.subList.length==0){ |
|
|
message.error('请填写质量物料批次') |
|
|
message.error('请填写质量物料批次') |
|
@ -310,50 +314,7 @@ const opensearchTable = ( |
|
|
// 弹层确定返回所选数据 |
|
|
// 弹层确定返回所选数据 |
|
|
// val : 弹层列表row 数据 |
|
|
// val : 弹层列表row 数据 |
|
|
const searchTableSuccess = async (formField, searchField, val, type, 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) |
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
} |
|
|
} |
|
@ -362,6 +323,7 @@ const next = () => { |
|
|
if (active.value == 2) return |
|
|
if (active.value == 2) return |
|
|
if (active.value == 0) { |
|
|
if (active.value == 0) { |
|
|
if (notaicTypeFrom.value.type == 1) { |
|
|
if (notaicTypeFrom.value.type == 1) { |
|
|
|
|
|
if(!props.disabled){ |
|
|
notaicTypeFrom.value.formRef1.validate((valid) => { |
|
|
notaicTypeFrom.value.formRef1.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
active.value++ |
|
|
active.value++ |
|
@ -370,7 +332,9 @@ const next = () => { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
} else if (notaicTypeFrom.value.type == 2) { |
|
|
} else if (notaicTypeFrom.value.type == 2) { |
|
|
|
|
|
if(!props.disabled){ |
|
|
notaicTypeFrom.value.formRef2.validate((valid) => { |
|
|
notaicTypeFrom.value.formRef2.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
active.value++ |
|
|
active.value++ |
|
@ -378,7 +342,9 @@ const next = () => { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
} else if (notaicTypeFrom.value.type == 3) { |
|
|
} else if (notaicTypeFrom.value.type == 3) { |
|
|
|
|
|
if(!props.disabled){ |
|
|
notaicTypeFrom.value.formRef3.validate((valid) => { |
|
|
notaicTypeFrom.value.formRef3.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
active.value++ |
|
|
active.value++ |
|
@ -388,7 +354,9 @@ const next = () => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}else if (active.value == 1) { |
|
|
}else if (active.value == 1) { |
|
|
|
|
|
if(!props.disabled){ |
|
|
qualityNoticeFrom.value.formRef.validate((valid) => { |
|
|
qualityNoticeFrom.value.formRef.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
// 要求开始时间应小于要求结束时间 |
|
|
// 要求开始时间应小于要求结束时间 |
|
@ -415,6 +383,7 @@ const next = () => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
// 上一步 |
|
|
// 上一步 |
|
|
const prov = () => { |
|
|
const prov = () => { |
|
|
if (active.value == 0) return |
|
|
if (active.value == 0) return |
|
|