|
@ -1116,7 +1116,7 @@ const genRecords = async (id: number) => { |
|
|
getLoading?.close() |
|
|
getLoading?.close() |
|
|
|
|
|
|
|
|
// 单据打印 |
|
|
// 单据打印 |
|
|
await handleDocumentPrint(res,id) |
|
|
await handleDocumentPrint(res) |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
getLoading?.close() |
|
|
getLoading?.close() |
|
@ -1383,43 +1383,42 @@ const print = async () => { |
|
|
window.open(src.value + '&number=' + detatableData.tableList[0].number) |
|
|
window.open(src.value + '&number=' + detatableData.tableList[0].number) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const handleDocumentPrint = async (result,id) => { |
|
|
const handleDocumentPrint = async (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',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExportPS(id, 'M') |
|
|
} |
|
|
} |
|
|
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, '',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExportPS(id, '') |
|
|
} |
|
|
} |
|
|
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',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExport(id, 'M') |
|
|
//(补给品订单)模板 |
|
|
//(补给品订单)模板 |
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
supplierdeliverJasperExport(id, 'noM',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExport(id, 'noM') |
|
|
} |
|
|
} |
|
|
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, '',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExportPS(id, '') |
|
|
} else { |
|
|
} else { |
|
|
//window.open(documentSrc.value + '&id=' + id) |
|
|
//window.open(documentSrc.value + '&id=' + id) |
|
|
supplierdeliverJasperExport(id, '',result.supplierCode,result.deliNo) |
|
|
supplierdeliverJasperExport(id, '') |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const supplierdeliverJasperExport = async (id, type,supplierCode,deliNo) => { |
|
|
const supplierdeliverJasperExport = async (id, type) => { |
|
|
debugger; |
|
|
|
|
|
try { |
|
|
try { |
|
|
// 发起导出导出明细 |
|
|
// 发起导出导出明细 |
|
|
let params = { |
|
|
let params = { |
|
@ -1431,15 +1430,14 @@ const supplierdeliverJasperExport = async (id, type,supplierCode,deliNo) => { |
|
|
const data = await PackageApi.supplierdeliverJasperExport(params) |
|
|
const data = await PackageApi.supplierdeliverJasperExport(params) |
|
|
download.excel( |
|
|
download.excel( |
|
|
data, |
|
|
data, |
|
|
`【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` |
|
|
`【asd】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` |
|
|
) |
|
|
) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const supplierdeliverJasperExportPS = async (id, type,supplierCode,deliNo) => { |
|
|
const supplierdeliverJasperExportPS = async (id, type) => { |
|
|
debugger; |
|
|
|
|
|
try { |
|
|
try { |
|
|
// 发起导出导出明细 |
|
|
// 发起导出导出明细 |
|
|
let params = { |
|
|
let params = { |
|
@ -1451,7 +1449,7 @@ const supplierdeliverJasperExportPS = async (id, type,supplierCode,deliNo) => { |
|
|
const data = await PackageApi.supplierdeliverJasperExportPS(params) |
|
|
const data = await PackageApi.supplierdeliverJasperExportPS(params) |
|
|
download.excel( |
|
|
download.excel( |
|
|
data, |
|
|
data, |
|
|
`【${supplierCode}】【${formatDate(new Date(), 'YYYY-MM-DD')}】【${deliNo}】.pdf` |
|
|
`【asd】【${formatDate(new Date(), 'YYYY-MM-DD')}】.pdf` |
|
|
) |
|
|
) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|