|
@@ -14,11 +14,11 @@ |
|
@@ -14,11 +14,11 @@ |
14
|
<Input v-model.trim.number="filters.reqNum.model" :maxlength="9"></Input>
|
14
|
<Input v-model.trim.number="filters.reqNum.model" :maxlength="9"></Input>
|
15
|
</FilterItem>
|
15
|
</FilterItem>
|
16
|
<FilterItem :label="filters.createTime.label">
|
16
|
<FilterItem :label="filters.createTime.label">
|
17
|
- <Date-picker type="datetimerange" placeholder="选择日期和时间"
|
17
|
+ <Date-picker v-model="filters.createTime.model" type="datetimerange" placeholder="选择日期和时间"
|
18
|
@on-change="createTimeChange"></Date-picker>
|
18
|
@on-change="createTimeChange"></Date-picker>
|
19
|
</FilterItem>
|
19
|
</FilterItem>
|
20
|
<FilterItem :label="filters.outTime.label">
|
20
|
<FilterItem :label="filters.outTime.label">
|
21
|
- <Date-picker type="datetimerange" placeholder="选择日期和时间"
|
21
|
+ <Date-picker v-model="filters.outTime.model" type="datetimerange" placeholder="选择日期和时间"
|
22
|
@on-change="outTimeChange"></Date-picker>
|
22
|
@on-change="outTimeChange"></Date-picker>
|
23
|
</FilterItem>
|
23
|
</FilterItem>
|
24
|
<FilterItem>
|
24
|
<FilterItem>
|
|
@@ -83,22 +83,33 @@ |
|
@@ -83,22 +83,33 @@ |
83
|
this.page.current = 1;
|
83
|
this.page.current = 1;
|
84
|
},
|
84
|
},
|
85
|
clearFilter() {
|
85
|
clearFilter() {
|
|
|
86
|
+ _.each(this.filters, item => {
|
|
|
87
|
+ item.model = '';
|
|
|
88
|
+ });
|
|
|
89
|
+ this.page.current = 1;
|
|
|
90
|
+ this.page.total = 0;
|
|
|
91
|
+ this.enableFilter = false;
|
|
|
92
|
+ this.returnList(this.filterValues());
|
86
|
},
|
93
|
},
|
87
|
createTimeChange(time) {
|
94
|
createTimeChange(time) {
|
88
|
// 兼容: https://github.com/iview/iview/issues/973
|
95
|
// 兼容: https://github.com/iview/iview/issues/973
|
89
|
if (!_.isArray(time)) {
|
96
|
if (!_.isArray(time)) {
|
90
|
time = time.split(' - ');
|
97
|
time = time.split(' - ');
|
91
|
}
|
98
|
}
|
92
|
- this.filters.bCreateTime.model = +moment(time[0]).format('X');
|
|
|
93
|
- this.filters.eCreateTime.model = +moment(time[1]).format('X');
|
99
|
+ if ((time[0] + '').length) {
|
|
|
100
|
+ this.filters.bCreateTime.model = +moment(time[0]).format('X');
|
|
|
101
|
+ this.filters.eCreateTime.model = +moment(time[1]).format('X');
|
|
|
102
|
+ }
|
94
|
},
|
103
|
},
|
95
|
outTimeChange(time) {
|
104
|
outTimeChange(time) {
|
96
|
// 兼容: https://github.com/iview/iview/issues/973
|
105
|
// 兼容: https://github.com/iview/iview/issues/973
|
97
|
if (!_.isArray(time)) {
|
106
|
if (!_.isArray(time)) {
|
98
|
time = time.split(' - ');
|
107
|
time = time.split(' - ');
|
99
|
}
|
108
|
}
|
100
|
- this.filters.bOutTime.model = +moment(time[0]).format('X');
|
|
|
101
|
- this.filters.eOutTime.model = +moment(time[1]).format('X');
|
109
|
+ if ((time[0] + '').length) {
|
|
|
110
|
+ this.filters.bOutTime.model = +moment(time[0]).format('X');
|
|
|
111
|
+ this.filters.eOutTime.model = +moment(time[1]).format('X');
|
|
|
112
|
+ }
|
102
|
},
|
113
|
},
|
103
|
returnList(params) {
|
114
|
returnList(params) {
|
104
|
const isValid = this.checkParams(params);
|
115
|
const isValid = this.checkParams(params);
|
|
@@ -140,7 +151,7 @@ |
|
@@ -140,7 +151,7 @@ |
140
|
},
|
151
|
},
|
141
|
resolveData(data) {
|
152
|
resolveData(data) {
|
142
|
this.dataList = data.records;
|
153
|
this.dataList = data.records;
|
143
|
- this.page.total = data.total;
|
154
|
+ this.page.total = data.totalCount;
|
144
|
},
|
155
|
},
|
145
|
pageChange(page) {
|
156
|
pageChange(page) {
|
146
|
let params = this.filterValues();
|
157
|
let params = this.filterValues();
|
|
@@ -149,9 +160,6 @@ |
|
@@ -149,9 +160,6 @@ |
149
|
this.page.current = page;
|
160
|
this.page.current = page;
|
150
|
this.returnList(params);
|
161
|
this.returnList(params);
|
151
|
},
|
162
|
},
|
152
|
- selectChange(rows) {
|
|
|
153
|
- this.batchRows = rows;
|
|
|
154
|
- },
|
|
|
155
|
goDetail(row) {
|
163
|
goDetail(row) {
|
156
|
const returnId = row.returnedSupplierId;
|
164
|
const returnId = row.returnedSupplierId;
|
157
|
const supplierId = row.supplierId;
|
165
|
const supplierId = row.supplierId;
|
|
@@ -195,7 +203,7 @@ |
|
@@ -195,7 +203,7 @@ |
195
|
temp.push(`${key}=${val}`);
|
203
|
temp.push(`${key}=${val}`);
|
196
|
});
|
204
|
});
|
197
|
|
205
|
|
198
|
- window.open(`/Api/erp/allotExportList?${temp.join('&')}`, '_blank');
|
206
|
+ window.open(`/Api/erp/exportProductReturnList?${temp.join('&')}`, '_blank');
|
199
|
},
|
207
|
},
|
200
|
exportOne(id) {
|
208
|
exportOne(id) {
|
201
|
window.open(`/Api/erp/exportProductReturnList?returnedSupplierId=${id}`, '_blank');
|
209
|
window.open(`/Api/erp/exportProductReturnList?returnedSupplierId=${id}`, '_blank');
|