Commit 8b8cd68e by LJM

bug

parent 432ab023
Showing with 12 additions and 2 deletions
......@@ -128,13 +128,16 @@ export default {
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.stock_out_sn = '';
if (val) {
this.input_flag = true;
this.searchParams.stock_out_sn = val;
} else {
this.input_flag = false;
}
y;
this.getData();
}, 500),
/**
......@@ -166,7 +169,7 @@ export default {
getData() {
this.request(API.getTakedList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.total > 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
......@@ -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