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