diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 78cbb6234..08c26203e 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -113,6 +113,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ItembasicApi from "@/api/wms/itembasic"; import * as PackageApi from "@/api/wms/package"; import { formatTime } from '@/utils/index' +import { getAccessToken } from '@/utils/auth' // 计划外入库申请 defineOptions({ name: 'UnplannedreceiptRequestMain' }) @@ -284,16 +285,17 @@ const butttondata = (row) => { defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), // 处理 defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), // 删除 - { - label: '创建标签', - name: 'cjbq', - hide: isShowMainButton(row,['3']), - type: 'primary', - icon: '', - color: '', - hasPermi: '', - link: true, // 文本展现按钮 - }, + { + label: '创建标签', + name: 'cjbq', + hide: isShowMainButton(row,['3']), + type: 'primary', + icon: '', + color: '', + hasPermi: '', + link: true, // 文本展现按钮 + }, + defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // 标签打印 ] } @@ -322,6 +324,9 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'point') { + // 标签打印 + labelPrint(row) } else if( val == 'cjbq'){// 创建标签 // 判断 是否已创建标签 let isCreateLabel = false @@ -643,6 +648,13 @@ const tableFormSelectOnBlur = (field, val, row, index) => { } } +// 标签打印 +const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL +const src = ref(BASE_URL + '/jmreport/view/936912164754612224?token=' + getAccessToken()) +const labelPrint = async (row) => { + window.open(src.value + '&request_number=' + row.number) +} + /** 初始化 **/ onMounted(async () => { getList()