|
|
@ -562,30 +562,99 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} |
|
|
|
formType.value = type |
|
|
|
if (row) { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
data.value.version = String(data.value.version) |
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
console.log(row) |
|
|
|
// 如果点击复制进入 |
|
|
|
if(formType.value == 'create'){ |
|
|
|
data.value ={ |
|
|
|
code: '', |
|
|
|
description:row.description, |
|
|
|
version:String(row.version), |
|
|
|
dynamicUpdateCode:row.dynamicUpdateCode, |
|
|
|
dynamicUpdateName:row.dynamicUpdateName, |
|
|
|
process: [] |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) |
|
|
|
let arr = [] |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
console.log(item.inspectionCharacteristicsBaseVO) |
|
|
|
|
|
|
|
let obj = { |
|
|
|
description:item.description, |
|
|
|
inspectionCharCode:item.inspectionCharCode, |
|
|
|
inspectionCode:item.inspectionCode, |
|
|
|
sequenceCode:item.sequenceCode, |
|
|
|
name : index + 1, |
|
|
|
inspectionCharacteristicsBaseVO:{ |
|
|
|
description:item.inspectionCharacteristicsBaseVO.description, |
|
|
|
featureType:item.inspectionCharacteristicsBaseVO.featureType, |
|
|
|
inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode, |
|
|
|
inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName, |
|
|
|
isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate, |
|
|
|
isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection, |
|
|
|
quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping, |
|
|
|
quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal, |
|
|
|
quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping, |
|
|
|
quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, |
|
|
|
quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget, |
|
|
|
quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit, |
|
|
|
quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, |
|
|
|
quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, |
|
|
|
quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget, |
|
|
|
quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom, |
|
|
|
resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|
|
|
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
arr.push(obj) |
|
|
|
}) |
|
|
|
data.value.process = arr |
|
|
|
}else{ |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
data.value.version = String(data.value.version) |
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
data.value = { |
|
|
|
code: '', |
|
|
@ -643,7 +712,6 @@ const buttonBaseClick1 = (val) => { |
|
|
|
sequenceCode: '', |
|
|
|
inspectionCharCode: '', |
|
|
|
inspectionCharacteristicsBaseVO: { |
|
|
|
describe: '', |
|
|
|
inspectionMethodCode: '', |
|
|
|
samplingProcessCode: '', |
|
|
|
isCanUpdate: '', |
|
|
|