|
|
@ -54,7 +54,7 @@ |
|
|
|
<view class="container flex"> |
|
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
<scroll-view scroll-y> |
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
|
<view class="card" v-for="(v,k) in list" :key="k" @click="toSpecs(v)"> |
|
|
|
<view class="name"> |
|
|
|
<text>{{v.goodsType}}</text> <text>{{v.substanceName}}</text> <text class="plant-youbian"/> |
|
|
@ -76,7 +76,7 @@ export default { |
|
|
|
baseId: this.$store.state.plantBaseInfoId, |
|
|
|
pageNo:1, |
|
|
|
flagGroupBy:'y', |
|
|
|
pageSize:6, |
|
|
|
pageSize:7, |
|
|
|
search:"", |
|
|
|
}, |
|
|
|
list:[], |
|
|
@ -95,21 +95,23 @@ export default { |
|
|
|
this.searchVal.pageNo=1 |
|
|
|
}, |
|
|
|
async search(){ |
|
|
|
var res=await request("/api/Inventory/queryCollectingList",{ |
|
|
|
method:"post", |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.records) |
|
|
|
this.total=res.data.total |
|
|
|
this.searchVal.pageNo++ |
|
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"获取领用农资失败!", |
|
|
|
showCancel:false, |
|
|
|
if(this.total==0 || this.list.length<this.total){ |
|
|
|
var res=await request("/api/Inventory/queryCollectingList",{ |
|
|
|
method:"post", |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.records) |
|
|
|
this.total=res.data.total |
|
|
|
this.searchVal.pageNo++ |
|
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"获取领用农资失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
toSpecs(e){ |
|
|
|