index.vue
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<template>
<div className="approve-page px-4 bg-white">
<a-tabs :default-active-key="role === ROLE.FINANCE ? '7' : '1'" v-model:activeKey="currentKey">
<a-tab-pane key="1" tab="字段待审核" v-if="role !== ROLE.FINANCE">
<FieldPanel />
</a-tab-pane>
<a-tab-pane key="3" tab="利润分析待审核" v-if="role==ROLE.ADMIN || role==ROLE.BUSINESS" >
<ProfitPanel />
</a-tab-pane>
<a-tab-pane key="5" tab="项目报告书待审核" v-if="role==ROLE.ADMIN || role==ROLE.BUSINESS">
<ReportPanel />
</a-tab-pane>
<a-tab-pane
key="7"
tab="应收款待审核"
v-if="
role == ROLE.FINANCE ||
role == ROLE.ADMIN
// ||
// role == ROLE.BUSINESS ||
// role == ROLE.TRACKER
"
>
<ReceivePanel />
</a-tab-pane>
<a-tab-pane
key="9"
tab="应付款待审核"
v-if="
role == ROLE.FINANCE ||
role == ROLE.ADMIN ||
role == ROLE.BUSINESS ||
role == ROLE.TRACKER
"
>
<PayPanel />
</a-tab-pane>
<!-- <a-tab-pane
key="11"
tab="利润分析表字段审核"
v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"
>
<ProfitFieldPanel />
</a-tab-pane>
<a-tab-pane key="13" tab="明细表字段审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN">
<ProduceFieldPanel />
</a-tab-pane> -->
<a-tab-pane key="2" tab="字段已审核" v-if="role !== ROLE.FINANCE">
<FieldPanel isApproved />
</a-tab-pane>
<a-tab-pane key="4" tab="利润分析已审核" v-if="role==ROLE.ADMIN || role==ROLE.BUSINESS">
<ProfitPanel isApproved />
</a-tab-pane>
<a-tab-pane key="6" tab="项目报告书已审核" v-if="role==ROLE.ADMIN || role==ROLE.BUSINESS">
<ReportPanel isApproved />
</a-tab-pane>
<a-tab-pane
key="8"
tab="应收款已审核"
v-if="
role == ROLE.FINANCE ||
role == ROLE.ADMIN
// ||
// role == ROLE.BUSINESS ||
// role == ROLE.TRACKER
"
>
<ReceivePanel isApproved />
</a-tab-pane>
<a-tab-pane
key="10"
tab="应付款已审核"
v-if="
role == ROLE.FINANCE ||
role == ROLE.ADMIN ||
role == ROLE.BUSINESS ||
role == ROLE.TRACKER
"
>
<PayPanel isApproved />
</a-tab-pane>
<!-- <a-tab-pane
key="12"
tab="利润分析表字段已审核"
v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"
>
<ProfitFieldPanel isApproved />
</a-tab-pane>
<a-tab-pane key="14" tab="明细表字段审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN">
<ProduceFieldPanel isApproved />
</a-tab-pane> -->
</a-tabs>
</div>
</template>
<script lang="ts">
import { computed, defineComponent, onMounted, ref, watchEffect } from 'vue';
import { Tabs } from 'ant-design-vue';
import { ROLE } from '../order/type.d';
import ReportPanel from './ReportPanel.vue';
import ProfitPanel from './ProfitPanel.vue';
import FieldPanel from './FieldPanel.vue';
import ReceivePanel from './ReceivePanel.vue';
import PayPanel from './PayPanel.vue';
import ProfitFieldPanel from './ProfitFieldPanel.vue';
import ProduceFieldPanel from './ProduceFieldPanel.vue';
import { useOrderStoreWithOut } from '/@/store/modules/order';
import { useUserStoreWithOut } from '/@/store/modules/user';
const orderStore = useOrderStoreWithOut();
const userStore = useUserStoreWithOut();
const user = userStore.getUserInfo;
const role = computed(() => {
return user?.roleSmallVO?.code;
});
export default defineComponent({
components: {
[Tabs.name]: Tabs,
[Tabs.TabPane.name]: Tabs.TabPane,
ReportPanel,
FieldPanel,
ProfitPanel,
ReceivePanel,
PayPanel,
ProfitFieldPanel,
ProduceFieldPanel,
},
setup() {
const checkedKeys = ref<Array<string | number>>([]);
const currentKey = ref('1');
onMounted(async () => {
await orderStore.getDict();
});
watchEffect(() => {
if (role.value == ROLE.FINANCE) {
currentKey.value = '7';
}
});
return {
checkedKeys,
currentKey,
role,
ROLE,
};
},
});
</script>
<style>
.approve-page .vben-basic-table .ant-table-wrapper {
margin-bottom: 0;
}
.approve-page .vben-basic-table-form-container {
padding-right: 0;
padding-left: 0;
}
.approve-page .vben-basic-table-form-container .ant-form {
margin-bottom: 0;
padding-top: 0;
}
</style>