index.js
3.43 KB
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
import commonFunctions from '~/mixin/commonFunctions.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();
});
},
defaultNidgrpRecExpdatN1002(val){
if(val == 'N'){
this.model.nidgrp.rec.expdat = this.model.nidgrp.rec.olddat;
}
},
// 减额接受
changeAccp(date) {
if(this.isInDisplay){
return;
}
if(this.model.nidgrp.rec.fingua=='Y') {
// 对外担保
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");
}
this.model.cfagit.recgrp.bas.actiontype = 'C';
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.nidgrp.cbs.max.amt) + Number(this.model.ameamt);
this.model.cfagit.recgrp.dcl[0].basere = Number(this.model.nidgrp.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.nidgrp.cbs.max.amt) + Number(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");
}
}
}
}
},
},
};