|
@ -537,8 +537,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
formType.value = type |
|
|
formType.value = type |
|
|
if (row) { |
|
|
if (row) { |
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
console.log(data.value)// 发起承接 |
|
|
// console.log(data.value)// 发起承接 |
|
|
await InspectionJobMainApi.acceptInspectionJobMain(row.id) |
|
|
// await InspectionJobMainApi.acceptInspectionJobMain(row.id) |
|
|
let list = [] |
|
|
let list = [] |
|
|
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) |
|
|
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) |
|
|
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) |
|
|
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) |
|
@ -700,7 +700,7 @@ const buttonBaseClick =async(val) => { |
|
|
} |
|
|
} |
|
|
// 关闭 |
|
|
// 关闭 |
|
|
else if (val == 'close') { |
|
|
else if (val == 'close') { |
|
|
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) |
|
|
// await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -751,6 +751,7 @@ const submitForm = async () => { |
|
|
let arrBol = [] |
|
|
let arrBol = [] |
|
|
let isOutweigh = []//结束时间是否大于开始时间 |
|
|
let isOutweigh = []//结束时间是否大于开始时间 |
|
|
let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 |
|
|
let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 |
|
|
|
|
|
let parseFloatList = []//判断合格数量和不合格数量是否是整数 |
|
|
data.value.subList.forEach((item, index) => { |
|
|
data.value.subList.forEach((item, index) => { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
arrBol.push( |
|
|
arrBol.push( |
|
@ -761,15 +762,6 @@ const submitForm = async () => { |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
// if (item.samplingProcessRespVO.evaluationMode == 1) { |
|
|
|
|
|
// arrBol.push( |
|
|
|
|
|
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
// (cur, key) => { |
|
|
|
|
|
// return !cur.estimateCode |
|
|
|
|
|
// } |
|
|
|
|
|
// ) |
|
|
|
|
|
// ) |
|
|
|
|
|
// } |
|
|
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { |
|
|
arrBol.push( |
|
|
arrBol.push( |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
@ -792,12 +784,20 @@ const submitForm = async () => { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { |
|
|
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) |
|
|
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) |
|
|
} |
|
|
} |
|
|
// 合格数量和不合格数量之和不等于总数量 |
|
|
// 合格数量和不合格数量之和不能是小数 |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
|
|
|
parseFloatList.push( |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
(cur, key) => { |
|
|
|
|
|
return String(cur.qualifiedQuantity).indexOf('.')>-1 || String(cur.unqualifiedQuantity).indexOf('.')>-1 |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
) |
|
|
|
|
|
// 合格数量和不合格数量之和不等于总数量 |
|
|
numberList.push( |
|
|
numberList.push( |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
(cur, key) => { |
|
|
(cur, key) => { |
|
|
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount |
|
|
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty) |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
@ -805,6 +805,7 @@ const submitForm = async () => { |
|
|
}) |
|
|
}) |
|
|
let isEmpty1 = arrBol.some(item=>item == true) |
|
|
let isEmpty1 = arrBol.some(item=>item == true) |
|
|
let isEmptyNumberList = numberList.some(item=>item == true) |
|
|
let isEmptyNumberList = numberList.some(item=>item == true) |
|
|
|
|
|
let isParseFloat = parseFloatList.some(item=>item == true) |
|
|
if(isEmpty1){ |
|
|
if(isEmpty1){ |
|
|
message.error('检验工序和检验特性有字段未填写完全') |
|
|
message.error('检验工序和检验特性有字段未填写完全') |
|
|
return; |
|
|
return; |
|
@ -813,9 +814,12 @@ const submitForm = async () => { |
|
|
message.error('检验特性中有开始时间大于结束时间') |
|
|
message.error('检验特性中有开始时间大于结束时间') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
console.log(44,numberList) |
|
|
if(isParseFloat){ |
|
|
|
|
|
message.error('合格数量和不合格数量之和不可以是小数') |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if(isEmptyNumberList){ |
|
|
if(isEmptyNumberList){ |
|
|
message.error('合格数量和不合格数量之和不等于总数量') |
|
|
message.error('合格数量和不合格数量之和不等于检验数') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (formType.value == 'create') { |
|
|
if (formType.value == 'create') { |
|
|