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
<template>
<div class="white_bg burt-container">
<a-tabs v-model="activeKey" @change="paneChange">
<a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title">
<component v-if="pane.show" :is="pane.content"
:companyOptions="companyOptions" :expressList="expressList"></component>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
import PayBill from "./components/PayBill.vue";
export default {
data() {
return {
activeKey: '0',
panes: [
{ title: "财务账单", key: '0', show: true, content: 'PayBill'},
],
companyOptions: [], //保险公司
expressList: [], //快递公司
};
},
components: {
PayBill
},
created() {
let type = this.$route.query.type;
if(type){
this.activeKey = type;
this.paneChange();
}
this._getCompanyOptions();
this.getRefcdByRefgrp();
},
methods: {
paneChange(){
this.panes.forEach((item)=>{
item.show = false;
});
this.panes[Number(this.activeKey)].show = true;
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.getCompanyOptions().then((res) => {
this.companyOptions = res.content || [];
});
},
// 获取快递列表
getRefcdByRefgrp() {
this.$apis.getRefcdByRefgrp({
modid: "CI",
refgrp: "SEND_COMPANY"
}).then((res) => {
this.expressList = res.content || [];
});
},
},
};
</script>
<style lang="less" scoped></style>