Commit 6d611f2500ef4d6534ee9514c18dae8f831a07aa

Authored by boyang
1 parent 00776e38

修改财务编辑

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