Browse Source

单据开关

master_hella_20240701
wangyufei 5 months ago
parent
commit
bafd71d10b
  1. 24
      src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue

24
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 { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {getAccessToken} from "@/utils/auth"; import {getAccessToken} from "@/utils/auth";
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as SwitchApi from '@/api/wms/switch'
// //
defineOptions({ name: 'ProductputawayJobMain' }) defineOptions({ name: 'ProductputawayJobMain' })
@ -116,13 +118,28 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods 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'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-job-main:export'}), //
{ {
label: '待处理状态全部打印', label: '待处理状态全部打印',
name: 'printAllPending', name: 'printAllPending',
hide: false, hide: !switchproductPutawayJobPrint.value,
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
@ -132,6 +149,7 @@ const HeadButttondata = [
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
] ]
})
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
@ -244,8 +262,10 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
getSwitchStatus()
}) })
</script> </script>

Loading…
Cancel
Save