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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import buildFn from './buildCommons.js';
import moment from 'moment';
import BigNumber from 'bignumber.js';
export default {
mixins: [commonFunctions],
methods: {
buildLiaccv () {
let params = {
...buildFn.buildCommonData(this.model, this.trnName),
liaccvg: this.model.liaccv.liaccvg,
oldamt: this.model.liaccv.oldamt,
chgamt: this.model.liaccv.chgamt,
concur: this.model.liaccv.concur,
};
return params
},
// 公共组件setmod处理方式改变触发联动
changeSetmodModel (emitParams) {
let reqParams = {}
switch (emitParams.code) {
case 'processMethods':
reqParams = buildFn.buildSetglg(this.model, this.trnName);
this.calcPayDetail(reqParams)
break
case 'changeDsp':
let index = emitParams.index;
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
setglgRequest.setglg = {setgll: emitParams.list};
this.setgllAccts(setglgRequest, index);
break
default:
return
}
},
changeDocamt() {
if (this.model.bodgrp.rec.focflg) {
this.model.setmod.redamt = this.model.setmod.docamt
}
if (new BigNumber(this.model.setmod.docamt).comparedTo(new BigNumber(this.model.bodgrp.cbs.max.amt)) >= 0) {
this.model.clsflg = 'X'
this.model.bodgrp.rec.docsta = 'E';
this.model.bodgrp.rec.clsdat = moment(new Date()).format("YYYY-MM-DD");
} else {
this.model.clsflg = ''
this.model.bodgrp.rec.clsdat = ""
if (this.model.bodgrp.rec.predat) {
this.model.bodgrp.rec.docsta = 'A';
}
if (this.model.bodgrp.rec.opndat) {
this.model.bodgrp.rec.docsta = 'B';
}
if (this.model.bodgrp.rec.focflg) {
this.model.bodgrp.rec.docsta = 'D';
}
}
},
changeFocflg() {
if (this.model.bodgrp.rec.focflg) {
this.model.setmod.redamt = this.model.setmod.docamt;
if (!this.model.clsflg == 'X') {
this.model.bodgrp.rec.docsta = 'D';
} else {
this.model.bodgrp.rec.docsta = 'E';
}
} else {
this.model.setmod.redamt = 0;
if (this.model.bodgrp.rec.predat) {
this.model.bodgrp.rec.docsta = 'A';
}
if (this.model.bodgrp.rec.opndat) {
this.model.bodgrp.rec.docsta = 'B';
}
if (this.model.clsflg == 'X') {
this.model.bodgrp.rec.docsta = 'E';
}
}
},
changeClsdat() {
if (this.model.clsflg == 'X') {
this.model.bodgrp.rec.clsdat = moment(new Date()).format('yyyy-MM-DD')
this.model.bodgrp.rec.docsta = 'E';
} else {
this.model.bodgrp.rec.clsdat = '';
if (this.model.bodgrp.rec.predat) {
this.model.bodgrp.rec.docsta = 'A';
}
if (this.model.bodgrp.rec.opndat) {
this.model.bodgrp.rec.docsta = 'B';
}
if (this.model.bodgrp.rec.focflg) {
this.model.bodgrp.rec.docsta = 'D';
}
}
},
},
};