From d9d5208eff6fc4a609555a4712eacf646fb489e7 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 26 Jun 2024 19:53:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E4=B8=8A=E6=9E=B6=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productputaway/productputawayJobMain/index.vue | 12 ++++++++++++ .../productputawayJobMain.data.ts | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 9ca0bd98f..e4209c074 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -73,6 +73,8 @@ import * as ProductputawayJobMainApi from '@/api/wms/productputawayJobMain' import * as ProductputawayJobDetailApi from '@/api/wms/productputawayJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import {getAccessToken} from "@/utils/auth"; +import { getJmreportBaseUrl } from '@/utils/systemParam' // 制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -156,6 +158,7 @@ const butttondata = (row,$index) => { return [] } return [ + defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 @@ -244,6 +247,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAcc') { // 承接 await ProductputawayJobMainApi.acceptProductputawayMain(row.masterId) getList() + } else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row) } } // 获取部门 用于详情 部门回显 @@ -256,6 +262,12 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,'jobProductputawayMain') } +const BASE_URL = getJmreportBaseUrl() +const src = ref(BASE_URL + '/jmreport/view/965858364788637696?token=' + getAccessToken()) +const handleDocumentPrint = async (row) => { + window.open(src.value+'&id='+row.masterId) +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts index ba00d25be..bed4de6a6 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts @@ -575,7 +575,7 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 150, + width: 300, fixed: 'right' }, }