From 5006d4687267b1a8ae854fd3dff8ce858b084bec Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Fri, 1 Aug 2025 10:53:57 +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=E8=BF=98=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRecordMain/index.vue | 60 +++------------- .../supplierdeliverRequestMain/index.vue | 69 +++++-------------- 2 files changed, 26 insertions(+), 103 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index 6809b42c6..5d137d630 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -256,83 +256,41 @@ const handlerCreatePurchasereceiptRequest = async (number: string) => { } // 单据打印 -// const BASE_URL = getJmreportBaseUrl() +const BASE_URL = getJmreportBaseUrl() // 品番状态是“补给品”和其余状态 的发货单模版 -// const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) +const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) // 品番状态是号试显示生准订单的发货单模版 -// const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) +const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) const handleDocumentPrint = async (id) => { - console.log("wolaile "); await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { if (res.isM && res.haveNOM == false) { //号试(生准订单)模板 - // window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') - supplierdeliverJasperExportPS(id,'M'); + window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') } if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { //号试(生准订单)模板 - // window.open(documentSrc2.value + '&id=' + id ) - supplierdeliverJasperExportPS(id,''); + window.open(documentSrc2.value + '&id=' + id ) } if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { //(生准订单)模板 M型物料 - //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') - supplierdeliverJasperExport(id,'M'); + window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') //(补给品订单)模板 - //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') - supplierdeliverJasperExport(id,'noM'); + window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') } if (res.isM == false) { await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { if (res) { //号试(生准订单)模板 - //window.open(documentSrc2.value + '&id=' + id) - supplierdeliverJasperExportPS(id,''); + window.open(documentSrc2.value + '&id=' + id) } else { - //window.open(documentSrc.value + '&id=' + id) - supplierdeliverJasperExport(id,''); + window.open(documentSrc.value + '&id=' + id) } }) } }) } -const supplierdeliverJasperExport = async (id, type) => { - try { - // 发起导出导出明细 - let params = { - id: id, - type: type, - pageNo: 1, - pageSize: 99999999, - - } - const excelTitle = ref(route.meta.title) - const data = await PackageApi.supplierdeliverJasperExport(params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) - } catch { - } finally { - } -} - -const supplierdeliverJasperExportPS = async (id, type) => { - try { - // 发起导出导出明细 - let params = { - id: id, - type: type, - pageNo: 1, - pageSize: 99999999, - } - const excelTitle = ref(route.meta.title) - const data = await PackageApi.supplierdeliverJasperExportPS(params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) - } catch { - } finally { - } -} - // 子包装数据 const detailParenPackingRef = ref() const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({ diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 681cc9eba..1f22a9284 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -1384,81 +1384,46 @@ const print = async () => { } // 单据打印 -// const BASE_URL = getJmreportBaseUrl() // 品番状态是“补给品”和其余状态 的发货单模版 -// const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) +const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) // 品番状态是号试显示生准订单的发货单模版 -// const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) - -const handleDocumentPrint = async (id) => { - console.log("wolaile "); +const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) +const handleDocumentPrint = async (id, stausId) => { + // await SupplierdeliverRequestMainApi.getItemStatus(stausId).then(async (res) => { + // if (res) { + // //号试(生准订单)模板 + // window.open(documentSrc2.value + '&id=' + id) + // } else { + // window.open(documentSrc.value + '&id=' + id) + // } + // }) await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { if (res.isM && res.haveNOM == false) { //号试(生准订单)模板 - // window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') - supplierdeliverJasperExportPS(id,'M'); + window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') } if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { //号试(生准订单)模板 - // window.open(documentSrc2.value + '&id=' + id ) - supplierdeliverJasperExportPS(id,''); + window.open(documentSrc2.value + '&id=' + id ) } if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { //(生准订单)模板 M型物料 - //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') - supplierdeliverJasperExport(id,'M'); + window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') //(补给品订单)模板 - //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') - supplierdeliverJasperExport(id,'noM'); + 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) - supplierdeliverJasperExportPS(id,''); + window.open(documentSrc2.value + '&id=' + id) } else { - //window.open(documentSrc.value + '&id=' + id) - supplierdeliverJasperExport(id,''); + window.open(documentSrc.value + '&id=' + id) } }) } }) -} - -const supplierdeliverJasperExport = async (id, type) => { - try { - // 发起导出导出明细 - let params = { - id: id, - type: type, - pageNo: 1, - pageSize: 99999999, - - } - const excelTitle = ref(route.meta.title) - const data = await PackageApi.supplierdeliverJasperExport(params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) - } catch { - } finally { - } -} -const supplierdeliverJasperExportPS = async (id, type) => { - try { - // 发起导出导出明细 - let params = { - id: id, - type: type, - pageNo: 1, - pageSize: 99999999, - } - const excelTitle = ref(route.meta.title) - const data = await PackageApi.supplierdeliverJasperExportPS(params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) - } catch { - } finally { - } } /**