Commit 21e11c8d07ac839bad6ccdcca94c339154269f74
1 parent
386bf8b4
refactor(product): 修改产品采购相关权限并更新菜单名称
-将"商品管理"改为"礼品管理" - 将"商品采购"改为"礼品采购" -将"商品库存"改为"礼品库存" - 更新产品采购页面的总金额字段为 totalPrice - 新增产品经理权限并更新相关访问控制
Showing
3 changed files
with
10 additions
and
4 deletions
.umirc.ts
@@ -151,18 +151,20 @@ export default defineConfig({ | @@ -151,18 +151,20 @@ export default defineConfig({ | ||
151 | access: 'canReadAdmin', | 151 | access: 'canReadAdmin', |
152 | }, | 152 | }, |
153 | { | 153 | { |
154 | - name: '商品管理', | 154 | + name: '礼品管理', |
155 | path: '/product', | 155 | path: '/product', |
156 | icon: 'BookOutlined', | 156 | icon: 'BookOutlined', |
157 | routes: [ | 157 | routes: [ |
158 | { | 158 | { |
159 | - name: '商品采购', | 159 | + name: '礼品采购', |
160 | path: 'procure', | 160 | path: 'procure', |
161 | + access: 'canReadProductManagerAndProcureAndAdmin', | ||
161 | component: './product/procure', | 162 | component: './product/procure', |
162 | }, | 163 | }, |
163 | { | 164 | { |
164 | - name: '商品库存', | 165 | + name: '礼品库存', |
165 | path: 'product', | 166 | path: 'product', |
167 | + access: 'canReadProductManagerAndAdmin', | ||
166 | component: './product/product', | 168 | component: './product/product', |
167 | }, | 169 | }, |
168 | { | 170 | { |
src/access.ts
@@ -11,6 +11,7 @@ export default (initialState: API.UserInfo) => { | @@ -11,6 +11,7 @@ export default (initialState: API.UserInfo) => { | ||
11 | const canReadSales = | 11 | const canReadSales = |
12 | roles?.includes('SALES_MANAGER') || roles?.includes('SALES_REPRESENTATIVE'); | 12 | roles?.includes('SALES_MANAGER') || roles?.includes('SALES_REPRESENTATIVE'); |
13 | const canReadSalesManager = roles?.includes('SALES_MANAGER'); | 13 | const canReadSalesManager = roles?.includes('SALES_MANAGER'); |
14 | + const canReadProductManager = roles?.includes('PRODUCT_MANAGER'); | ||
14 | return { | 15 | return { |
15 | canReadAdmin: canReadAdmin, | 16 | canReadAdmin: canReadAdmin, |
16 | canReadProcure: canReadProcure || canReadAdmin, | 17 | canReadProcure: canReadProcure || canReadAdmin, |
@@ -25,5 +26,8 @@ export default (initialState: API.UserInfo) => { | @@ -25,5 +26,8 @@ export default (initialState: API.UserInfo) => { | ||
25 | canReadAdminAndSalesManager: canReadAdmin || canReadSalesManager, | 26 | canReadAdminAndSalesManager: canReadAdmin || canReadSalesManager, |
26 | canReadAdminAndSalesAndWarehouseKeeper: | 27 | canReadAdminAndSalesAndWarehouseKeeper: |
27 | canReadAdmin || canReadSales || canReadWarehouseKeeper, | 28 | canReadAdmin || canReadSales || canReadWarehouseKeeper, |
29 | + canReadProductManagerAndProcureAndAdmin: | ||
30 | + canReadAdmin || canReadProductManager || canReadProcure, | ||
31 | + canReadProductManagerAndAdmin: canReadAdmin || canReadProductManager, | ||
28 | }; | 32 | }; |
29 | }; | 33 | }; |
src/pages/product/procure/index.tsx
@@ -37,7 +37,7 @@ export default () => { | @@ -37,7 +37,7 @@ export default () => { | ||
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | title: '总金额', | 39 | title: '总金额', |
40 | - dataIndex: 'totalAmount', | 40 | + dataIndex: 'totalPrice', |
41 | ellipsis: true, | 41 | ellipsis: true, |
42 | width: 180, | 42 | width: 180, |
43 | hideInSearch: true, | 43 | hideInSearch: true, |