From 287b5f068f226710f1757f4d5d03aceb1d814d59 Mon Sep 17 00:00:00 2001 From: DouDou <877258667@qq.com> Date: Fri, 15 Aug 2025 17:38:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=20=20=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=89=93=E5=8D=B0=E7=9A=84=E6=89=B9=E6=AC=A1=20?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shipment/index.js | 4 ++ .../outWarehouse/com_print_pick_list.vue | 43 ++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/api/shipment/index.js b/src/api/shipment/index.js index 2f21835..83cb713 100644 --- a/src/api/shipment/index.js +++ b/src/api/shipment/index.js @@ -11,3 +11,7 @@ export const cancelShipment = (data) => createAPI( `/shipment/cancel`,'post',dat /* 获取装箱单打印的数据 */ export const getPrintShipment = (data)=>createAPI('/shipment/getPrintShipment','post',data) + +/* 获取装箱单打印批次的数据 */ +export const getPrintShipmentBatchNos = (data)=>createAPI('/shipment/getPrintShipmentBatchNos','post',data) + diff --git a/src/views/modules/finshProduct/outWarehouse/com_print_pick_list.vue b/src/views/modules/finshProduct/outWarehouse/com_print_pick_list.vue index b05098d..290454f 100644 --- a/src/views/modules/finshProduct/outWarehouse/com_print_pick_list.vue +++ b/src/views/modules/finshProduct/outWarehouse/com_print_pick_list.vue @@ -60,12 +60,24 @@ - + + + + + + + + + @@ -92,7 +104,7 @@ /*打印标签专用的js*/ import { printShipmentPackingBoxLabel } from '@/views/modules/label/print_shipment_packing_box_label.js' import { - getPrintShipment, + getPrintShipment, getPrintShipmentBatchNos, } from '@/api/shipment' import dayjs from "dayjs"; @@ -108,7 +120,9 @@ export default { relatedOrderNo: '', saleQty: 0, boxQty: 0, + batchNo: '', }, + batchNos: [], printRow: {}, dataListLoading: false, printLoading: false, @@ -123,8 +137,12 @@ export default { this.formData.orderNumber = row.orderNumber; this.formData.saleQty = row.saleQty; this.formData.boxQty = row.saleQty; + this.formData.batchNo = ''; + this.batchNos = []; //打开显示 this.visible = true; + //刷新列表信息 + this.initShipmentBatchNos(); //赋值 this.printRow = JSON.parse(JSON.stringify(row)); //自动获取焦点 @@ -145,9 +163,20 @@ export default { boxQty: 0, }; }, + /*初始化数据*/ + initShipmentBatchNos(){ + getPrintShipmentBatchNos(this.printRow).then(({data})=>{ + if (data && data.code === 0){ + this.batchNos = data.rows; + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, - - // 处理打印标签 + // 处理打印标签 handlePrintLabel() { if (!this.formData || Object.keys(this.formData).length === 0) { this.$message.warning('请先扫描标签条码'); @@ -171,8 +200,10 @@ export default { this.printRow.boxQty = boxQty; getPrintShipment(this.printRow).then(({data})=>{ if (data && data.code === 0){ - let arr = data.row; - arr.productionDate = `${dayjs(arr.productionDate).format("YYYYMMDD")}`; + let printRow = data.row; + printRow.productionDate = `${dayjs(printRow.productionDate).format("YYYYMMDD")}`; + let arr = []; + arr.push(printRow) ; printShipmentPackingBoxLabel(arr); this.$message.success('标签打印成功'); }else {