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
import commonFunctions from '~/mixin/commonFunctions.js';
import Api from '~/service/Api';
import moment from 'moment';
import BigNumber from "bignumber.js";
export default {
mixins: [commonFunctions],
methods: {
// 业务信息=》基本信息=》保函编号-----获取保函编号
queryOwnref () {
let params = this.model.nidgrp.rec
if (!this.model.nidgrp.apl.pts.ptainr) {
return
}
let ptainr = this.model.nidgrp.apl.pts.ptainr;
const loading = this.loading();
Api.post(`/business/ref/nid?ptaInr=${ptainr}`, params).then(res => {
loading.close();
if (res.respCode == SUCCESS) {
this.model.nidgrp.rec.ownref = res.data;
}
}).catch(() => {
loading.close();
});
},
defaultVouflgN1000() {
//2122
//--暂时只有保函开立交易用--
//2017-4人行 要求2122对保函开立交易开放外币申报
if (this.model.nidgrp.cbs.max.cur == "CNY") {
if (this.model.nidgrp.rec.cmtflg == "X") {
this.model.cnybop.vouflg = ""
} else {
this.model.cnybop.vouflg = "2"
}
if (this.model.nidgrp.rec.fingua == "Y") {
this.model.nidgrp.rec.cmtflg = "X"
}
} else {
if (this.model.nidgrp.rec.fingua == "Y") {
this.model.cnybop.vouflg = "1"
} else {
this.model.cnybop.vouflg = "2"
}
}
},
// 获取地区机构号
async getOwnExtkeyCondition1() {
let body = {ownExtKey: ""};
if(this.model.cfagit.ownextkey) {
body.ownExtKey = this.model.cfagit.ownextkey;
}
let res = await Api.post('/business/bch/getBranchListByownExtKey', body);
if (res.respCode === SUCCESS) {
this.ownExtkeyList = res.data;
}
},
//申报2122报文
query2122() {
let trnName = this.root ? this.root.trnName : this.trnName
if(this.model.rmbbop.rmb2122.rmbflg == '1') {
let rmbbop = this.buildRobbop(this.model, trnName);
Api.post('/business/rmbbopgid/rmbbop2122Cal', rmbbop).then(res => {
this.model.rmbbop.rmb2122 = res.data.rmb2122;
});
}
},
// "cfagit.cfaflg"
onCfaflg(e) {
if(e == undefined) {
return
}
switch (this.model.cfagit.cfaflg) {
case "1":
this.model.cfagit.basflg = 'X';
this.model.cfagit.dclflg = 'X';
// if (!this.model.cfagit.ownextkey) {
// this.ownextkey = this.codes.ownextkey1;
// this.model.cfagit.ownextkey = this.codes.ownextkey1[0].value;
// // this.ownextkey= getValues('cfagit.ownextkey','ownextkey1');
// }
break;
case "2":
this.model.cfagit.basflg = 'X';
if(this.model.ameamt) {
this.model.cfagit.dclflg = 'X';
}else {
this.model.cfagit.dclflg = '';
}
break;
case "3":
this.model.cfagit.basflg = '';
this.model.cfagit.dclflg = 'X';
break;
case "5":
this.model.cfagit.vrfflg = 'X';
this.model.cfagit.dclflg = 'X';
break;
default:
this.model.cfagit.basflg = '';
this.model.cfagit.vrfflg = '';
this.model.cfagit.dclflg = '';
}
},
// 减额接受
changeAccp(date) {
if(this.isInDisplay){
return;
}
if(this.model.nidgrp.rec.fingua=='Y') {
if(this.model.ameamt > 0) {
if(this.model.cfagit.recgrp != null && this.model.cfagit.recgrp.bas.exguarancode != null && this.model.cfagit.recgrp.bas.exguarancode != '') {
this.model.cfagit.cfaflg = '4';
}
if(this.model.rmbbop.rmb2122.recgrp.ads.levyno != null && this.model.rmbbop.rmb2122.recgrp.ads.levyno != "") {
this.model.rmbbop.rmb2122.rmbflg = '2';
}
} else {
// 对外担保
if(this.model.cfagit.recgrp != null && this.model.cfagit.recgrp.bas.exguarancode != null && this.model.cfagit.recgrp.bas.exguarancode != '') {
if(this.model.cfagit.recgrp.bas.exguarancode) {
this.model.cfagit.cfaflg = '2';
// if(this.model.nidgrp.rec.expdat) {
// this.model.cfagit.recgrp.bas.maturity = this.model.nidgrp.rec.expdat;
// } else {
// this.model.cfagit.recgrp.bas.maturity = moment(this.model.cfagit.recgrp.bas.contractdate).add(20, "years").format("YYYY-MM-DD");
// }
if(this.model.cfagit.recgrp.bas.sta == 'S') {
this.model.cfagit.recgrp.bas.actiontype = "C";
} else {
this.model.cfagit.recgrp.bas.actiontype = "A";
}
this.model.cfagit.basflg = 'X';
if(this.model.cfagit.recgrp.dcl == null || this.model.cfagit.recgrp.dcl.length == 0) {
var a = [{
exguarancode: "",
actiontype: "",
wabachandate: "",
basere: "",
remark: "",
actiondesc: "",
acp: "",
}];
this.model.cfagit.recgrp.dcl = a;
}
if(this.model.ameamt) {
this.model.cfagit.dclflg = 'X';
// this.model.cfagit.recgrp.dcl[0].actiontype = 'A';
// this.model.cfagit.recgrp.dcl[0].wabachandate = moment(new Date()).format('YYYY-MM-DD');
// this.model.cfagit.recgrp.bas.guaranamount = new BigNumber(this.model.nidgrp.cbs.max.amt) .plus(new BigNumber(this.model.ameamt));
// this.model.cfagit.recgrp.dcl[0].basere = new BigNumber(this.model.nidgrp.cbs.max.amt) .plus( new BigNumber(this.model.ameamt));
// this.model.cfagit.recgrp.dcl[0].exguarancode = this.model.cfagit.recgrp.bas.exguarancode;
// this.model.cfagit.recgrp.dcl[0].acp = 'X';
} else {
this.model.cfagit.dclflg = '';
}
}
}
// 人民币
if(this.model.rmbbop.rmb2122.recgrp.ads.levyno != null && this.model.rmbbop.rmb2122.recgrp.ads.levyno != "") {
if(this.model.rmbbop.rmb2122.recgrp.ads.levyno) {
this.model.rmbbop.rmb2122.rmbflg = '1';
this.model.rmbbop.rmb2122.recgrp.ads.opertype = '2';
// this.model.rmbbop.rmb2122.recgrp.ads.vouchamt = new BigNumber(this.model.nidgrp.cbs.max.amt) .plus(new BigNumber(this.model.ameamt));
// if(this.model.nidgrp.rec.expdat) {
// this.model.rmbbop.rmb2122.recgrp.ads.vouchenddate = this.model.nidgrp.rec.expdat;
// } else {
// this.model.rmbbop.rmb2122.recgrp.ads.vouchenddate = moment(this.model.rmbbop.rmb2122.recgrp.ads.vouchefficientdate).add(20, "years").format("YYYY-MM-DD");
// }
}
}
}
}
},
},
};