|
|
@ -1,66 +1,69 @@ |
|
|
|
<style lang="scss"> |
|
|
|
.container{ |
|
|
|
min-height: 100%; |
|
|
|
height: 100%; |
|
|
|
background:#f6f6f6; |
|
|
|
padding:30rpx 0; |
|
|
|
|
|
|
|
.card{ |
|
|
|
margin-bottom:0; |
|
|
|
&>.info{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom:20rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
font-size:20rpx; |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
border-radius: 0 20rpx 0 20rpx; |
|
|
|
height:40rpx; |
|
|
|
width:80rpx; |
|
|
|
line-height: 40rpx; |
|
|
|
text-align: center; |
|
|
|
margin-right:16rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
&:nth-child(3){ |
|
|
|
color:#999; |
|
|
|
font-size: 20rpx; |
|
|
|
margin-left:6rpx; |
|
|
|
scroll-view{ |
|
|
|
flex-grow: 1; |
|
|
|
height:1rpx; |
|
|
|
.card{ |
|
|
|
margin-top:0; |
|
|
|
&>.info{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom:20rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
font-size:20rpx; |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
border-radius: 0 20rpx 0 20rpx; |
|
|
|
height:40rpx; |
|
|
|
width:80rpx; |
|
|
|
line-height: 40rpx; |
|
|
|
text-align: center; |
|
|
|
margin-right:16rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
&:nth-child(3){ |
|
|
|
color:#999; |
|
|
|
font-size: 20rpx; |
|
|
|
margin-left:6rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&>.name{ |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#FBA83C; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
color:#999; |
|
|
|
margin-left:22rpx; |
|
|
|
&>.name{ |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#FBA83C; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
color:#999; |
|
|
|
margin-left:22rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&>.data{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
border-top:2rpx solid #D8D8D8; |
|
|
|
margin-top:20rpx; |
|
|
|
padding-top:16rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#999; |
|
|
|
font-size:24rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
font-weight: bold; |
|
|
|
&:after{ |
|
|
|
content:"("attr(data-unit)")"; |
|
|
|
font-weight: normal; |
|
|
|
margin-left:5rpx; |
|
|
|
&>.data{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
border-top:2rpx solid #D8D8D8; |
|
|
|
margin-top:20rpx; |
|
|
|
padding-top:16rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#999; |
|
|
|
font-size:24rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
font-weight: bold; |
|
|
|
&:after{ |
|
|
|
content:"("attr(data-unit)")"; |
|
|
|
font-weight: normal; |
|
|
|
margin-left:5rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -69,28 +72,71 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<template> |
|
|
|
<view class="container"> |
|
|
|
<d-search/> |
|
|
|
<view class="container flex"> |
|
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
<view class="card"> |
|
|
|
<view class="info"> |
|
|
|
<text>化肥</text> <text>中量元素水溶肥</text> <text>(100kg/袋)</text> |
|
|
|
</view> |
|
|
|
<view class="name"> |
|
|
|
<text>微量元素肥</text> <text>云南云天化股份有限公司</text> |
|
|
|
<scroll-view scroll-y @scrollotower="search"> |
|
|
|
<view class="card" v-for="(v,k) in list" :key="k"> |
|
|
|
<view class="info"> |
|
|
|
<text>{{v.agriculturalGoods}}</text> <text>{{v.substanceName}}</text> <text>({{v.specDescribe}})</text> |
|
|
|
</view> |
|
|
|
<view class="name"> |
|
|
|
<text>{{v.detailType}}</text> <text class="over">{{v.supplierName}}</text> |
|
|
|
</view> |
|
|
|
<view class="data"> |
|
|
|
<text>领用时间:{{new Date(v.collectingTime).format("yyyy-MM-dd")}}</text> <text :data-unit="`共${v.total}kg`">{{v.num}}{{(v.specDescribe.match(/\/(.+)/)||['',''])[1]}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="data"> |
|
|
|
<text>领用时间:2022-12-29</text> <text data-unit="共200kg">2袋</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-empty v-if="list.length==0" width="70%" icon="/static/noData.png"/> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import request from '@/common/request.js' |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
|
|
|
|
searchVal:{ |
|
|
|
baseId: "1611250480973049857"||this.$store.state.plantBaseInfoId, |
|
|
|
search: "", |
|
|
|
pageNo:1, |
|
|
|
pageSize:6, |
|
|
|
}, |
|
|
|
list:[], |
|
|
|
total:0, |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
clean(){ |
|
|
|
this.list=[] |
|
|
|
this.total=0 |
|
|
|
this.searchVal.pageNo=1 |
|
|
|
}, |
|
|
|
async search(){ |
|
|
|
if(this.total==0 || this.list.length<this.total){ |
|
|
|
var res=await request("/api/OutInManageApi/queryCollectingList",{ |
|
|
|
method:"post", |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.list) |
|
|
|
this.list=this.list.concat(res.data.list) |
|
|
|
this.list=this.list.concat(res.data.list) |
|
|
|
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, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |