|
|
@ -59,7 +59,7 @@ export default { |
|
|
|
total:0, |
|
|
|
total:0, |
|
|
|
pagesList: [], |
|
|
|
pagesList: [], |
|
|
|
page:1, |
|
|
|
page:1, |
|
|
|
limit:10, |
|
|
|
limit:20, |
|
|
|
warehouse_id:null, |
|
|
|
warehouse_id:null, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -80,9 +80,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
methods:{ |
|
|
|
methods:{ |
|
|
|
refrenshHandle(){ |
|
|
|
refrenshHandle(){ |
|
|
|
uni.redirectTo({ |
|
|
|
|
|
|
|
url: '/pages/qianggou/productList?page='+this.page //写你的路径 |
|
|
|
this.getGoodsList() |
|
|
|
}); |
|
|
|
// uni.redirectTo({ |
|
|
|
|
|
|
|
// url: '/pages/qianggou/productList?page='+1 //写你的路径 |
|
|
|
|
|
|
|
// }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
backHandle(){ |
|
|
|
backHandle(){ |
|
|
|
uni.switchTab({ |
|
|
|
uni.switchTab({ |
|
|
@ -91,11 +93,11 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
getGoodsList(){ |
|
|
|
getGoodsList(){ |
|
|
|
this.pagesList=[] |
|
|
|
this.pagesList=[] |
|
|
|
getGoodsList({page:this.page,limit:10,warehouse_id:this.warehouse_id}).then(res=>{ |
|
|
|
getGoodsList({page:this.page,limit:20,warehouse_id:this.warehouse_id}).then(res=>{ |
|
|
|
this.goodsList = res.data.data; |
|
|
|
this.goodsList = res.data.data; |
|
|
|
this.total = res.data.total; |
|
|
|
this.total = res.data.total; |
|
|
|
|
|
|
|
|
|
|
|
for(let i=0;i<Math.ceil(this.total/10);i++){ |
|
|
|
for(let i=0;i<Math.ceil(this.total/res.data.per_page);i++){ |
|
|
|
this.pagesList.push({ |
|
|
|
this.pagesList.push({ |
|
|
|
name:`第${i+1}页` |
|
|
|
name:`第${i+1}页` |
|
|
|
}) |
|
|
|
}) |
|
|
|