|
|
@ -357,7 +357,6 @@ |
|
|
|
allSamplePieceSize.value = 0//打开时候归0 |
|
|
|
if (row) { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
// console.log(data.value)// 发起承接 |
|
|
|
// await InspectionJobMainApi.acceptInspectionJobMain(row.id) |
|
|
|
let list = [] |
|
|
|
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) |
|
|
@ -421,7 +420,6 @@ |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(22, allSamplePieceSize.value) |
|
|
|
data.value.subList = list |
|
|
|
/** |
|
|
|
设置采样数量,默认第一个包装采样数量<总数量,显示数量字段,第二个包装和剩下的总数量对比,以此类推, |
|
|
@ -526,12 +524,10 @@ |
|
|
|
quantifyQuantifyCode: '' |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(data.value.subList) |
|
|
|
|
|
|
|
editableTabsValue.value = newTabName |
|
|
|
dialogVisibleName.value = false |
|
|
|
} else { |
|
|
|
console.log('error submit!') |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
@ -559,7 +555,6 @@ |
|
|
|
// 传递给父类 |
|
|
|
const emit = defineEmits(['submitForm', 'searchTableSuccess']) |
|
|
|
const validateForm = (formRef) => { |
|
|
|
// console.log(TableBaseForm_Ref.value) |
|
|
|
let _lists = formRef?.map((v) => v.validate()) |
|
|
|
return Promise.all(_lists) |
|
|
|
.then(() => { |
|
|
@ -572,7 +567,6 @@ |
|
|
|
const tableFormRef = ref() |
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
console.log(data.value.subList) |
|
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
@ -580,7 +574,6 @@ |
|
|
|
if (!valid) return |
|
|
|
// 校验包装列表 |
|
|
|
|
|
|
|
console.log(11, data.value.packageList) |
|
|
|
if (data.value.packageList?.length > 0) { |
|
|
|
const validateForm1 = await tableFormRef.value.validateForm() |
|
|
|
if (!validateForm1) return |
|
|
@ -611,11 +604,14 @@ |
|
|
|
let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 |
|
|
|
let parseFloatList = []//判断合格数量和不合格数量是否是整数 |
|
|
|
data.value.subList.forEach((item, index) => { |
|
|
|
|
|
|
|
console.log("woxianlai") |
|
|
|
console.log(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
|
arrBol.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
|
return cur.qualifiedQuantity==='' || cur.unqualifiedQuantity==='' |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
@ -655,15 +651,14 @@ |
|
|
|
numberList.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
console.log(12, cur.qualifiedQuantity) |
|
|
|
console.log(13, cur.unqualifiedQuantity) |
|
|
|
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) |
|
|
|
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log("wolaile") |
|
|
|
console.log(arrBol) |
|
|
|
let isEmpty1 = arrBol.some(item => item == true) |
|
|
|
let isEmptyNumberList = numberList.some(item => item == true) |
|
|
|
let isParseFloat = parseFloatList.some(item => item == true) |
|
|
@ -691,13 +686,11 @@ |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|
} |
|
|
|
} catch { |
|
|
|
console.log(111) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const staging = async () => { |
|
|
|
try { |
|
|
|
console.log(data.value.subList) |
|
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
@ -705,7 +698,6 @@ |
|
|
|
if (!valid) return |
|
|
|
// 校验包装列表 |
|
|
|
|
|
|
|
console.log(11, data.value.packageList) |
|
|
|
if (data.value.packageList?.length > 0) { |
|
|
|
const validateForm1 = await tableFormRef.value.validateForm() |
|
|
|
if (!validateForm1) return |
|
|
@ -780,9 +772,6 @@ |
|
|
|
numberList.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
console.log(12, cur.qualifiedQuantity) |
|
|
|
console.log(13, cur.unqualifiedQuantity) |
|
|
|
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) |
|
|
|
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) |
|
|
|
} |
|
|
|
) |
|
|
@ -811,7 +800,6 @@ |
|
|
|
await InspectionJobMainApi.stagingInspectionJobMain(data.value); |
|
|
|
message.success("暂存成功") |
|
|
|
} catch { |
|
|
|
console.log(111) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -828,7 +816,6 @@ |
|
|
|
} |
|
|
|
// 选择特征类型 |
|
|
|
const changeFeatureType = (e) => { |
|
|
|
console.log(e) |
|
|
|
// if (e) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true |
|
|
|
// } else { |
|
|
@ -986,12 +973,10 @@ |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
|
} |
|
|
|
// 选择选定级 |
|
|
|
const changeQualitativeCode = (e, item, cur) => { |
|
|
|
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e) |
|
|
|
console.log(obj) |
|
|
|
cur.defectLevel = obj.defectLevel |
|
|
|
cur.estimateCode = obj.estimateCode |
|
|
|
} |
|
|
|