From c8f8a9c645f7857859a9d56fac96192d994be70b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期一, 24 六月 2024 18:48:29 +0800 Subject: [PATCH] 按钮权限更新 --- src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue b/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue index a838d8b..b509cee 100644 --- a/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue +++ b/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue @@ -1,5 +1,5 @@ <template> - <div class="m-4 mr-0 overflow-hidden bg-white" > + <div class="m-4 mr-0 overflow-hidden bg-white"> <TigerTree :title="t('浠撳簱')" toolbar @@ -11,7 +11,7 @@ :fieldNames="{ key: 'id', title: 'houseName' }" :beforeRightClick="getRightMenuList" @select="handleSelect" - @addHouse="addHouse" + @handleAdd="addHouse" /> <!-- <button :onClick="aa" style=" position: absolute; @@ -35,13 +35,13 @@ import { getTreeList, DeleteWareHouse, getWHList } from '/@/api/tigerapi/wms/house'; import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; - const { t } = useI18n('WMS.WareHouse'); + const { t } = useI18n(); export default defineComponent({ name: 'HouseTree', components: { TigerTree, RegionModal, WareHouseModal, ShelfModal }, - emits: ['select', 'success','delete'], + emits: ['select', 'success', 'delete'], setup(_, { emit }) { const treeData = ref<TreeItem[]>(); const [registerWareHouse, { openModal: openWareHouseModal }] = useModal(); @@ -63,7 +63,7 @@ // regions.children.forEach(shelf => { // createIcon(shelf.houseType) // }); - // }else{ + // }else{ // createIcon(regions.houseType); // } // }); @@ -88,7 +88,7 @@ fetch(); } - async function getRightMenuList(node: any): ContextMenuItem[] { + function getRightMenuList(node: any): ContextMenuItem[] { var name = node.houseType === 'Warehouse' ? t('鏂板鍌ㄥ尯') : t('鏂板璐ф灦'); if (node.houseType === 'Shelf') { @@ -154,18 +154,19 @@ ]; } } - async function GetORG_CODE(params: string) { - var org = await getWHList(params); - return org[0].AUTH_ORG; + function GetORG_CODE(params: string) { + getWHList(params).then((org) => { + return org[0].AUTH_ORG; + }); } - function createIcon({ houseType }) { - if (houseType === 'Warehouse') { + function createIcon(params: Recordable) { + if (params['houseType'] === 'Warehouse') { return 'warehouse|svg'; } - if (houseType === 'Region') { + if (params['houseType'] === 'Region') { return 'Region|svg'; } - if (houseType === 'Shelf') { + if (params['houseType'] === 'Shelf') { return 'Shelf|svg'; } return ''; -- Gitblit v1.9.3