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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
import commonFunctions from '~/mixin/commonFunctions.js';
import buildFn from '../event/buildCommons.js';
import Api from '~/service/Api';
import Pts from '~/components/business/commonModel/Pts';
import Utils from '~/utils';
export default {
mixins: [commonFunctions, buildFn],
methods: {
//索赔编号
queryOwnref () {
let params = this.model.gcdgrp.rec
if (!this.model.gcdgrp.apl.pts.ptainr) {
return
}
let ptainr = this.model.gcdgrp.apl.pts.ptainr;
const loading = this.loading();
Api.post(`/business/ref/gcd?ptaInr=${ptainr}`, params).then(res => {
loading.close();
if (res.respCode == SUCCESS) {
this.model.gcdgrp.rec.ownref = res.data;
}
}).catch(() => {
loading.close();
});
},
// 此方法为了占位使用,为了后续替换成对应的change方法
queryFormData (key) { },
changeFreFlg () {
if (this.model.gcdgrp.rec.frepayflg == 'X') {
if (this.model.gidgrp.rec.cmtflg == 'X') {
this.model.cmtflg = 'O';
}
this.model.paypsb = '';
}
if (!!this.model.gcdgrp.rec.frepayflg || this.model.gidgrp.rec.hndtyp == 'OT') {
this.model.paypsb = '';
}
},
changeTrnmodCmtflg () {
if (this.model.cmtflg != "P") {
this.model.swftyp = ''
}
if (this.model.cmtflg == 'P') {
this.model.swftyp = 'CIV'
this.model.cipmodVo.bustyp = "FTFX"
this.model.cipmodVo.commen = this.model.gidgrp.rec.ownref
}
},
calcName () {
this.model.gcdgrp.rec.nam = this.model.gcdgrp.cbs.max.cur + " " + this.model.gcdgrp.cbs.max.amt + " " + this.model.gcdgrp.apl.pts.nam;
this.model.gcdgrp.rec.nam = this.model.gcdgrp.rec.nam.slice(0, 40);
},
gcdgrpBenRefBlur () {
if (this.model.gcdgrp.rec.docprbrol == "BEN") {
this.model.gcdgrp.prb.pts.ref = this.model.gcdgrp.ben.pts.ref;
}
},
gcdgrpPrbRefBlur () {
if (this.model.gcdgrp.rec.docprbrol == "BEN") {
this.model.gcdgrp.ben.pts.ref = this.model.gcdgrp.prb.pts.ref;
}
},
// gcdgrp.rec.docprbrol
calcPrb () {
console.log("this.model.gcdgrp.rec.docprbrol-->" + this.model.gcdgrp.rec.docprbrol);
switch (this.model.gcdgrp.rec.docprbrol) {
case "ADV":
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, this.model.gidgrp.adv.pts);
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
case "BEN":
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, this.model.gidgrp.ben.pts);
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
case "ISS":
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, this.model.gidgrp.iss.pts);
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
case "ATB":
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, this.model.gidgrp.atb.pts);
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
case "AT2":
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, this.model.gidgrp.at2.pts);
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
default:
Utils.copyValueFromVoData(this.model.gcdgrp.prb.pts, "");
this.model.gcdgrp.prb.pts.rol = "PRB";
break;
}
},
// gcdgrp.rec.payrol
calcOth () {
switch (this.model.gcdgrp.rec.payrol) {
case "APL":
Utils.copyValueFromVoData(this.model.gcdgrp.oth.pts, this.model.gidgrp.apl.pts);
this.model.gcdgrp.oth.pts.rol = "OTH";
break;
default:
Utils.copyValueFromVoData(this.model.gcdgrp.oth.pts, new Pts());
this.model.gcdgrp.oth.pts.extkey = ''
this.model.gcdgrp.oth.pts.enadr = ''
this.model.gcdgrp.oth.pts.ennam = ''
this.model.gcdgrp.oth.pts.rol = "OTH";
break;
}
},
changeLimitbody (emitParams) {
let limitbodyRequest = buildFn.buildLimitbody(this.model, this.trnName);
switch (emitParams.code) {
case 'trial':
this.trialLimitbody(limitbodyRequest);
break
case 'query':
this.queryLimitbody(limitbodyRequest);
break
default:
return
}
},
query2111 () {
let trnName = this.root.trnName.toUpperCase()
if (this.model.rmbbop.rmb2111.rmbflg == '1') {
let rmbbop = this.buildRobbop(this.model, trnName);
Api.post('/business/rmbbopgcd/rmbbop2111Cal', rmbbop).then(res => {
Utils.copyValueFromVoData(this.model.rmbbop.rmb2111, res.data.rmb2111);
this.model.rmbbop.rmb2111.recgrp.ads.opertype = '1';
});
} else {
this.model.rmbbop.rmb2111.newnum = 0;
}
},
//申报2123报文
query2123 () {
let trnName = this.root ? this.root.trnName : this.trnName
if (this.model.rmbbop.rmb2123.rmbflg == '1') {
let rmbbop = this.buildRobbop(this.model, trnName);
Api.post('/business/rmbbopgcd/rmbbop2123Cal', rmbbop).then(res => {
Utils.copyValueFromVoData(this.model.rmbbop.rmb2123, res.data.rmb2123);
this.model.rmbbop.rmb2123.recgrp.ads.opertype = '1';
});
}
},
changePaypsb () {
if (!this.model.paypsb && this.model.gcdgrp.cbs.opn1.amt == this.model.setmod.docamt) {
this.model.clsflg = 'C';
this.isDisabled = true;
} else {
this.model.clsflg = 'O';
this.isDisabled = false;
}
},
// 获取地区机构号
async getOwnExtkeyCondition () {
const loading = this.loading();
let res = await Api.post('/business/nitopnRule/getOwnExtkeyCondition');
loading.close();
if (res.respCode === SUCCESS) {
this.ownExtkeyList = res.data;
}
},
changeCmtflg () {
if (this.model.gidgrp.rec.cmtflg != 'X') {
this.model.cmtflg = '';
} else {
if (this.model.gcdgrp.rec.frepayflg == 'X') {
this.model.cmtflg = 'O';
}
}
},
changeIschktyp () {
if (this.model.ischktyp == 'N') {
this.model.prechkdat = '';
}
},
resetCipmod () {
if (this.model.cipmodVo.covflg == '' || this.model.swftyp != 'P') {
this.model.cipmodVo.cfkkhh = ''
this.model.cipmodVo.cfkkhm = ''
this.model.cipmodVo.cfkrzh = ''
this.model.cipmodVo.cfkrmc = ''
this.model.cipmodVo.cfkdz1 = ''
this.model.cipmodVo.cfkdz2 = ''
this.model.cipmodVo.cfkdz3 = ''
this.model.cipmodVo.cfkdz4 = ''
this.model.cipmodVo.cfkdz5 = ''
this.model.cipmodVo.cfkdz6 = ''
this.model.cipmodVo.cfkdz7 = ''
this.model.cipmodVo.cskkhh = ''
this.model.cipmodVo.cskkhm = ''
this.model.cipmodVo.cskrzh = ''
this.model.cipmodVo.cskrmc = ''
this.model.cipmodVo.cskdz1 = ''
this.model.cipmodVo.cskdz2 = ''
this.model.cipmodVo.cskdz3 = ''
this.model.cipmodVo.cskdz4 = ''
this.model.cipmodVo.cskdz5 = ''
this.model.cipmodVo.cskdz6 = ''
this.model.cipmodVo.cskdz7 = ''
this.model.cipmodVo.czjjg1 = ''
this.model.cipmodVo.czj1mc = ''
this.model.cipmodVo.covfuy = ''
this.model.cipmodVo.covfy2 = ''
this.model.cipmodVo.covfy3 = ''
this.model.cipmodVo.covfy4 = ''
}
},
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';
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 = '';
}
if (this.model.cfagit.cfaflg === "5") {
this.getCfap()
}
},
getCfap () {
let trnName = this.root ? this.root.trnName : this.trnName;
if (this.model.cfagit.cfaflg === '5') {
let cfap = this.buildCfap(this.model, trnName);
if (cfap.recgrp.dcl == null || cfap.recgrp.dcl.length == 0) {
var a = [{
exguarancode: "",
actiontype: "",
wabachandate: "",
basere: "",
remark: "",
actiondesc: "",
acp: "",
}];
cfap.recgrp.dcl = a;
}
if (cfap.recgrp.vrf == null || cfap.recgrp.vrf.length == 0) {
var b = [{
exguarancode: '',
complianceno: '',
actiontype: '',
actiondesc: '',
guarantorcode: '',
buscode: '',
bencode: '',
bename: '',
benamen: '',
guperdate: '',
gupercurr: '',
guperamount: '',
pguperamount: '',
remark: '',
acp: '',
}];
cfap.recgrp.vrf = b;
}
Api.post('/business/gcd/cfaMapping', cfap).then(res => {
if (res.respCode === SUCCESS) {
this.model.cfagit.recgrp = res.data.recgrp;
if (res.data.ownextkey) {
this.model.cfagit.ownextkey = res.data.ownextkey;
}
this.model.cfagit.cfatyp = "S";
this.model.cfagit.recgrp.vrf[0].actiontype = "A";
this.model.cfagit.recgrp.vrf[0].acp = "X";
this.model.cfagit.recgrp.dcl[0].actiontype = "A";
this.model.cfagit.recgrp.dcl[0].acp = "X";
}
});
}
},
changeGcdOpn1(){
if(Number(this.model.gcdgrp.cbs.opn1.amt) != Number(this.model.gcdgrp.cbs.max.amt)){
this.model.clsflg = "O";
}
},
},
};