From 770389577636bc40832ab6b14e70ebae9b37654f Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 22 Jun 2026 15:12:38 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-22=20=E8=AE=A2=E5=8D=95=E4=BA=A7?= =?UTF-8?q?=E5=87=BA=E6=A0=87=E7=AD=BE=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E5=92=8C=E4=BF=AE=E6=94=B9Packing=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/labelPrintTemplates.js | 4 +- .../searchSfdcRollsReport.vue | 75 ++++++++++++++++++- 2 files changed, 74 insertions(+), 5 deletions(-) diff --git a/src/mixins/labelPrintTemplates.js b/src/mixins/labelPrintTemplates.js index 5bf4b1b..7e10e51 100644 --- a/src/mixins/labelPrintTemplates.js +++ b/src/mixins/labelPrintTemplates.js @@ -169,7 +169,7 @@ export default { const startX = '20mm'; // 文字左边距 const fullTextWidth = '55mm'; // 单行完整文字区域宽度 const fontSize = 4; // 字体大小(缩小到2.5号,确保超长文本能显示) - const packingFontSize = 3.5; // Packing List 比主文本小一号 + const packingFontSize = 4; // Packing List 比主文本小一号 const lineHeight = '3mm'; // 行高 // 第1行:编码(左) + Packing List(右) @@ -312,7 +312,7 @@ export default { const startX = '20mm'; // 文字左边距 const textWidth = '55mm'; // 文字区域宽度 const fontSize = 5; // 字体大小(比A002稍大,因为只有3行) - const packingFontSize = 4.5; // Packing List 比主文本小一号 + const packingFontSize = 5; // Packing List 比主文本小一号 // 第1行:编码(左) + Packing List(右) const packingList = printData.packingList || printData.PackingList || printData.packinglist || ''; diff --git a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue index c41c2e3..daaaed2 100644 --- a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue +++ b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue @@ -336,9 +336,19 @@ + + + + + + - + 保存 关闭 @@ -651,6 +661,7 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; editSaveLoading: false, editForm: { site: '', + orderNo: '', rollNo: '', partNo: '', partDesc: '', @@ -659,7 +670,8 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; surfaceLossQtyOld: 0, surfaceLossQtyNew: 0, poorPerformanceQtyOld: 0, - poorPerformanceQtyNew: 0 + poorPerformanceQtyNew: 0, + packingList: '' }, columnList: [ { @@ -806,6 +818,24 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 104003007, + serialNumber: '104003007TableSfdcRollsPackingList', + tableId: "104003007Table", + tableName: "订单产出标签报表", + columnProp: "packingList", + headerAlign: "center", + align: "left", + columnLabel: "Packing List", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 180 + }, { userId: this.$store.state.user.name, functionId: 104003007, @@ -1552,6 +1582,7 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; handleEdit(row) { this.editForm = { site: row.site, + orderNo: row.orderNo, rollNo: row.rollNo, partNo: row.partNo, partDesc: row.partDesc, @@ -1560,7 +1591,8 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; surfaceLossQtyOld: row.surfaceLossQty || 0, surfaceLossQtyNew: row.surfaceLossQty || 0, poorPerformanceQtyOld: row.poorPerformanceQty || 0, - poorPerformanceQtyNew: row.poorPerformanceQty || 0 + poorPerformanceQtyNew: row.poorPerformanceQty || 0, + packingList: row.packingList || '' }; this.editDialogVisible = true; }, @@ -1637,6 +1669,7 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; this.editSaveLoading = true; const params = { site: this.editForm.site, + orderNo: this.editForm.orderNo, partNo: this.editForm.partNo, rollNo: this.editForm.rollNo, rollQtyOld: this.editForm.rollQtyOld, @@ -1645,6 +1678,7 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; surfaceLossQtyNew: this.editForm.surfaceLossQtyNew, poorPerformanceQtyOld: this.editForm.poorPerformanceQtyOld, poorPerformanceQtyNew: this.editForm.poorPerformanceQtyNew, + packingList: this.editForm.packingList, type: 'update' }; executeSfdcRollsReport(params).then(({data}) => { @@ -1718,6 +1752,7 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; if (data.rows.length > 0) { //this.columnList = [] this.columnList = data.rows + this.ensurePackingListColumn() } else { this.getColumnList() } @@ -1729,11 +1764,45 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; if (!data.rows.length == 0) { // this.showDefault = false this.columnList = data.rows + this.ensurePackingListColumn() } else { // this.showDefault = true } }) }, + ensurePackingListColumn() { + if (!Array.isArray(this.columnList) || this.columnList.length === 0) { + return + } + const hasPackingList = this.columnList.some(item => item.columnProp === 'packingList') + if (hasPackingList) { + return + } + const packingListColumn = { + userId: this.$store.state.user.name, + functionId: 104003007, + serialNumber: '104003007TableSfdcRollsPackingList', + tableId: "104003007Table", + tableName: "订单产出标签报表", + columnProp: "packingList", + headerAlign: "center", + align: "left", + columnLabel: "Packing List", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 180 + } + const totalQtyIndex = this.columnList.findIndex(item => item.columnProp === 'totalQty') + if (totalQtyIndex >= 0) { + this.columnList.splice(totalQtyIndex + 1, 0, packingListColumn) + } else { + this.columnList.push(packingListColumn) + } + }, }, created() { // this.getMultiLanguageList()//刷新按钮