|
|
@ -262,12 +262,30 @@ const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + |
|
|
|
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
|
|
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { |
|
|
|
if (res) { |
|
|
|
await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { |
|
|
|
if (res.isM && res.haveNOM == false) { |
|
|
|
//号试(生准订单)模板 |
|
|
|
window.open(documentSrc2.value + '&id=' + id) |
|
|
|
} else { |
|
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
|
window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') |
|
|
|
} |
|
|
|
if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { |
|
|
|
//号试(生准订单)模板 |
|
|
|
window.open(documentSrc2.value + '&id=' + id ) |
|
|
|
} |
|
|
|
if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { |
|
|
|
//(生准订单)模板 M型物料 |
|
|
|
window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') |
|
|
|
//(补给品订单)模板 |
|
|
|
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) |
|
|
|
} else { |
|
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|