From ce86e7500f8971b1f6f9c39b77eb3fbe87eff8fd Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 23 Feb 2024 13:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereturnRecordMain/index.vue | 14 +++++++++++++- .../purchasereturnRecordMain.data.ts | 10 ++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) 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' + }, } ]))