sanmu
authored
|
1
2
3
|
<template>
<PageWrapper contentBackground>
<div className="config-page">
|
柏杨
authored
|
4
5
6
7
8
|
<Tabs
v-model:selectedKey="currentKey"
className="ml-2 mb-0"
:style="{ marginLeft: '30px', marginRight: '5px' }"
>
|
|
9
|
<Tabs.TabPane key="1" tab="利润率配置" v-if="role !== ROLE.FINANCE">
|
sanmu
authored
|
10
11
|
<TablePanel :searchInfo="{ relationCode: 'profitRate' }" :column="1" />
</Tabs.TabPane>
|
|
12
|
<Tabs.TabPane key="2" tab="包装费用配置" v-if="role !== ROLE.FINANCE">
|
sanmu
authored
|
13
14
|
<TablePanel :searchInfo="{ relationCode: 'packetPrice' }" :column="2" />
</Tabs.TabPane>
|
|
15
|
<Tabs.TabPane key="3" tab="汇率配置" v-if="role !== ROLE.FINANCE">
|
sanmu
authored
|
16
17
|
<TablePanel :searchInfo="{ settingCode: 'exchangeRate' }" :column="3"
/></Tabs.TabPane>
|
|
18
19
20
|
<Tabs.TabPane key="4" tab="邮件发送配置" v-if="role !== ROLE.FINANCE"
><EmailPanel
/></Tabs.TabPane>
|
柏杨
authored
|
21
22
23
|
<Tabs.TabPane key="5" tab="最后汇款日期">
<TablePanel :searchInfo="{ relationCode: 'orderHodTime' }" :column="5" />
</Tabs.TabPane>
|
柏杨
authored
|
24
|
<Tabs.TabPane key="6" tab="提成成本配置">
|
柏杨
authored
|
25
|
<TablePanel :searchInfo="{ relationCode: 'costSettingItem' }" :column="6" />
|
柏杨
authored
|
26
|
</Tabs.TabPane>
|
|
27
|
<!-- <Tabs.TabPane key="7" tab="销售额配置" v-if="role !== ROLE.FINANCE">
|
柏杨
authored
|
28
|
<TablePanel :searchInfo="{ relationCode: 'salesAmount' }" :column="7" />
|
|
29
|
</Tabs.TabPane> -->
|
|
30
31
32
33
34
35
|
<Tabs.TabPane key="8" tab="生产科应付日期">
<TablePanel :searchInfo="{ relationCode: 'produHodTime' }" :column="8" />
</Tabs.TabPane>
<Tabs.TabPane key="9" tab="生产科固定成本">
<TablePanel :searchInfo="{ relationCode: 'ProduceSettingItem' }" :column="9" />
</Tabs.TabPane>
|
sanmu
authored
|
36
37
38
39
40
41
42
43
44
|
</Tabs>
</div>
</PageWrapper>
</template>
<script setup lang="ts">
import { Tabs } from 'ant-design-vue';
import { PageWrapper } from '/@/components/Page';
import TablePanel from './TablePanel.vue';
|
|
45
|
import { computed, onMounted, ref, watchEffect } from 'vue';
|
sanmu
authored
|
46
|
import { useOrderStoreWithOut } from '/@/store/modules/order';
|
柏杨
authored
|
47
48
|
import EmailPanel from './EmailPanel.vue';
import ProductPanel from './ProductPanel.vue';
|
|
49
50
|
import { ROLE } from '../order/type.d';
import { useUserStoreWithOut } from '/@/store/modules/user';
|
sanmu
authored
|
51
|
|
|
52
|
const currentKey = ref('1');
|
sanmu
authored
|
53
|
const orderStore = useOrderStoreWithOut();
|
|
54
55
56
57
58
|
const userStore = useUserStoreWithOut();
const user = userStore.getUserInfo;
const role = computed(() => {
return user?.roleSmallVO?.code;
});
|
sanmu
authored
|
59
|
onMounted(async () => {
|
|
60
61
62
|
if (role.value == ROLE.FINANCE) {
currentKey.value = '5';
}
|
sanmu
authored
|
63
64
|
await orderStore.getDict();
});
|
|
65
66
67
68
69
|
// watchEffect(() => {
// if (role.value == ROLE.FINANCE) {
// currentKey.value = '5';
// }
// });
|
sanmu
authored
|
70
71
72
73
74
75
76
77
78
79
80
|
</script>
<style>
.config-page .ant-tabs-nav-operations ant-tabs-nav-operations-hidden {
display: none;
}
.config-page .ant-tabs-nav {
margin-bottom: 0;
}
</style>
|