feat(waterPv): 修复注水业绩动态字段不选时请求也会携带该字段的问题

This commit is contained in:
woody 2025-05-16 09:29:59 +08:00
parent 0b870c8489
commit af8ea2b77b
1 changed files with 14 additions and 2 deletions

View File

@ -814,7 +814,7 @@ export default {
}
} else {
this.$message({
message: '请先填写注水业绩',
message: '请先选择注水方式',
type: 'warning'
})
this.waterPvList.forEach((ele, index) => {
@ -974,6 +974,7 @@ export default {
// this.$router.go(-1);
} else if (index == 2 || index == 4) {
//
spe
.saveInfusingWater({
infusingWaterType: this.form.infusingWaterType,
@ -996,10 +997,21 @@ export default {
}
})
} else {
const unSelectedField = this.waterTypeList.filter((item) =>
!this.form.waterTypeList.includes(item.value)
).map(item => item.field)
const waterPvList = this.waterPvList.map(item => {
const newItem = { ...item }
unSelectedField.forEach(field => {
delete newItem[field]
})
return newItem
})
spe
.saveInfusingWater({
infusingWaterType: this.form.infusingWaterType,
cmalvList: this.waterPvList,
cmalvList: waterPvList,
processType: index
})
.then((res) => {