Browse Source

供应商发货单还原代码

intex
叶佳兴 1 day ago
parent
commit
5006d46872
  1. 60
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  2. 69
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

60
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -256,83 +256,41 @@ 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) => { const handleDocumentPrint = async (id) => {
console.log("wolaile ");
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');
} }
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,'');
} }
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');
// //
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM')
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,'');
} else { } 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 detailParenPackingRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({ const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({

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

@ -1384,81 +1384,46 @@ const print = async () => {
} }
// //
// 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, stausId) => {
const handleDocumentPrint = async (id) => { // await SupplierdeliverRequestMainApi.getItemStatus(stausId).then(async (res) => {
console.log("wolaile "); // if (res) {
// //
// window.open(documentSrc2.value + '&id=' + id)
// } else {
// window.open(documentSrc.value + '&id=' + 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');
} }
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,'');
} }
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');
// //
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') window.open(documentSrc.value + '&id=' + id)
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,'');
} else { } 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 {
}
} }
/** /**

Loading…
Cancel
Save