|
@@ -59,7 +59,7 @@
|
|
</div>
|
|
</div>
|
|
<el-button
|
|
<el-button
|
|
:disabled="tableData.length == 0"
|
|
:disabled="tableData.length == 0"
|
|
- type="primary"
|
|
|
|
|
|
+ type="danger"
|
|
plain
|
|
plain
|
|
size="mini"
|
|
size="mini"
|
|
@click="summeryPrintHandler"
|
|
@click="summeryPrintHandler"
|
|
@@ -99,7 +99,10 @@
|
|
width="50"
|
|
width="50"
|
|
label="序号"
|
|
label="序号"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column prop="machineTool" label="机台"></el-table-column>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="productionLineNo"
|
|
|
|
+ label="机台"
|
|
|
|
+ ></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="boxNum"
|
|
prop="boxNum"
|
|
:label="`${tempStr}号`"
|
|
:label="`${tempStr}号`"
|
|
@@ -771,16 +774,21 @@ export default {
|
|
sumObj.productName = this.currentRow.productName;
|
|
sumObj.productName = this.currentRow.productName;
|
|
sumObj.lotNum = this.currentRow.lotNum;
|
|
sumObj.lotNum = this.currentRow.lotNum;
|
|
sumObj.productColor = this.currentRow.productColor;
|
|
sumObj.productColor = this.currentRow.productColor;
|
|
- sumObj.productColur = this.currentRow.productColor;
|
|
|
|
|
|
+ sumObj.productColour = this.currentRow.productColor;
|
|
sumObj.saleProductId = this.currentRow.id;
|
|
sumObj.saleProductId = this.currentRow.id;
|
|
sumObj.productSpecifications = this.currentRow.productSpecifications;
|
|
sumObj.productSpecifications = this.currentRow.productSpecifications;
|
|
|
|
+ sumObj.directionOfTwistLabel =
|
|
|
|
+ this.dict.type.direction_of_twist.find(
|
|
|
|
+ (item) => item.value == this.currentRow.directionOfTwist
|
|
|
|
+ )?.label || " "; //捻向
|
|
|
|
|
|
Object.assign(firstRowData, sumObj);
|
|
Object.assign(firstRowData, sumObj);
|
|
// let timeStemp = new Date().getTime();
|
|
// let timeStemp = new Date().getTime();
|
|
firstRowData.id = this.summertId;
|
|
firstRowData.id = this.summertId;
|
|
firstRowData.otherStates = 1;
|
|
firstRowData.otherStates = 1;
|
|
firstRowData.printFormat = "6"; //打印类型为总码单
|
|
firstRowData.printFormat = "6"; //打印类型为总码单
|
|
- firstRowData.boxSumNum = this.tableData.length; //箱子总数
|
|
|
|
|
|
+ // firstRowData.boxSumNum = this.tableData.length; //箱子总数
|
|
|
|
+ firstRowData.boxNum = this.tableData.length; //箱子总数
|
|
firstRowData.machineToolNo = this.lineOptions.find(
|
|
firstRowData.machineToolNo = this.lineOptions.find(
|
|
(item) => item.id == this.form.machineTool
|
|
(item) => item.id == this.form.machineTool
|
|
).productionLineNo;
|
|
).productionLineNo;
|
|
@@ -826,7 +834,15 @@ export default {
|
|
let res = await listBySaleProductID(payload);
|
|
let res = await listBySaleProductID(payload);
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
console.log(res);
|
|
console.log(res);
|
|
- this.tableData = res.rows;
|
|
|
|
|
|
+ this.tableData = res.rows.map((item) => {
|
|
|
|
+ let productionLineNo = this.lineOptions.find(
|
|
|
|
+ (i) => i.id == item.machineTool
|
|
|
|
+ )?.productionLineNo;
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ productionLineNo,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
|
|
if (res.rows.length > 0) {
|
|
if (res.rows.length > 0) {
|
|
let lastRow = res.rows[res.rows.length - 1];
|
|
let lastRow = res.rows[res.rows.length - 1];
|
|
@@ -1055,9 +1071,10 @@ export default {
|
|
this.dict.type.direction_of_twist.find(
|
|
this.dict.type.direction_of_twist.find(
|
|
(item) => item.value == directionOfTwist
|
|
(item) => item.value == directionOfTwist
|
|
)?.label || " ";
|
|
)?.label || " ";
|
|
-
|
|
|
|
newData = {
|
|
newData = {
|
|
- machineToolNo,
|
|
|
|
|
|
+ productionLineNo: this.lineOptions.find(
|
|
|
|
+ (i) => i.id == this.form.machineTool
|
|
|
|
+ )?.productionLineNo,
|
|
// qrCode: this.getBoxOrderNum(), //箱单号
|
|
// qrCode: this.getBoxOrderNum(), //箱单号
|
|
packaging, //包装方式 1:车丝 2:小包装 3:大包装
|
|
packaging, //包装方式 1:车丝 2:小包装 3:大包装
|
|
qrCode: this.qrCode, //箱单号
|
|
qrCode: this.qrCode, //箱单号
|
|
@@ -1300,13 +1317,7 @@ export default {
|
|
this.printTableData[0].id = timeStemp;
|
|
this.printTableData[0].id = timeStemp;
|
|
// 先打印
|
|
// 先打印
|
|
this.changeGrossWeight(this.printTableData[0]);
|
|
this.changeGrossWeight(this.printTableData[0]);
|
|
- // 后端打印
|
|
|
|
- await this.newPrintHandler();
|
|
|
|
- // 前端打印
|
|
|
|
- // codeListPrint(this.printTableData, "printDom");
|
|
|
|
- // if (this.excuteType == 1) {
|
|
|
|
- // this.tableData.push(this.printTableData[0]);
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
// 后保存数据
|
|
// 后保存数据
|
|
let payLoad = {
|
|
let payLoad = {
|
|
...this.form,
|
|
...this.form,
|
|
@@ -1327,6 +1338,7 @@ export default {
|
|
otherStates: 0,
|
|
otherStates: 0,
|
|
parentCode: this.summertId,
|
|
parentCode: this.summertId,
|
|
// 总码单相关数据 end
|
|
// 总码单相关数据 end
|
|
|
|
+ directionOfTwist: this.currentRow.directionOfTwist, //捻向
|
|
};
|
|
};
|
|
if (rowData.id) {
|
|
if (rowData.id) {
|
|
payLoad.id = rowData.id;
|
|
payLoad.id = rowData.id;
|
|
@@ -1345,14 +1357,13 @@ export default {
|
|
}
|
|
}
|
|
let msg = this.isEdit ? "编辑" : "新增";
|
|
let msg = this.isEdit ? "编辑" : "新增";
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- // if (this.excuteType != 1) {
|
|
|
|
- // this.printShow = false;
|
|
|
|
- // this.getList();
|
|
|
|
- // return;
|
|
|
|
|
|
+ // 后端打印
|
|
|
|
+ await this.newPrintHandler();
|
|
|
|
+ // 前端打印
|
|
|
|
+ // codeListPrint(this.printTableData, "printDom");
|
|
|
|
+ // if (this.excuteType == 1) {
|
|
|
|
+ // this.tableData.push(this.printTableData[0]);
|
|
// }
|
|
// }
|
|
- // this.tableData[0].id = res.data;
|
|
|
|
- // this.printTableData[0].id = res.data;
|
|
|
|
- // this.printConfirmHandler(res.data);
|
|
|
|
} else {
|
|
} else {
|
|
this.$message.error(`${msg}箱单失败`);
|
|
this.$message.error(`${msg}箱单失败`);
|
|
}
|
|
}
|
|
@@ -1560,6 +1571,8 @@ export default {
|
|
grossWeight: rowData.grossWeight,
|
|
grossWeight: rowData.grossWeight,
|
|
productCodeListInfoList: this.tableData,
|
|
productCodeListInfoList: this.tableData,
|
|
saleProductId: this.currentRow.id, //货品id
|
|
saleProductId: this.currentRow.id, //货品id
|
|
|
|
+ directionOfTwistLabel:
|
|
|
|
+ this.currentRow.directionOfTwistLabel, //捻向
|
|
};
|
|
};
|
|
if (rowData.id) {
|
|
if (rowData.id) {
|
|
payLoad.id = rowData.id;
|
|
payLoad.id = rowData.id;
|
|
@@ -1661,11 +1674,11 @@ export default {
|
|
/** 查询产品码单列表 */
|
|
/** 查询产品码单列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listProductCodeList(this.queryParams).then((response) => {
|
|
|
|
- this.productCodeListList = response.rows;
|
|
|
|
- this.total = response.total;
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ // listProductCodeList(this.queryParams).then((response) => {
|
|
|
|
+ // this.productCodeListList = response.rows;
|
|
|
|
+ // this.total = response.total;
|
|
|
|
+ // this.loading = false;
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|