Commit 6d611f2500ef4d6534ee9514c18dae8f831a07aa

Authored by boyang
1 parent 00776e38

修改财务编辑

src/router/routes/modules/project/system.ts
... ... @@ -52,7 +52,7 @@ const system: AppRouteModule = {
52 52 meta: {
53 53 title: '系统配置',
54 54 ignoreKeepAlive: true,
55   - roles: [RoleEnum.ADMIN],
  55 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE],
56 56 },
57 57 component: () => import('/@/views/project/config/index.vue'),
58 58 },
... ...
src/views/project/config/index.vue
... ... @@ -6,23 +6,25 @@
6 6 className="ml-2 mb-0"
7 7 :style="{ marginLeft: '30px', marginRight: '5px' }"
8 8 >
9   - <Tabs.TabPane key="1" tab="利润率配置">
  9 + <Tabs.TabPane key="1" tab="利润率配置" v-if="role !== ROLE.FINANCE">
10 10 <TablePanel :searchInfo="{ relationCode: 'profitRate' }" :column="1" />
11 11 </Tabs.TabPane>
12   - <Tabs.TabPane key="2" tab="包装费用配置">
  12 + <Tabs.TabPane key="2" tab="包装费用配置" v-if="role !== ROLE.FINANCE">
13 13 <TablePanel :searchInfo="{ relationCode: 'packetPrice' }" :column="2" />
14 14 </Tabs.TabPane>
15   - <Tabs.TabPane key="3" tab="汇率配置">
  15 + <Tabs.TabPane key="3" tab="汇率配置" v-if="role !== ROLE.FINANCE">
16 16 <TablePanel :searchInfo="{ settingCode: 'exchangeRate' }" :column="3"
17 17 /></Tabs.TabPane>
18   - <Tabs.TabPane key="4" tab="邮件发送配置"><EmailPanel /></Tabs.TabPane>
  18 + <Tabs.TabPane key="4" tab="邮件发送配置" v-if="role !== ROLE.FINANCE"
  19 + ><EmailPanel
  20 + /></Tabs.TabPane>
19 21 <Tabs.TabPane key="5" tab="最后汇款日期">
20 22 <TablePanel :searchInfo="{ relationCode: 'orderHodTime' }" :column="5" />
21 23 </Tabs.TabPane>
22 24 <Tabs.TabPane key="6" tab="提成成本配置">
23 25 <TablePanel :searchInfo="{ relationCode: 'costSettingItem' }" :column="6" />
24 26 </Tabs.TabPane>
25   - <Tabs.TabPane key="7" tab="销售额配置">
  27 + <Tabs.TabPane key="7" tab="销售额配置" v-if="role !== ROLE.FINANCE">
26 28 <TablePanel :searchInfo="{ relationCode: 'salesAmount' }" :column="7" />
27 29 </Tabs.TabPane>
28 30 <Tabs.TabPane key="8" tab="生产科应付日期">
... ... @@ -40,17 +42,31 @@
40 42 import { Tabs } from 'ant-design-vue';
41 43 import { PageWrapper } from '/@/components/Page';
42 44 import TablePanel from './TablePanel.vue';
43   - import { onMounted } from 'vue';
  45 + import { computed, onMounted, ref, watchEffect } from 'vue';
44 46 import { useOrderStoreWithOut } from '/@/store/modules/order';
45 47 import EmailPanel from './EmailPanel.vue';
46 48 import ProductPanel from './ProductPanel.vue';
  49 + import { ROLE } from '../order/type.d';
  50 + import { useUserStoreWithOut } from '/@/store/modules/user';
47 51  
48   - let currentKey = '1';
  52 + const currentKey = ref('1');
49 53 const orderStore = useOrderStoreWithOut();
50   -
  54 + const userStore = useUserStoreWithOut();
  55 + const user = userStore.getUserInfo;
  56 + const role = computed(() => {
  57 + return user?.roleSmallVO?.code;
  58 + });
51 59 onMounted(async () => {
  60 + if (role.value == ROLE.FINANCE) {
  61 + currentKey.value = '5';
  62 + }
52 63 await orderStore.getDict();
53 64 });
  65 + // watchEffect(() => {
  66 + // if (role.value == ROLE.FINANCE) {
  67 + // currentKey.value = '5';
  68 + // }
  69 + // });
54 70 </script>
55 71  
56 72 <style>
... ...
src/views/project/finance/pay/FinanceEdit.vue
... ... @@ -15,13 +15,13 @@
15 15 <!-- <div>
16 16 <BasicForm @register="registerForm" />
17 17 </div> -->
18   - <div style="font-size: 15px">实际应付金额1$</div>
  18 + <div style="font-size: 15px">实际付款金额1¥</div>
19 19 <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size />
20 20 <div style="margin: 16px 0"></div>
21   - <div style="font-size: 15px">实际应付金额2$</div>
  21 + <div style="font-size: 15px">实际付款金额2¥</div>
22 22 <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size />
23 23 <div style="margin: 16px 0"></div>
24   - <div style="font-size: 15px">实际应付金额3$</div>
  24 + <div style="font-size: 15px">实际付款金额3¥</div>
25 25 <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size />
26 26 <div style="margin: 16px 0"></div>
27 27  
... ...
src/views/project/finance/receive/FinanceEdit.vue
... ... @@ -15,13 +15,13 @@
15 15 <!-- <div>
16 16 <BasicForm @register="registerForm" />
17 17 </div> -->
18   - <div style="font-size: 15px">实际应收金额1$</div>
  18 + <div style="font-size: 15px">实际收款金额1$</div>
19 19 <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size />
20 20 <div style="margin: 16px 0"></div>
21   - <div style="font-size: 15px">实际应收金额2$</div>
  21 + <div style="font-size: 15px">实际收款金额2$</div>
22 22 <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size />
23 23 <div style="margin: 16px 0"></div>
24   - <div style="font-size: 15px">实际应收金额3$</div>
  24 + <div style="font-size: 15px">实际收款金额3$</div>
25 25 <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size />
26 26 <div style="margin: 16px 0"></div>
27 27 <div style="font-size: 15px">其他费用金额$</div>
... ...