From 4009c183eb1d1f1881290028842e208a339d2045 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 16:24:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRecordMain/index.vue | 14 +++++++++++++- .../supplierdeliverRecordMain.data.ts | 2 +- .../supplierdeliverRequestMain/index.vue | 10 ++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index 081ffc15d..65c78e8bb 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' }) @@ -128,13 +129,17 @@ const buttonBaseClick = (val, item) => { const butttondata = (row) => { return [ defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // 生成采购申请 - ] + defaultButtons.mainListDocumentPrintBtn({}) // 单据打印 + ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if(val == 'generateApplication'){ handlerCreatePurchasereceiptRequest(row.number) + }else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row.id) } } @@ -151,6 +156,13 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => { } } +// 单据打印 +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) +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts index 3e55ba2bd..3410ecdf4 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts @@ -327,7 +327,7 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 160, + width: 300, fixed: 'right' }, } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index f5b2b3a02..9e4a2140c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -261,7 +261,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: '发货', @@ -472,11 +472,9 @@ const genRecords = async (id: number) => { tableObject.loading = true // 发起处理 SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { - if(!res){ - message.success(t('处理成功!')) - // 单据打印 - handleDocumentPrint(id) - } + message.success(t('处理成功!')) + // 单据打印 + handleDocumentPrint(res) }) // 刷新列表 getList()