|
@@ -679,6 +679,7 @@
|
|
|
<el-input
|
|
|
v-model="form.grossWeight"
|
|
|
@input="changeGrossWeightForm"
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
size="mini"
|
|
|
clearable
|
|
|
></el-input>
|
|
@@ -976,12 +977,16 @@ export default {
|
|
|
this.count.sumCanisterNum += Number(item.canisterNum);
|
|
|
}
|
|
|
if (item.suttle) {
|
|
|
+ console.log(Number(item.suttle));
|
|
|
this.count.sumSuttle += Number(item.suttle);
|
|
|
}
|
|
|
if (item.grossWeight) {
|
|
|
this.count.sumGrossWeight += Number(item.grossWeight);
|
|
|
}
|
|
|
}
|
|
|
+ this.count.sumGrossWeight = this.count.sumGrossWeight.toFixed(2);
|
|
|
+ this.count.sumSuttle = this.count.sumSuttle.toFixed(2);
|
|
|
+ this.count.sumCanisterNum = this.count.sumCanisterNum.toFixed(2);
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
@@ -1074,6 +1079,7 @@ export default {
|
|
|
this.waiting = 0;
|
|
|
shouldPrint = false; // 打印后禁止下一次打印,直到重量再次变化
|
|
|
const isValidate = await this.validateAndPrint(weight);
|
|
|
+
|
|
|
console.log("isValidate", isValidate);
|
|
|
}
|
|
|
}
|
|
@@ -1101,6 +1107,8 @@ export default {
|
|
|
let isValidate = await this.addIsValidate();
|
|
|
if (isValidate) {
|
|
|
this.setWeight(weight);
|
|
|
+ } else {
|
|
|
+ this.$message.warning("请完善表单数据");
|
|
|
}
|
|
|
return isValidate;
|
|
|
},
|
|
@@ -1257,7 +1265,15 @@ export default {
|
|
|
changeGrossWeight(row) {
|
|
|
console.log(row);
|
|
|
let { boxWeight, grossWeight, canisterWeight, canisterNum } = row;
|
|
|
- if (!Number(grossWeight)) return;
|
|
|
+ if (!Number(grossWeight)) {
|
|
|
+ row.suttle = 0;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log(
|
|
|
+ Number(grossWeight),
|
|
|
+ Number(boxWeight),
|
|
|
+ Number(canisterWeight) * Number(canisterNum)
|
|
|
+ );
|
|
|
row.suttle = (
|
|
|
Number(grossWeight) -
|
|
|
Number(boxWeight) -
|
|
@@ -1318,14 +1334,14 @@ export default {
|
|
|
});
|
|
|
this.changeGrossWeight(this.printTableData[0]);
|
|
|
// 前端打印
|
|
|
- codeListPrint(this.printTableData, "printDom");
|
|
|
+ // codeListPrint(this.printTableData, "printDom");
|
|
|
|
|
|
- if (this.excuteType == 1) {
|
|
|
- this.tableData.push(this.printTableData[0]);
|
|
|
- }
|
|
|
+ // if (this.excuteType == 1) {
|
|
|
+ // this.tableData.push(this.printTableData[0]);
|
|
|
+ // }
|
|
|
// 后端打印
|
|
|
// console.log("newPrintHandler");
|
|
|
- // this.newPrintHandler();
|
|
|
+ this.newPrintHandler();
|
|
|
},
|
|
|
// 获取机台选项数据
|
|
|
async getLineOptionLsit() {
|