|
@ -240,7 +240,7 @@ const buttonTableClick = async (val, row) => { |
|
|
console.log('ye',); |
|
|
console.log('ye',); |
|
|
|
|
|
|
|
|
// 单据打印 |
|
|
// 单据打印 |
|
|
handleDocumentPrint(row.masterId, row.supplierName, row.deliNo) |
|
|
handleDocumentPrint(row.masterId, row.supplierCode, row.deliNo) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -265,48 +265,45 @@ const handlerCreatePurchasereceiptRequest = async (number: string) => { |
|
|
// 品番状态是号试显示生准订单的发货单模版 |
|
|
// 品番状态是号试显示生准订单的发货单模版 |
|
|
// const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
// const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
const handleDocumentPrint = async (id, supplierName, deliNo) => { |
|
|
const handleDocumentPrint = async (id, supplierCode, deliNo) => { |
|
|
console.log('wolaile ') |
|
|
console.log('wolaile ') |
|
|
console.log(supplierName) |
|
|
console.log(supplierCode) |
|
|
console.log(deliNo) |
|
|
console.log(deliNo) |
|
|
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', supplierName, deliNo) |
|
|
supplierdeliverJasperExportPS(id, 'M', supplierCode, 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, '', supplierName, deliNo) |
|
|
supplierdeliverJasperExportPS(id, '', supplierCode, 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', supplierName, deliNo) |
|
|
supplierdeliverJasperExport(id, 'M', supplierCode, deliNo) |
|
|
//(补给品订单)模板 |
|
|
//(补给品订单)模板 |
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
supplierdeliverJasperExport(id, 'noM', supplierName, deliNo) |
|
|
supplierdeliverJasperExport(id, 'noM', supplierCode, 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, '', supplierName, deliNo) |
|
|
supplierdeliverJasperExportPS(id, '', supplierCode, deliNo) |
|
|
} else { |
|
|
} else { |
|
|
//window.open(documentSrc.value + '&id=' + id) |
|
|
//window.open(documentSrc.value + '&id=' + id) |
|
|
supplierdeliverJasperExport(id, '', supplierName, deliNo) |
|
|
supplierdeliverJasperExport(id, '', supplierCode, deliNo) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const supplierdeliverJasperExport = async (id, type, supplierName, deliNo) => { |
|
|
const supplierdeliverJasperExport = async (id, type, supplierCode, deliNo) => { |
|
|
console.log('tututut ') |
|
|
|
|
|
console.log(supplierName) |
|
|
|
|
|
console.log(deliNo) |
|
|
|
|
|
try { |
|
|
try { |
|
|
// 发起导出导出明细 |
|
|
// 发起导出导出明细 |
|
|
let params = { |
|
|
let params = { |
|
@ -318,14 +315,14 @@ const supplierdeliverJasperExport = async (id, type, supplierName, deliNo) => { |
|
|
const data = await PackageApi.supplierdeliverJasperExport(params) |
|
|
const data = await PackageApi.supplierdeliverJasperExport(params) |
|
|
download.excel( |
|
|
download.excel( |
|
|
data, |
|
|
data, |
|
|
`【${supplierName}】【${formatDate(new Date(), 'YYYY-MM-DD HH:MM:ss')}】【${deliNo}】.pdf` |
|
|
`【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` |
|
|
) |
|
|
) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const supplierdeliverJasperExportPS = async (id, type, supplierName, deliNo) => { |
|
|
const supplierdeliverJasperExportPS = async (id, type, supplierCode, deliNo) => { |
|
|
try { |
|
|
try { |
|
|
// 发起导出导出明细 |
|
|
// 发起导出导出明细 |
|
|
let params = { |
|
|
let params = { |
|
@ -337,7 +334,7 @@ const supplierdeliverJasperExportPS = async (id, type, supplierName, deliNo) => |
|
|
const data = await PackageApi.supplierdeliverJasperExportPS(params) |
|
|
const data = await PackageApi.supplierdeliverJasperExportPS(params) |
|
|
download.excel( |
|
|
download.excel( |
|
|
data, |
|
|
data, |
|
|
`【${supplierName}】【${formatDate(new Date(), 'YYYY-MM-DD HH:MM:ss')}】【${deliNo}】.pdf` |
|
|
`【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` |
|
|
) |
|
|
) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|