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
import {getDectyp, init, initSpt, resolveResponse, save, saveSpt} from "../../../../../../service/business/rmb";
import Utils from "../../../../../../utils";
import commonFunctions from "../../../../../../mixin/commonFunctions";
export default {
mixins: [commonFunctions],
methods: {
saveTfb() {
this.$refs['modelForm'].validate(async (validStatic) => {
if (validStatic) {
const businessType = this.$route.query.businessType;
if (businessType && businessType === "SPT") {
const sptInr = this.$route.query.businessInr;
saveSpt('rmb2103', this.model, sptInr).then(response => {
resolveResponse.bind(this)(response);
});
} else {
save('rmb2103', this.model).then(response => {
resolveResponse.bind(this)(response);
});
}
} else {
// 前端校验失败
this.$notify({
title: '失败',
message: '校验失败',
type: 'error',
});
}
})
},
init(transName, pblInr) {
this.model.pblmod.dectyp = getDectyp(transName);
this.model.pblmod.wrkpbl.inr = pblInr;
init('rmb2103', this.model).then(response => {
if (response.respCode === SUCCESS) {
Utils.copyValueFromVoData(this.model, response.data);
}
})
},
initSpt(sptInr) {
initSpt('rmb2103', this.model, sptInr).then(response => {
if (response.respCode === SUCCESS) {
Utils.copyValueFromVoData(this.model.recgrp, response.data.recgrp);
}
})
},
}
}