index.js
2.4 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
import Api from '~/service/Api';
import moment from 'moment';
export default {
methods: {
async handleReset() {
this.model.chkinc = '';
this.model.chkdzt = '';
this.model.chkpen = '';
this.model.chkcor = '';
this.model.chkaut = '';
this.model.chkdel = '';
this.model.chktco = '';
this.model.chkcan = '';
this.model.selobj = '';
this.model.seltxt = '';
this.model.usfmod.flt = '';
this.model.inidatfro = '';
this.model.inidattil = '';
this.model.dflg = '1';
this.model.chkypt = '';
this.model.yptinf = '';
},
//点击查询按钮时,判断“来源”是否有数据
async handleSearch() {
console.log('this', this.sourceList);
if (!this.sourceList.length) {
this.$notify.error({ title: '错误', message: '来源不能为空!' });
return;
}
const params = {
...this.model,
sourceList: this.sourceList,
userId: window.sessionStorage.userId || 'ZL',
pageSize: this.pagination.pageSize,
pageNo: this.pagination.pageIndex,
inidatfro: moment(this.model.inidatfro).format('YYYY-MM-DD'),
inidattil: moment(this.model.inidattil).format('YYYY-MM-DD'),
};
const res = await Api.post('/service/sptsel/list', params);
if (res.respCode === SUCCESS) {
this.stmData.data = res.data.records;
this.pagination.total = res.data.total;
this.$store.commit('setTaskList', {
key: 'sptsel',
val: this.stmData.data.length,
});
}
},
async onDetails(idx, row) {
let inr = row.inr;
this.$router.push({ path: 'business-new/sptpopup', query: { inr: inr } });
},
async continueEdit(row, scope) {
this.updateToHandleRowData({
...this.toHandleRowData,
[`row_${row.frm.toLowerCase()}`]: row
})
let trnName = row.frm.toLowerCase();
this.$router.push({
path: 'business-new/' + trnName,
params: { prePageId: this.model.pageId },
});
},
// pageSize改变
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pagination.pageIndex = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pagination.pageIndex = val;
this.handleSearch();
},
},
};