diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index 13add37e8..c1e88d93a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -66,6 +66,7 @@ import { PurchasereturnRecordMain,PurchasereturnRecordMainRules,PurchasereturnRe import * as PurchasereturnRecordMainApi from '@/api/wms/purchasereturnRecordMain' import * as PurchasereturnRecordDetailApi from '@/api/wms/purchasereturnRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { getAccessToken } from '@/utils/auth' // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordMain' }) @@ -126,11 +127,22 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { - return [] + return [defaultButtons.mainListDocumentPrintBtn(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/920874172025987072?token=' + getAccessToken()) +const handleDocumentPrint = async (id) => { + window.open(documentSrc.value + '&id=' + id) } /** 详情操作 */ diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts index dc7f8cb42..ad3562c9a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts @@ -330,6 +330,16 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, } ]))