|
@@ -427,9 +427,9 @@
|
|
|
this.$message.warning('合格重量加不合格重量不能大于任务重量');
|
|
this.$message.warning('合格重量加不合格重量不能大于任务重量');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 计算数量:本次报工+本次损耗 不能超过 要求完成数量 - 已报工 - 已损耗
|
|
|
|
|
|
|
+ // 计算数量:本次报工+本次损耗 不能超过 任务数量 - 已报工 - 已损耗
|
|
|
calculateQuantity(type) {
|
|
calculateQuantity(type) {
|
|
|
- const req = Number(this.current.formingNum) || 0;
|
|
|
|
|
|
|
+ const req = Number(this.current.quantity) || 0;
|
|
|
const done = this.add(this.reportNum, this.lossNum);
|
|
const done = this.add(this.reportNum, this.lossNum);
|
|
|
const remaining = this.sub(req, done);
|
|
const remaining = this.sub(req, done);
|
|
|
const curRep = Number(this.form.reportQuantity) || 0;
|
|
const curRep = Number(this.form.reportQuantity) || 0;
|
|
@@ -438,7 +438,7 @@
|
|
|
if (curTotal > remaining) {
|
|
if (curTotal > remaining) {
|
|
|
this.form[type] = '';
|
|
this.form[type] = '';
|
|
|
this.$message.warning(
|
|
this.$message.warning(
|
|
|
- `本次报工数与损耗数之和不能超过剩余可报数量(剩余 ${remaining})`
|
|
|
|
|
|
|
+ `本次报工数与损耗数之和不能超过任务剩余可报数量(剩余 ${remaining})`
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -505,7 +505,7 @@
|
|
|
submitAdd() {
|
|
submitAdd() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
|
- const req = Number(this.current.formingNum) || 0;
|
|
|
|
|
|
|
+ const req = Number(this.current.quantity) || 0;
|
|
|
const done = this.add(this.reportNum, this.lossNum);
|
|
const done = this.add(this.reportNum, this.lossNum);
|
|
|
const remaining = this.sub(req, done);
|
|
const remaining = this.sub(req, done);
|
|
|
const curRep = Number(this.form.reportQuantity) || 0;
|
|
const curRep = Number(this.form.reportQuantity) || 0;
|
|
@@ -513,7 +513,7 @@
|
|
|
const curTotal = this.add(curRep, curLoss);
|
|
const curTotal = this.add(curRep, curLoss);
|
|
|
if (curTotal > remaining) {
|
|
if (curTotal > remaining) {
|
|
|
return this.$message.warning(
|
|
return this.$message.warning(
|
|
|
- `本次报工数与损耗数之和不能超过剩余数量(剩余 ${remaining})`
|
|
|
|
|
|
|
+ `本次报工数与损耗数之和不能超过任务剩余可报数量(剩余 ${remaining})`
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
// if (
|
|
// if (
|