|
|
@ -11,9 +11,26 @@ |
|
|
|
.item{ |
|
|
|
margin-top:0; |
|
|
|
display:flex; |
|
|
|
.u-transition{ |
|
|
|
flex-shrink: 0; |
|
|
|
&>.img{ |
|
|
|
display:flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-between; |
|
|
|
margin-right:28rpx; |
|
|
|
width:164rpx; |
|
|
|
.u-transition{ |
|
|
|
flex-shrink: 0; |
|
|
|
} |
|
|
|
&>text{ |
|
|
|
color:rgba(var(--c),1); |
|
|
|
background:rgba(var(--c),0.1); |
|
|
|
font-size:24rpx; |
|
|
|
padding:10rpx; |
|
|
|
text-align: center; |
|
|
|
margin-bottom:-10rpx; |
|
|
|
&:before{ |
|
|
|
margin-right:6rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.info{ |
|
|
|
flex-grow: 1; |
|
|
@ -72,23 +89,27 @@ |
|
|
|
<text class="plant-xinjian" slot="right" @click="toAdd()"/> |
|
|
|
</d-navbar> |
|
|
|
|
|
|
|
<d-search v-model="searchVal.search" style="margin-top:30rpx;" @search="clean();search()"/> |
|
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
|
<view class="card item" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/warehouse/detail',params:{id:v.warehouseId}})"> |
|
|
|
<u-image width="164rpx" height="164rpx" radius="16rpx" mode="aspectFill" :src="`${host}/${v.warehousePic[0]}`"> |
|
|
|
<text slot="error" class="plant-xiaopangchetupianjiazaishibai" style="font-size:45rpx"/> |
|
|
|
</u-image> |
|
|
|
<view class="img"> |
|
|
|
<u-image width="100%" height="144rpx" radius="16rpx" mode="aspectFill" :src="`${host}/${v.warehousePic[0]}`"> |
|
|
|
<text slot="error" class="plant-xiaopangchetupianjiazaishibai" style="font-size:45rpx"/> |
|
|
|
</u-image> |
|
|
|
<text v-if="v.goodsType==2" class="plant-zhongzhi" style="--c:16, 193, 118;">农产品</text> |
|
|
|
<text v-else class="plant-nongziguanli" style="--c:248, 203, 54;">农资</text> |
|
|
|
</view> |
|
|
|
<view class="info"> |
|
|
|
<view class="title">{{v.warehouseName}} <text class="plant-youbian"/></view> |
|
|
|
<view class="adder">{{v.warehouseAddress}}</view> |
|
|
|
<view class="data"> |
|
|
|
<text>库存种类:{{v.inventoryType||0}}种</text> <text>{{v.capacity||0}}㎡</text> |
|
|
|
<text>库存种类:{{v.inventoryCount||0}}种</text> <text>{{v.capacity||0}}㎡</text> |
|
|
|
</view> |
|
|
|
<view class="btns"> |
|
|
|
<text class="plant-xiugai" @click.stop="toAdd(v.warehouseId)">修改</text> |
|
|
|
<text class="plant-shanchu" @click.stop="del(k)">删除</text> |
|
|
|
<text class="plant-chakan" @click.stop="$u.route({url:'pages/stock/mana',params:{id:v.warehouseId}})">查看库存</text> |
|
|
|
<text class="plant-chakan" @click.stop="$u.route({url:'pages/stock/mana',params:{id:v.id, goodsType:({1:'nz',2:'ncp'})[v.goodsType]}})">查看库存</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -128,7 +149,7 @@ import request,{host} from '@/common/request.js' |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.warehouseList.map(v=>({...v,warehousePic:(v.warehousePic||'').split(",").filter(v=>v)}))) |
|
|
|
this.list=this.list.concat(res.data.records.map(v=>({...v,warehousePic:(v.warehousePic||'').split(",").filter(v=>v)}))) |
|
|
|
this.total=res.data.total |
|
|
|
this.searchVal.pageNo++ |
|
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
|