|
|
@ -141,6 +141,7 @@ import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMa |
|
|
|
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' |
|
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
@ -255,41 +256,83 @@ const handlerCreatePurchasereceiptRequest = async (number: string) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 单据打印 |
|
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
|
// const BASE_URL = getJmreportBaseUrl() |
|
|
|
// 品番状态是“补给品”和其余状态 的发货单模版 |
|
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) |
|
|
|
// const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) |
|
|
|
// 品番状态是号试显示生准订单的发货单模版 |
|
|
|
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
|
// const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
|
|
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
console.log("wolaile "); |
|
|
|
await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { |
|
|
|
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'); |
|
|
|
} |
|
|
|
if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { |
|
|
|
//号试(生准订单)模板 |
|
|
|
window.open(documentSrc2.value + '&id=' + id ) |
|
|
|
// window.open(documentSrc2.value + '&id=' + id ) |
|
|
|
supplierdeliverJasperExportPS(id,''); |
|
|
|
} |
|
|
|
if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { |
|
|
|
//(生准订单)模板 M型物料 |
|
|
|
window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') |
|
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') |
|
|
|
supplierdeliverJasperExport(id,'M'); |
|
|
|
//(补给品订单)模板 |
|
|
|
window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
|
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') |
|
|
|
supplierdeliverJasperExport(id,'noM'); |
|
|
|
} |
|
|
|
if (res.isM == false) { |
|
|
|
await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { |
|
|
|
if (res) { |
|
|
|
//号试(生准订单)模板 |
|
|
|
window.open(documentSrc2.value + '&id=' + id) |
|
|
|
//window.open(documentSrc2.value + '&id=' + id) |
|
|
|
supplierdeliverJasperExportPS(id,''); |
|
|
|
} else { |
|
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
|
//window.open(documentSrc.value + '&id=' + id) |
|
|
|
supplierdeliverJasperExport(id,''); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const supplierdeliverJasperExport = async (id, type) => { |
|
|
|
try { |
|
|
|
// 发起导出导出明细 |
|
|
|
let params = { |
|
|
|
id: id, |
|
|
|
type: type, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 99999999, |
|
|
|
|
|
|
|
} |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await PackageApi.supplierdeliverJasperExport(params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const supplierdeliverJasperExportPS = async (id, type) => { |
|
|
|
try { |
|
|
|
// 发起导出导出明细 |
|
|
|
let params = { |
|
|
|
id: id, |
|
|
|
type: type, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 99999999, |
|
|
|
} |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await PackageApi.supplierdeliverJasperExportPS(params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.pdf`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 子包装数据 |
|
|
|
const detailParenPackingRef = ref() |
|
|
|
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({ |
|
|
|