|
@@ -785,7 +785,12 @@ export default {
|
|
|
this.initWebSocket();
|
|
|
}
|
|
|
},
|
|
|
- initWebSocket() {
|
|
|
+ async initWebSocket() {
|
|
|
+ // let res = await this.addIsValidate();
|
|
|
+ // if (!res) {
|
|
|
+ // this.$message.warning("请完善表单数据");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
const getConfigValue = (label, defaultValue) => {
|
|
|
let value = this.dict.type.automatic_printing.find(
|
|
|
(item) => item.label === label
|
|
@@ -892,7 +897,7 @@ export default {
|
|
|
},
|
|
|
// 开始设置新的重量
|
|
|
async setWeight(weight) {
|
|
|
- console.log("设置新的重量", weight);
|
|
|
+ // console.log("设置新的重量", weight);
|
|
|
let newData = {};
|
|
|
let {
|
|
|
machineTool,
|
|
@@ -1173,9 +1178,22 @@ export default {
|
|
|
? JSON.parse(JSON.stringify(newData))
|
|
|
: this.tableData[0];
|
|
|
console.log(rowData);
|
|
|
+ let timeStemp = new Date().getTime();
|
|
|
this.printTableData = [rowData];
|
|
|
+ this.printTableData[0].id = timeStemp;
|
|
|
+ // 先打印
|
|
|
+ this.changeGrossWeight(this.printTableData[0]);
|
|
|
+ // 后端打印
|
|
|
+ // await this.newPrintHandler();
|
|
|
+ // 前端打印
|
|
|
+ codeListPrint(this.printTableData, "printDom");
|
|
|
+ if (this.excuteType == 1) {
|
|
|
+ this.tableData.push(this.printTableData[0]);
|
|
|
+ }
|
|
|
+ // 后保存数据
|
|
|
let payLoad = {
|
|
|
...this.form,
|
|
|
+ id: timeStemp, //前端生成id
|
|
|
qrCodeId: rowData.qrCodeId,
|
|
|
qrCode: rowData.qrCode,
|
|
|
lotNum: rowData.lotNum,
|
|
@@ -1194,7 +1212,7 @@ export default {
|
|
|
let tempApiFun = productCodeList;
|
|
|
if (this.excuteType == 3 || this.excuteType == 2) {
|
|
|
//补码||修改
|
|
|
- this.printConfirmHandler(this.tableData[0].id);
|
|
|
+ // this.printConfirmHandler(this.tableData[0].id);
|
|
|
return;
|
|
|
}
|
|
|
this.changeGrossWeight(payLoad);
|
|
@@ -1207,9 +1225,8 @@ export default {
|
|
|
// return;
|
|
|
// }
|
|
|
// this.tableData[0].id = res.data;
|
|
|
- this.printTableData[0].id = res.data;
|
|
|
- console.log("printConfirmHandler");
|
|
|
- this.printConfirmHandler(res.data);
|
|
|
+ // this.printTableData[0].id = res.data;
|
|
|
+ // this.printConfirmHandler(res.data);
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
this.$message.error(`${msg}箱单失败`);
|