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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<template>
<div class="w-100 h-100">
<title-bar title="担保视图" @clickLef="onClick" line-height="0" line-width="80px" color="#FF574C" title-active-color="#FF574C">
<van-icon slot="left" name="cross" size="24" />
</title-bar>
<van-tabs class="guarTabCls" :active="active" @click="checkMod">
<van-tab title="客户提供担保情况(信贷+个贷)">
<tree-graph-cmp :data="treeData" :format="formatLabel" v-if="test == '1'"></tree-graph-cmp>
</van-tab>
<van-tab title="客户提供担保情况(征信)">
<tree-graph-cmp :data="treeData" :format="formatLabel" v-if="test == '2'"></tree-graph-cmp>
</van-tab>
<van-tab title="客户在行内业务的担保情况">
<tree-graph-cmp :data="treeData" :format="formatLabel" v-if="test == '3'"></tree-graph-cmp>
</van-tab>
</van-tabs>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TitleBar from "@/components/general/TitleBar.vue";
import TreeGraphCmp from '@/components/general/TreeGraphCmp.vue';
import { NativeUI } from "@/public/ts/NativeUI";
import nettyApi from "@/constants/api/ms-netty/netty.api";
import Public from "@/public/ts/Public";
/**
* @Description 担保视图
* @Author JiangTao
* @Date 2021-11-10 下午 03:15
*/
@Component({
name: "GuaranteeView",
components: {
TitleBar,
TreeGraphCmp
},
})
export default class GuaranteeView extends Vue {
pageTitle = ""; // 页面标题
active = 0;
test = "1";
treeData:any = {};
array:any = {
name: this.$store.getters.getCusInfo.cus_name,
children: []
};
onClick() {
this.$router.back();
}
mounted() {
this.pageTitle = this.$route.meta?.name;
this.active = 0;
this.checkMod(0);
}
formatLabel(item:any) {
if (item.flag == '1') {
return item.labelValue;
} else if (item.flag == '2') {
return item.types;
} else return;
}
//客户提供担保情况(个贷+信贷)
getInfoa() {
this.test = '1';
const parm = {
tc: nettyApi.TRADE_CODE.selectDBQK,
cus_id: this.$store.getters.getCusInfo.cus_id
};
NativeUI.showWaiting('正在查询....');
this.$IF.transferDataInter(nettyApi.commonRq, parm).then((res:any) => {
NativeUI.closeWaiting();
this.array.children = [];
if (res.rc == '1') {
if (res.cus_grt_list != '') {
for (let obj of res.cus_grt_list) {
let newobj:any = {};
newobj.name = obj.borrower_name;
newobj.labelValue = obj.gage_way_union_cn;
newobj.labelShow = true;
newobj.flag = '1';
this.array.children.push(newobj);
this.treeData = this.array;
}
} else {
this.treeData = this.array;
}
} else {
this.treeData = this.array;
NativeUI.toast(res.msg);
}
});
}
//对公客户提供担保情况(征信)
getInfob() {
this.test = '2';
const parm = {
tc: nettyApi.TRADE_CODE.selectDBQKZX,
cus_id: this.$store.getters.getCusInfo.cus_id
};
NativeUI.showWaiting('正在查询....');
this.$IF.transferDataInter(nettyApi.commonRq, parm).then((res:any) => {
NativeUI.closeWaiting();
this.array.children = [];
if (res.rc == '1') {
if (res.grt_list != '') {
for (let obj of res.grt_list) {
let newObj:any = {};
newObj.types = obj.eb05bd01;
newObj.name = obj.eb05bj01;
newObj.labelShow = true;
newObj.flag = '2';
this.array.children.push(newObj);
}
this.treeData = this.array;
} else {
this.treeData = this.array;
}
} else {
this.treeData = this.array;
NativeUI.toast(res.msg);
}
});
}
//对公客户行内业务担保情况
getInfoc() {
this.test = '3';
const parm = {
tc: nettyApi.TRADE_CODE.selectHNDBQK,
cus_id: this.$store.getters.getCusInfo.cus_id
};
NativeUI.showWaiting('正在查询....');
this.$IF.transferDataInter(nettyApi.commonRq, parm).then((res:any) => {
NativeUI.closeWaiting();
this.array.children = [];
if (res.rc == '1') {
if (res.cus_grt_list != '') {
for (let obj of res.cus_grt_list) {
let objNew:any = {};
objNew.name = obj.guar_name;
objNew.labelValue = obj.gage_way_union_cnName;
objNew.flag = '1';
// objNew.id = ;
objNew.labelShow = true;
this.array.children.push(objNew);
}
this.treeData = this.array;
} else {
this.treeData = this.array;
}
} else {
this.treeData = this.array;
NativeUI.toast(res.msg);
}
});
}
checkMod(index:any) {
if (index == 0) {
this.treeData = {};
this.test = '1';
this.getInfoa();
} else if (index == 1) {
this.test = '2';
this.treeData = {};
this.getInfob();
} else if (index == 2) {
this.treeData = {};
this.test = '3';
this.getInfoc();
}
}
}
</script>
<style scoped>
.guarTabCls {
width: 100%;
}
::v-deep .van-tab{
font-size: 20px;
line-height: 60px;
}
::v-deep .van-cell__title,
::v-deep .van-field__label {
display: flex;
align-items: center;
width: 60%;
}
::v-deep .van-tabs--line .van-tabs__wrap {
width: 80%;
height: 60px;
}
::v-deep .van-tab--active {
border-bottom: 3px solid #FF574C;
font-weight: bold;
color: #FF574C;
}
::v-deep .van-tabs__line {
height: 0;
background-color: white;
}
</style>