|
|
@ -68,11 +68,11 @@ |
|
|
|
<view class="container"> |
|
|
|
<view class="card" v-for="(v,k) in list" :key="k" @click="toDetail(v)"> |
|
|
|
<view class="head"> |
|
|
|
<text class="plant-rili"/> <text>批次号:{{v.batchNo}}</text> <text>{{v.inOutType}}</text> |
|
|
|
<text class="plant-rili"/> <text>批次号:{{v.inOutBatchNo}}</text> <text>{{v.inOutType}}</text> |
|
|
|
</view> |
|
|
|
<view class="plant-youbian"> <text :data-unit="v.specDescribe">{{v.substanceName}}</text> </view> |
|
|
|
<view class="company"> |
|
|
|
<text>{{v.supplierName}}</text> <text>{{v.number}}袋(共{{v.equivalentAmount}}{{v.unit}})</text> |
|
|
|
<text>{{v.supplier}}</text> <text>{{v.number}}{{v.packgeUnit}}(共{{v.equivalentAmount}}{{v.unit}})</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-empty v-if="list.length<=0" text="为查询到相关信息" width="70%" icon="/static/noData.png"/> |
|
|
@ -84,7 +84,8 @@ export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
searchVal:{ |
|
|
|
baseId: this.$store.state.plantBaseInfoId, |
|
|
|
userId: '', |
|
|
|
enterpriseId: '', |
|
|
|
pageNo:1, |
|
|
|
pageSize:6, |
|
|
|
}, |
|
|
@ -94,6 +95,13 @@ export default { |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
this.search() |
|
|
|
if (this.$store.getters['userInfo'].roleCode=="baseAdmin") { |
|
|
|
this.searchVal.userId = this.$store.getters['userInfo'].id |
|
|
|
this.searchVal.enterpriseId = '' |
|
|
|
} else { |
|
|
|
this.searchVal.enterpriseId = this.$store.getters.userInfo.companyId |
|
|
|
this.searchVal.userId = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
async search(){ |
|
|
@ -103,7 +111,7 @@ export default { |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.list) |
|
|
|
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"}) |
|
|
|