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
import Api from "~/service/Api"
import Utils from "~/utils"
import commonFunctions from '~/mixin/commonFunctions.js';
import moment from 'moment'
export default {
mixins: [commonFunctions],
methods: {
async handleSearch() {
if (this.model.opndatfrom == null) {
this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
return;
}
if (this.model.opndatto == null) {
this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
return;
}
if(new Date(this.model.opndatfrom).getTime() > new Date(this.model.opndatto).getTime()){
this.$notify.error({ title: '错误', message: '开始日期应小于结束日期!' });
return
}
if(this.model.seasta != '' && this.model.seaauthorized == ''){
this.$notify.error({ title: '错误', message: '选择Status时请先选择 是否已授权!' });
return
}
if(this.model.searol != '' && (this.model.ptyExtkey == '' && this.model.seapty == '') ){
this.$notify.error({ title: '错误', message: '选择角色时请先输入 当事人编号 或者 当事人名称/BIC编码!' });
return
}
if(this.model.seacur == '' && (this.model.seaamtfr > 0 || this.model.seaamtto > 0)){
this.$notify.error({ title: '错误', message: '输入金额前请先选择 币种!' });
return
}
if((this.model.seaamtfr > 0 && this.model.seaamtto > 0) && (this.model.seaamtfr > this.model.seaamtto)){
this.$notify.error({ title: '错误', message: '起始金额不能大于结束金额!' });
return
}
// // 前端检验
// this.$refs['paramsForm'].validate(async (validStatic) => {
// if (validStatic) {
const loading = this.loading();
this.load = true;
this.model.branch = JSON.parse(sessionStorage.getItem('currentOrg')).departmentNumber
let rtnmsg = await Api.post("/business/infncd/queryInfncd",
{
...this.model,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize
});
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.tableData = rtnmsg.data.list || [];
this.pagination = {
pageNum: rtnmsg.data.pageNum || 1,
pageSize: rtnmsg.data.pageSize || 10,
total: rtnmsg.data.total
};
}
loading.close();
// } else {
// // 前端校验失败
// this.$notify({
// title: '失败',
// message: '校验失败',
// type: 'error',
// });
// }
// })
},
handleReset() {
this.model.seaownref = "";
this.model.isGuarantee = "";
this.model.nam = "";
this.model.ptyExtkey = "";
this.model.seapty = "";
this.model.searef = "";
this.model.ptyNam = "";
this.model.searol = "";
this.model.usrExtkey = "";
this.model.seasta = "";
this.model.seacur = "";
this.model.seaamtfr = "";
this.model.seaamtto = "";
this.model.seagtyp = "";
this.model.relflg = "";
this.model.segtyp = "";
this.model.seaauthorized = "";
this.ptyExtkeyChange();
this.seaptyChange();
},
async exportExcel(){
const loading = this.loading();
let res = await Api.post("/business/infncd/exportExcel",{
...this.model,
// pageNum: this.pagination.pageNum,
// pageSize: this.pagination.pageSize
});
if (res.respCode == SUCCESS) {
let name=moment(new Date()).format('yyyy-MM-DD HH:mm:ss') ;
Utils.exportToExcel (res.data, "索偿查询"+name+".xlsx", "索偿查询") ;
}
loading.close();
},
}
}