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
| <template>
| <div>
| <FormInfo :info="info" :keys="esckrdHeaderKeyArr" title="额度信息" :loading="loading"></FormInfo>
| </div>
| </template>
|
| <script>
| // 授信额度信息
| import {
| queryCustomerQuotaInfo, //查询应收账款数据
| getDictionaryList, //请求字段选择项
| } from "@/api/product";
| import FormInfo from "../FormInfo";
|
| import { flownos } from "@comprehensive/utils/comm";
|
| export default {
| props: {
| // 申请编号
| serialNo: {
| type: String,
| required: true,
| },
| objectType: {
| type: String,
| default: "",
| },
| customerID: {
| type: String,
| default: "",
| },
| flowno: {
| type: String,
|
| // 默认为案场
| default: "CreditFlowPublic",
| },
| },
| components: {
| FormInfo,
| },
| data() {
| return {
| info: {}, //接口获取到的参数为值
| loading: false, //是否loading
| esckrdHeaderKeyArr: [
| {
| label: '总授信额度',
| field: 'productCreditAmt',
| isMoney:true
| },
| {
| label: '已使用额度',
| field: 'creditUsedAmt',
| isMoney:true
| },
| {
| label: '系统占用额度',
| field: 'businesssum',
| isMoney:true
| },
| {
| label: '剩余额度',
| field: 'creditRemainAmt',
| isMoney:true
| },
| ],
| };
| },
|
| created() {
| this.getqueryCustomerQuotaInfo();
| },
|
| methods: {
| async getqueryCustomerQuotaInfo(){
| this.loading = true;
| const data = await queryCustomerQuotaInfo({applyserialno:this.serialNo});
| this.info = data.result
| console.log('11',this.info)
| this.loading = false;
| },
| //获取授信额度信息
| async getCreditorInfo() {
| this.loading = true;
| const { serialNo } = this;
| const res = await qryCreditorInfo({
| applySerialNo: serialNo,
| });
| this.billtypeArr = await this.qryDictionaryList("AccountsCertType");
| this.loading = false;
|
| const { result } = res;
| const { creditorBills, ...other } = result;
| this.info = other;
| this.productId = result.productId.value
| let tempBills = creditorBills;
| tempBills.forEach((item) => {
| //金额格式化
| // item.billsum = this.formatMoney(item.billsum);
| //对应收账款凭证类型转译
| this.billtypeArr.map((typeItem) => {
| if (item.billtype == typeItem.itemno) {
| item.billtypeDesc = typeItem.itemname
| }
| });
| });
| this.creditorBills = tempBills;
| },
| qryDictionaryList(code) {
| return new Promise((resolve) => {
| getDictionaryList({
| codeNo: code,
| }).then((res) => {
| resolve(res.result);
| });
| });
| },
| // 金额格式化
| formatMoney(value) {
| if (value) {
| value =
| parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
| if (value == "NaN") return;
| let l = value.split(".")[0].split("").reverse();
| let r = value.split(".")[1];
| let t = "";
| for (let i = 0; i < l.length; i++) {
| t += l[i] + ((i + 1) % 3 === 0 && i + 1 !== l.length ? "," : "");
| }
| return t.split("").reverse().join("") + "." + r;
| }
| },
| },
| watch: {
| serialNo() {
| this.getqueryCustomerQuotaInfo();
| },
| },
| };
| </script>
|
| <style lang="postcss" scoped>
| .apply {
| & >>> .el-dialog__body {
| padding-top: 10px;
| }
| & >>> .comm-dialog {
| width: 1200px;
| }
| & >>> .hint-remark .input {
| color: #f40;
| font-weight: bold;
| }
| }
| </style>
|
|