Browse Source

供应商发货单修改

intex_onlinescplabel
叶佳兴 2 days ago
parent
commit
bee6cd1e7f
  1. 51
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  2. 41
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

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

@ -149,6 +149,7 @@ import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import { SupplierdeliverRequestMainRules } from '../supplierdeliverRequestMain/supplierdeliverRequestMain.data' import { SupplierdeliverRequestMainRules } from '../supplierdeliverRequestMain/supplierdeliverRequestMain.data'
import { log } from 'console'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'SupplierdeliverRecordMain' }) defineOptions({ name: 'SupplierdeliverRecordMain' })
@ -236,8 +237,10 @@ const buttonTableClick = async (val, row) => {
if (val == 'generateApplication') { if (val == 'generateApplication') {
handlerCreatePurchasereceiptRequest(row.number) handlerCreatePurchasereceiptRequest(row.number)
} else if (val == 'documentPrint') { } else if (val == 'documentPrint') {
console.log('ye',);
// //
handleDocumentPrint(row.masterId) handleDocumentPrint(row.masterId, row.supplierName, row.deliNo)
} }
} }
@ -262,72 +265,80 @@ 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) => { const handleDocumentPrint = async (id, supplierName, deliNo) => {
console.log("wolaile "); console.log('wolaile ')
console.log(supplierName)
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'); supplierdeliverJasperExportPS(id, 'M', supplierName, 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,''); supplierdeliverJasperExportPS(id, '', supplierName, 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'); supplierdeliverJasperExport(id, 'M', supplierName, deliNo)
// //
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM')
supplierdeliverJasperExport(id,'noM'); supplierdeliverJasperExport(id, 'noM', supplierName, 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,''); supplierdeliverJasperExportPS(id, '', supplierName, deliNo)
} else { } else {
//window.open(documentSrc.value + '&id=' + id) //window.open(documentSrc.value + '&id=' + id)
supplierdeliverJasperExport(id,''); supplierdeliverJasperExport(id, '', supplierName, deliNo)
} }
}) })
} }
}) })
} }
const supplierdeliverJasperExport = async (id, type) => { const supplierdeliverJasperExport = async (id, type, supplierName, deliNo) => {
console.log('tututut ')
console.log(supplierName)
console.log(deliNo)
try { try {
// //
let params = { let params = {
id: id, id: id,
type: type, type: type,
pageNo: 1, pageNo: 1,
pageSize: 99999999, pageSize: 99999999
} }
const excelTitle = ref(route.meta.title)
const data = await PackageApi.supplierdeliverJasperExport(params) const data = await PackageApi.supplierdeliverJasperExport(params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.pdf`) download.excel(
data,
`${supplierName}】【${formatDate(new Date(), 'YYYY-MM-DD HH:MM:ss')}】【${deliNo}】.pdf`
)
} catch { } catch {
} finally { } finally {
} }
} }
const supplierdeliverJasperExportPS = async (id, type) => { const supplierdeliverJasperExportPS = async (id, type, supplierName, deliNo) => {
try { try {
// //
let params = { let params = {
id: id, id: id,
type: type, type: type,
pageNo: 1, pageNo: 1,
pageSize: 99999999, pageSize: 99999999
} }
const excelTitle = ref(route.meta.title)
const data = await PackageApi.supplierdeliverJasperExportPS(params) const data = await PackageApi.supplierdeliverJasperExportPS(params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.pdf`) download.excel(
data,
`${supplierName}】【${formatDate(new Date(), 'YYYY-MM-DD HH:MM:ss')}】【${deliNo}】.pdf`
)
} catch { } catch {
} finally { } finally {
} }

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

@ -1383,43 +1383,35 @@ const print = async () => {
window.open(src.value + '&number=' + detatableData.tableList[0].number) window.open(src.value + '&number=' + detatableData.tableList[0].number)
} }
//
// const BASE_URL = getJmreportBaseUrl()
//
// const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?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'); 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,''); 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'); supplierdeliverJasperExport(id, 'M')
// //
//window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM') //window.open(documentSrc.value + '&id=' + id+ '&type=' + 'noM')
supplierdeliverJasperExport(id,'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,''); supplierdeliverJasperExportPS(id, '')
} else { } else {
//window.open(documentSrc.value + '&id=' + id) //window.open(documentSrc.value + '&id=' + id)
supplierdeliverJasperExport(id,''); supplierdeliverJasperExport(id, '')
} }
}) })
} }
@ -1433,12 +1425,13 @@ const supplierdeliverJasperExport = async (id, type) => {
id: id, id: id,
type: type, type: type,
pageNo: 1, pageNo: 1,
pageSize: 99999999, pageSize: 99999999
} }
const excelTitle = ref(route.meta.title)
const data = await PackageApi.supplierdeliverJasperExport(params) const data = await PackageApi.supplierdeliverJasperExport(params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.pdf`) download.excel(
data,
`【供应商发货记录】【${formatDate(new Date(), 'YYYY-MM-DD HH:MM:ss')}】.pdf`
)
} catch { } catch {
} finally { } finally {
} }
@ -1451,11 +1444,13 @@ const supplierdeliverJasperExportPS = async (id, type) => {
id: id, id: id,
type: type, type: type,
pageNo: 1, pageNo: 1,
pageSize: 99999999, pageSize: 99999999
} }
const excelTitle = ref(route.meta.title)
const data = await PackageApi.supplierdeliverJasperExportPS(params) const data = await PackageApi.supplierdeliverJasperExportPS(params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.pdf`) download.excel(
data,
`${supplierName.value}】【${formatDate(new Date())}】【${deliNo.value}】.pdf`
)
} catch { } catch {
} finally { } finally {
} }

Loading…
Cancel
Save