From 92ffddec12bf6cb56a0dc45ba2ef3111843e6bd9 Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Thu, 26 Dec 2024 10:21:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/supplierdeliverRecordMain/index.ts | 5 ++++ .../supplierdeliverRecordMain/index.vue | 28 +++++++++++++++---- .../supplierdeliverRequestMain.data.ts | 12 ++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/api/wms/supplierdeliverRecordMain/index.ts b/src/api/wms/supplierdeliverRecordMain/index.ts index 137a552ce..31d2fb76c 100644 --- a/src/api/wms/supplierdeliverRecordMain/index.ts +++ b/src/api/wms/supplierdeliverRecordMain/index.ts @@ -86,6 +86,11 @@ export const getItemStatus = async (id) => { return await request.post({ url: `/wms/supplierdeliver-record-main/getItemStatus?id=` + id }) } +// 打印发货单前查询物料的状态,从而确定使用哪个积木模版 +export const getPoLineType = async (id) => { + return await request.post({ url: `/wms/supplierdeliver-record-main/getPoLineType?id=` + id }) +} + // 创建采购申请 export const createPurchasereceiptRequest = async (number:string) => { return await request.post({ url: `/wms/supplierdeliver-record-main/createPurchasereceiptRequest?number=`+number }) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index 22d7869cc..09ac33807 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -262,12 +262,30 @@ const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) const handleDocumentPrint = async (id) => { - await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { - if (res) { + await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { + if (res.isM && res.haveNOM == false) { //号试(生准订单)模板 - window.open(documentSrc2.value + '&id=' + id) - } else { - window.open(documentSrc.value + '&id=' + id) + window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') + } + if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { + //号试(生准订单)模板 + window.open(documentSrc2.value + '&id=' + id ) + } + if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { + //(生准订单)模板 M型物料 + window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') + //(补给品订单)模板 + window.open(documentSrc.value + '&id=' + id) + } + if (res.isM == false) { + await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { + if (res) { + //号试(生准订单)模板 + window.open(documentSrc2.value + '&id=' + id) + } else { + window.open(documentSrc.value + '&id=' + id) + } + }) } }) } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 9a42d5edf..b5604d32c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -1368,6 +1368,18 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive