diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 14f2f01df..0e7736dc1 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -75,6 +75,8 @@ 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' +import * as SwitchApi from '@/api/wms/switch' + // 制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -116,13 +118,28 @@ const { tableObject, tableMethods } = useTable({ // 获得表格的各种操作 const { getList, setSearchParams } = tableMethods + +const switchproductPutawayJobPrint = ref(false) +const getSwitchStatus = async ()=>{ + let res = await SwitchApi.getSwitchPage({ + pageSize: 20, + pageNo: 1, + code: 'productPutawayJobPrint' + }) + console.log('getSwitchStatus',res) + if(res&&res.list){ + switchproductPutawayJobPrint.value = res.list[0].effectiveSetValue == 'TRUE' + + } +} // 列表头部按钮 -const HeadButttondata = [ +const HeadButttondata = computed(()=>{ + return [ defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-job-main:export'}), // 导出 { label: '待处理状态全部打印', name: 'printAllPending', - hide: false, + hide: !switchproductPutawayJobPrint.value, type: 'primary', icon: '', color: '', @@ -132,6 +149,7 @@ const HeadButttondata = [ defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 ] +}) // 头部按钮事件 const buttonBaseClick = (val, item) => { @@ -244,8 +262,10 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } + /** 初始化 **/ onMounted(async () => { getList() + getSwitchStatus() })