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