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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import buildFn from './buildCommons.js';
import moment from 'moment';
export default {
mixins: [commonFunctions,buildFn],
methods: {
//申报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;
});
}
},
defaultVouflgN1000() {
//2122
//--暂时只有保函开立交易用--
//2017-4人行 要求2122对保函开立交易开放外币申报
if (this.model.gidgrp.cbs.max.cur == "CNY") {
if (this.model.gidgrp.rec.cmtflg == "X") {
this.model.cnybop.vouflg = ""
} else {
this.model.cnybop.vouflg = "2"
}
if (this.model.gidgrp.rec.fingua == "Y") {
this.model.gidgrp.rec.cmtflg = "X"
}
} else {
if (this.model.gidgrp.rec.fingua == "Y") {
this.model.cnybop.vouflg = "1"
} else {
this.model.cnybop.vouflg = "2"
}
}
},
// "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 = '';
}
},
// 获取地区机构号
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;
}
},
// 减额接受
changeAccp(date) {
if(this.isInDisplay){
return;
}
if(this.model.gidgrp.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.gidgrp.rec.expdat) {
// this.model.cfagit.recgrp.bas.maturity = this.model.gidgrp.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 = Number(this.model.gidgrp.cbs.max.amt) + Number(this.model.ameamt);
// this.model.cfagit.recgrp.dcl[0].basere = Number(this.model.gidgrp.cbs.max.amt) + Number(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 = Number(this.model.gidgrp.cbs.max.amt) + Number(this.model.ameamt);
// if(this.model.gidgrp.rec.expdat) {
// this.model.rmbbop.rmb2122.recgrp.ads.vouchenddate = this.model.gidgrp.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");
// }
}
}
}
}
}
},
};