From 77ae262efcf00e9f2de5f34de367fbf4bab5b4ee Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sat, 16 Nov 2024 11:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BD=99=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/package/index.ts | 5 +++- .../wms/inventoryManage/balance/index.vue | 29 +++++++++++-------- .../supplierdeliverRequestMain.data.ts | 8 ++--- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index a50be5b1b..57d6e7236 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -101,7 +101,10 @@ export const batchPrintingLable = async (data: any) => { return await request.post({ url: `/wms/package/batchPrintingLable`, data }) } - +// 批量打印标签 +export const batchPrintingLableGet = async (params: any) => { + return await request.get({ url: `/wms/package/batchPrintingLable`, params }) +} // 批量打印标签多选 export const batchPrintingLables = async (data: any) => { return await request.post({ url: `/wms/package/batchPrintingLables`, data }) diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index 5424d1a18..eb155e048 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -481,20 +481,25 @@ const footButtonClick = async (val) => { } } const pointLabel = async () => { - const array =detatableData1.value.map(item=>{ - return { - packingNumber:item.number, - batch: item.batch, - printQty:item.printQty, - } - }) - console.log(array) - const isHave = detatableData1.value.find(item => parseFloat(item.printQty) <= 0) - if(isHave){ - message.error(`物料号${isHave.itemCode}打印数量不可以为0`) + // const array =detatableData1.value.map(item=>{ + // return { + // packingNumber:item.number, + // batch: item.batch, + // printQty:item.printQty, + // } + // }) + const obj = { + itemCode:detatableData1.value[0].itemCode, + packingNumber:detatableData1.value[0].number, + batch:detatableData1.value[0].batch, + printQty:detatableData1.value[0].printQty, + } + // const isHave = detatableData1.value.find(item => parseFloat(item.printQty) <= 0) + if(!parseFloat(obj.printQty) ){ + message.error(`物料号${obj.itemCode}打印数量不可以为0`) return; } - await PackageApi.batchPrintingLable({pointParams:array}).then(res => { + await PackageApi.batchPrintingLableGet(obj).then(res => { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) window.open(src.value+'&asn_number='+res) }).catch(err => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 081aa73be..6e58a3fdd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -1782,10 +1782,10 @@ export const SupplierdeliverRequestPackageRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'change' }, { validator: validateBatch, trigger: 'change' } ], - printQty: [ - { required: true, message: '请输入打印数量', trigger: 'blur' }, - { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } - ], + // printQty: [ + // { required: true, message: '请输入打印数量', trigger: 'blur' }, + // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } + // ], })