Browse Source

修改供应商发货申请打印发货单

intex_onlinescplabel
叶佳兴 2 days ago
parent
commit
e2c139563d
  1. 24
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

24
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -1383,42 +1383,43 @@ const print = async () => {
window.open(src.value + '&number=' + detatableData.tableList[0].number) 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) => { await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => {
if (res.isM && res.haveNOM == false) { if (res.isM && res.haveNOM == false) {
// //
// window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') // 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 == '生准订单') { if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') {
// //
// window.open(documentSrc2.value + '&id=' + id ) // window.open(documentSrc2.value + '&id=' + id )
supplierdeliverJasperExportPS(id, '') supplierdeliverJasperExportPS(id, '',result.supplierCode,result.deliNo)
} }
if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') {
// M // M
//window.open(documentSrc.value + '&id=' + id+ '&type=' + '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') //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM')
supplierdeliverJasperExport(id, 'noM') supplierdeliverJasperExport(id, 'noM',result.supplierCode,result.deliNo)
} }
if (res.isM == false) { if (res.isM == false) {
await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => {
if (res) { if (res) {
// //
//window.open(documentSrc2.value + '&id=' + id) //window.open(documentSrc2.value + '&id=' + id)
supplierdeliverJasperExportPS(id, '') supplierdeliverJasperExportPS(id, '',result.supplierCode,result.deliNo)
} else { } else {
//window.open(documentSrc.value + '&id=' + id) //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 { try {
// //
let params = { let params = {
@ -1430,14 +1431,15 @@ const supplierdeliverJasperExport = async (id, type) => {
const data = await PackageApi.supplierdeliverJasperExport(params) const data = await PackageApi.supplierdeliverJasperExport(params)
download.excel( download.excel(
data, data,
`供应商发货记录】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` `${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf`
) )
} catch { } catch {
} finally { } finally {
} }
} }
const supplierdeliverJasperExportPS = async (id, type) => { const supplierdeliverJasperExportPS = async (id, type,supplierCode,deliNo) => {
debugger;
try { try {
// //
let params = { let params = {
@ -1449,7 +1451,7 @@ const supplierdeliverJasperExportPS = async (id, type) => {
const data = await PackageApi.supplierdeliverJasperExportPS(params) const data = await PackageApi.supplierdeliverJasperExportPS(params)
download.excel( download.excel(
data, data,
`供应商发货记录】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` `${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf`
) )
} catch { } catch {
} finally { } finally {

Loading…
Cancel
Save