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
import commonFunctions from '~/mixin/commonFunctions.js';
import Api from '~/service/Api';
import commonDepend from "~/mixin/commonDepend";
import moment from 'moment';
import BigNumber from "bignumber.js";
export default {
mixins: [commonFunctions,commonDepend],
methods:{
// model.nidgrp.rec.expflg
// changeExpflg (){
// if (
// this.model.nidgrp.rec.expflg == "X" &&
// this.model.nidgrp.rec.hndtyp == "OC"
// ) {
// this.model.nidgrp.rec.liaflg = "X";
// }
// },
// model.nidgrp.rec.gartyp
changeGartyp (){
if (this.model.nidgrp.rec.gartyp == "1") {
this.model.nidgrp.rec.gtxinr = "<NILTXT>";
}
},
changeCfaflg() {
if((this.model.cfagit.recgrp == null || this.model.cfagit.recgrp.bas.exguarancode == null || this.model.cfagit.recgrp.bas.exguarancode == '') || this.model.ameflg != 'Y') {
this.model.cfagit.cfaflg = '4';
}
},
formatTableData () {
let list = this.model.decstm.rows || []
let resList = []
if (list) {
list.map((item, ind) => {
let tempItem = item.split("\t");
resList.push({
'IDX': ind,
'修改次数': tempItem[0],
'编号': tempItem[1],
'币种': tempItem[2],
'修改金额': tempItem[3],
'修改日期': tempItem[4],
'新有效期': tempItem[5],
'新有效期敞口': tempItem[6]==""?"":"Y",
'新反担保有效期': tempItem[7],
'新反担保有效期敞口': tempItem[8]==""?"":"Y",
'checked': (list.length === 1 || this.model.amenbr == tempItem[0])
})
})
}
if (resList && resList.length === 1) {
this.decstmRowSelected(resList[0])
}
this.$set(this.codes, 'tableData', resList)
},
decstmRowSelected(row) {
if (row === undefined) {
return
}
this.model.amenbr = row.修改次数;
this.model.amecur = row.币种;
this.model.ameamt = row.修改金额;
this.model.amedat = moment(row.修改日期).format("YYYY-MM-DD");
this.model.nidgrp.cbs.max.amt = new BigNumber(this.model.oldnidgrp.cbs.max.amt).plus(new BigNumber(this.model.ameamt)).toFormat(2).replace(/,/g, "");
this.model.nidgrp.cbs.opn1.amt = new BigNumber(this.model.oldnidgrp.cbs.opn1.amt).plus(new BigNumber(this.model.ameamt)).toFormat(2).replace(/,/g, "");
this.model.swiadd.newamt=this.model.nidgrp.cbs.max.amt;
this.model.ameflg = "Y";
this.model.cfagit.dclflg == "X";
if (row.新到期日 == "-"||row.新有效期 == "") {
this.model.swiadd.newexpdat = "";
this.model.nidgrp.rec.expdat = "";
} else {
this.model.swiadd.newexpdat = moment(row.新有效期).format(
"YYYY-MM-DD"
);
this.model.nidgrp.rec.expdat = moment(row.新有效期).format(
"YYYY-MM-DD"
);
this.date = moment(row.新有效期).format("YYYY-MM-DD");
}
this.model.swiadd.newexpflg=(row.新有效期敞口=="Y"?"X":"");
this.model.nidgrp.rec.expflg=(row.新有效期敞口=="Y"?"X":"");
if (row.新反担保有效期 == "-"||row.新反担保有效期 == "") {
this.model.swiadd.newliadat = "";
this.model.nidgrp.rec.liadat = "";
} else {
this.model.swiadd.newliadat = moment(row.新反担保有效期).format(
"YYYY-MM-DD"
);
this.model.nidgrp.rec.liadat = moment(row.新反担保有效期).format(
"YYYY-MM-DD"
);
this.date = moment(row.新反担保有效期).format("YYYY-MM-DD");
}
this.model.swiadd.newliaflg=(row.新反担保有效期敞口=="Y"?"X":"");
this.model.nidgrp.rec.liaflg=(row.新反担保有效期敞口=="Y"?"X":"");
this.changeAccp(this.date);
}
}
}