Commit 8b8cd68e by LJM

bug

parent 432ab023
Showing with 12 additions and 2 deletions
...@@ -128,13 +128,16 @@ export default { ...@@ -128,13 +128,16 @@ export default {
* @param {Object} event * @param {Object} event
*/ */
handleInput: debounce(function(event) { handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value; var val = event.target.value;
this.searchParams.stock_out_sn = '';
if (val) { if (val) {
this.input_flag = true; this.input_flag = true;
this.searchParams.stock_out_sn = val;
} else { } else {
this.input_flag = false; this.input_flag = false;
} }
y;
this.getData(); this.getData();
}, 500), }, 500),
/** /**
...@@ -166,7 +169,7 @@ export default { ...@@ -166,7 +169,7 @@ export default {
getData() { getData() {
this.request(API.getTakedList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getTakedList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data.total > 0) { if (res.data.list.length > 0) {
this.hasMoreData = true; this.hasMoreData = true;
this.list = this.list.concat(res.data.list); this.list = this.list.concat(res.data.list);
} else { } else {
...@@ -179,6 +182,13 @@ export default { ...@@ -179,6 +182,13 @@ export default {
}); });
} }
}); });
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment