diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 4b1f16618..9d626b4de 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -1383,42 +1383,43 @@ const print = async () => { window.open(src.value + '&number=' + detatableData.tableList[0].number) } -const handleDocumentPrint = async (id) => { +const handleDocumentPrint = async (result,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') + supplierdeliverJasperExportPS(id, 'M',result.supplierCode,result.deliNo) } if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { //号试(生准订单)模板 // window.open(documentSrc2.value + '&id=' + id ) - supplierdeliverJasperExportPS(id, '') + supplierdeliverJasperExportPS(id, '',result.supplierCode,result.deliNo) } if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { //(生准订单)模板 M型物料 //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') - supplierdeliverJasperExport(id, 'M') + supplierdeliverJasperExport(id, 'M',result.supplierCode,result.deliNo) //(补给品订单)模板 //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') - supplierdeliverJasperExport(id, 'noM') + supplierdeliverJasperExport(id, 'noM',result.supplierCode,result.deliNo) } if (res.isM == false) { await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { if (res) { //号试(生准订单)模板 //window.open(documentSrc2.value + '&id=' + id) - supplierdeliverJasperExportPS(id, '') + supplierdeliverJasperExportPS(id, '',result.supplierCode,result.deliNo) } else { //window.open(documentSrc.value + '&id=' + id) - supplierdeliverJasperExport(id, '') + supplierdeliverJasperExport(id, '',result.supplierCode,result.deliNo) } }) } }) } -const supplierdeliverJasperExport = async (id, type) => { +const supplierdeliverJasperExport = async (id, type,supplierCode,deliNo) => { + debugger; try { // 发起导出导出明细 let params = { @@ -1430,14 +1431,15 @@ const supplierdeliverJasperExport = async (id, type) => { const data = await PackageApi.supplierdeliverJasperExport(params) download.excel( data, - `【供应商发货记录】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` + `【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` ) } catch { } finally { } } -const supplierdeliverJasperExportPS = async (id, type) => { +const supplierdeliverJasperExportPS = async (id, type,supplierCode,deliNo) => { + debugger; try { // 发起导出导出明细 let params = { @@ -1449,7 +1451,7 @@ const supplierdeliverJasperExportPS = async (id, type) => { const data = await PackageApi.supplierdeliverJasperExportPS(params) download.excel( data, - `【供应商发货记录】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` + `【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` ) } catch { } finally {