|
@@ -332,7 +332,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量" align="center" prop="num" width="220">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number v-model="monthSaleGoalDetailsList[scope.$index].num" :min="0"></el-input-number>
|
|
|
+ <el-input-number v-model="monthSaleGoalDetailsList[scope.$index].num" :min="0"
|
|
|
+ @change="calculate(scope.row)"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="月份" align="center" width="250" :render-header="addRedStar">
|
|
@@ -679,6 +680,7 @@
|
|
|
label: '近一年'
|
|
|
}],
|
|
|
materialRange: '',
|
|
|
+ text: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -870,7 +872,7 @@
|
|
|
this.monthSaleGoalDetailsList[i].creator = this.form.creator;
|
|
|
}
|
|
|
if (this.justiceDetailsList()) {
|
|
|
- return this.$message.error('子表有必填字段未填,或者目标值为0')
|
|
|
+ return this.$message.error('子表中第' + this.text + '行有必填字段未填,或者目标值为0')
|
|
|
}
|
|
|
for (let i = 0; i < this.monthSaleGoalDetailsList.length; i++) {
|
|
|
for (let j = i + 1; j < this.monthSaleGoalDetailsList.length; j++) {
|
|
@@ -996,7 +998,9 @@
|
|
|
]
|
|
|
},
|
|
|
justiceDetailsList() {
|
|
|
+ this.text = ' ';
|
|
|
let isFlag = [];
|
|
|
+ let count = 1;
|
|
|
const arr = JSON.parse(JSON.stringify(this.monthSaleGoalDetailsList))
|
|
|
for (const element of arr) {
|
|
|
const flag1 = (element.saleOrg !== null) && (element.saleZone !== null) && (element.custom !== null) && (
|
|
@@ -1008,8 +1012,10 @@
|
|
|
if (flag1 && flag2) {
|
|
|
isFlag.push(true);
|
|
|
} else {
|
|
|
+ this.text += '[' + count + '] ';
|
|
|
isFlag.push(false);
|
|
|
}
|
|
|
+ count++;
|
|
|
}
|
|
|
for (const flag of isFlag) {
|
|
|
if (!flag) {
|
|
@@ -1225,6 +1231,9 @@
|
|
|
}).finally((e) => {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
+ },
|
|
|
+ calculate(row) {
|
|
|
+ row.goalValue = row.num * row.price;
|
|
|
}
|
|
|
}
|
|
|
}
|