diff --git a/src/directives/permission/hasRole.ts b/src/directives/permission/hasRole.ts index 31a352a72..ae253cbae 100644 --- a/src/directives/permission/hasRole.ts +++ b/src/directives/permission/hasRole.ts @@ -8,7 +8,10 @@ export function hasRole(app: App) { const { wsCache } = useCache() const { value } = binding const super_admin = 'admin' - const roles = wsCache.get(CACHE_KEY.USER).roles + let roles = [] + if(wsCache.get(CACHE_KEY.USER)?.roles){ + roles = wsCache.get(CACHE_KEY.USER).roles + } if (value && value instanceof Array && value.length > 0) { const roleFlag = value diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue index 3d75488ad..a5f66f647 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue @@ -146,17 +146,17 @@ :key="index" /> - + - + - + - + diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue index 11c90ff93..1e3e63b16 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue @@ -98,7 +98,7 @@ - + diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue index c20e75fd3..d23465971 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue @@ -82,7 +82,7 @@ - + diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue index 6b627ebf4..c8a5091ba 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue @@ -173,9 +173,9 @@ > diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue index 38d77544f..13f4101c4 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue @@ -98,19 +98,19 @@ - + - + - + diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue index 18bef7713..6c51d21ef 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue @@ -148,17 +148,17 @@ :key="index" /> - + - + - + - + diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue index b5a7b1f94..2b3ecd7ae 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue @@ -85,9 +85,9 @@ > @@ -124,9 +124,9 @@ > diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index cce9590e7..a22070789 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'wms:count-plan-main:create'}), // 新增——需要手动修改下权限 - defaultButtons.defaultImportBtn({hasPermi:'wms:count-plan-main:import'}), // 导入 + // defaultButtons.defaultImportBtn({hasPermi:'wms:count-plan-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:count-plan-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -362,6 +362,5 @@ const selectChange = (field,val)=>{ /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await CountPlanMainApi.importTemplate() })