|
|
@ -515,11 +515,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for (let i = 0; i < data.value.sampleTotalAmount; i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -530,17 +530,17 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [ |
|
|
|
{ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
|
estimateCode: '', //评估代码 |
|
|
|
defectLevel: '', //缺陷级别 |
|
|
|
qualifiedQuantity: '', //合格数量 |
|
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
|
} |
|
|
|
] |
|
|
|
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
// inspectionValue: '', //检验值 |
|
|
|
// qualitativeCode: '', //定性字典项值 |
|
|
|
// estimateCode: '', //评估代码 |
|
|
|
// defectLevel: '', //缺陷级别 |
|
|
|
// qualifiedQuantity: '', //合格数量 |
|
|
|
// unqualifiedQuantity: '' //不合格数量 |
|
|
|
// } |
|
|
|
// ) |
|
|
|
} |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
@ -700,10 +700,11 @@ const submitForm = async () => { |
|
|
|
return |
|
|
|
} |
|
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
|
let arrBol = data.value.subList.map((item, index) => { |
|
|
|
let arr1 = [] |
|
|
|
let arrBol = [] |
|
|
|
let isOutweigh = []//结束时间是否大于开始时间 |
|
|
|
data.value.subList.forEach((item, index) => { |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
|
arr1.push( |
|
|
|
arrBol.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
@ -712,7 +713,7 @@ const submitForm = async () => { |
|
|
|
) |
|
|
|
} |
|
|
|
if (item.samplingProcessRespVO.evaluationMode == 1) { |
|
|
|
arr1.push( |
|
|
|
arrBol.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.estimateCode || !cur.defectLevel |
|
|
@ -721,7 +722,7 @@ const submitForm = async () => { |
|
|
|
) |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { |
|
|
|
arr1.push( |
|
|
|
arrBol.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.inspectionValue |
|
|
@ -730,7 +731,7 @@ const submitForm = async () => { |
|
|
|
) |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) { |
|
|
|
arr1.push( |
|
|
|
arrBol.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.qualitativeCode |
|
|
@ -738,17 +739,21 @@ const submitForm = async () => { |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
return arr1 |
|
|
|
// 开始时间大于结束时间放入数组中 |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { |
|
|
|
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) |
|
|
|
} |
|
|
|
}) |
|
|
|
// console.log(arrBol) |
|
|
|
// let isEmpty1 = arrBol.filter(item=>item == true) |
|
|
|
// arrBol.forEach(item=>{ |
|
|
|
// console.log('1q1q') |
|
|
|
// console.log(typeof item) |
|
|
|
// }) |
|
|
|
// setTimeout(()=>{ |
|
|
|
// console.log(arrBol.includes(true)) |
|
|
|
// },2000) |
|
|
|
let isEmpty1 = arrBol.some(item=>item == true) |
|
|
|
if(isEmpty1){ |
|
|
|
message.error('检验工序和检验特性有字段未填写完全') |
|
|
|
return; |
|
|
|
} |
|
|
|
if(isOutweigh.length>0){ |
|
|
|
message.error('检验特性中有开始时间大于结束时间') |
|
|
|
return; |
|
|
|
} |
|
|
|
return; |
|
|
|
if (formType.value == 'create') { |
|
|
|
// 主子表——提交请求 |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|