diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index a1d4b1e7d..a69a37ecb 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -66,6 +66,7 @@ import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,Supplierdelive import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { getAccessToken } from '@/utils/auth' // 供应商发货记录主 defineOptions({ name: 'SupplierdeliverRecordMain' }) @@ -127,12 +128,25 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { return [ + defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 // defaultButtons.mainListGenerateApplicationBtn(null), // 生成采购申请 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { + if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row.id) + } +} + +const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL + +// 单据打印 +const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +const handleDocumentPrint = async (id) => { + window.open(documentSrc.value + '&id=' + id) } /** 详情操作 */ diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index d2ba5dab7..e0eca5881 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -269,7 +269,7 @@ const butttondata = (row) => { link: true // 文本展现按钮 }, defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // 标签打印 - defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 + // defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 // 生成记录 { label: '处理',