|
|
@ -10,6 +10,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
&>.btns{ |
|
|
|
flex-shrink: 0; |
|
|
|
margin:28rpx 30rpx 0; |
|
|
|
display:flex; |
|
|
|
border-radius: 30rpx; |
|
|
@ -28,83 +29,88 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&>.item{ |
|
|
|
&>.info{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom:20rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
height:40rpx; |
|
|
|
width:80rpx; |
|
|
|
text-align: center; |
|
|
|
line-height: 40rpx; |
|
|
|
border-radius: 0 20rpx 0 20rpx; |
|
|
|
margin-right:10rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
&:after{ |
|
|
|
content:"("attr(data-unit)")"; |
|
|
|
color:#999; |
|
|
|
font-size:20rpx; |
|
|
|
scroll-view{ |
|
|
|
flex-grow: 1; |
|
|
|
height:1rpx; |
|
|
|
.item{ |
|
|
|
&>.info{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom:20rpx; |
|
|
|
text{ |
|
|
|
&:first-child{ |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
height:40rpx; |
|
|
|
min-width:80rpx; |
|
|
|
text-align: center; |
|
|
|
line-height: 40rpx; |
|
|
|
margin-left:6rpx; |
|
|
|
border-radius: 0 20rpx 0 20rpx; |
|
|
|
margin-right:10rpx; |
|
|
|
padding:0 6rpx; |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
&:after{ |
|
|
|
content:"("attr(data-unit)")"; |
|
|
|
color:#999; |
|
|
|
font-size:20rpx; |
|
|
|
line-height: 40rpx; |
|
|
|
margin-left:6rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(3){ |
|
|
|
margin-left:auto; |
|
|
|
color:#F34848; |
|
|
|
font-size:24rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(3){ |
|
|
|
margin-left:auto; |
|
|
|
color:#F34848; |
|
|
|
font-size:24rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&>.company{ |
|
|
|
font-size:24rpx; |
|
|
|
margin-bottom:14rpx; |
|
|
|
text{ |
|
|
|
color:var(--c); |
|
|
|
} |
|
|
|
} |
|
|
|
&>.num{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
&>text{ |
|
|
|
&>.company{ |
|
|
|
font-size:24rpx; |
|
|
|
color:#999; |
|
|
|
margin-bottom:14rpx; |
|
|
|
text{ |
|
|
|
color:var(--c); |
|
|
|
} |
|
|
|
} |
|
|
|
&>.btns{ |
|
|
|
margin-left:auto; |
|
|
|
button{ |
|
|
|
padding:0; |
|
|
|
height:48rpx; |
|
|
|
width: 96rpx; |
|
|
|
&>.num{ |
|
|
|
display:flex; |
|
|
|
align-items: center; |
|
|
|
&>text{ |
|
|
|
font-size:24rpx; |
|
|
|
&:first-child{ |
|
|
|
color:#10C176; |
|
|
|
background:rgba(16, 193, 119, 0.1); |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
margin-left:20rpx; |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
color:#999; |
|
|
|
} |
|
|
|
&>.btns{ |
|
|
|
margin-left:auto; |
|
|
|
button{ |
|
|
|
padding:0; |
|
|
|
height:48rpx; |
|
|
|
width: 96rpx; |
|
|
|
font-size:24rpx; |
|
|
|
&:first-child{ |
|
|
|
color:#10C176; |
|
|
|
background:rgba(16, 193, 119, 0.1); |
|
|
|
} |
|
|
|
&:nth-child(2){ |
|
|
|
margin-left:20rpx; |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
} |
|
|
|
// background:transparent; |
|
|
|
// border:2rpx solid transparent; |
|
|
|
// color:var(--c); |
|
|
|
// font-weight: bold; |
|
|
|
// font-size:30rpx; |
|
|
|
// height:50rpx; |
|
|
|
// width:50rpx; |
|
|
|
// &:first-child{ |
|
|
|
// border-radius: 30rpx 0 0 30rpx; |
|
|
|
// border-color:var(--c); |
|
|
|
// } |
|
|
|
// &:nth-child(2){ |
|
|
|
// border-radius: 0 30rpx 30rpx 0; |
|
|
|
// border-color:var(--c); |
|
|
|
// } |
|
|
|
} |
|
|
|
// background:transparent; |
|
|
|
// border:2rpx solid transparent; |
|
|
|
// color:var(--c); |
|
|
|
// font-weight: bold; |
|
|
|
// font-size:30rpx; |
|
|
|
// height:50rpx; |
|
|
|
// width:50rpx; |
|
|
|
// &:first-child{ |
|
|
|
// border-radius: 30rpx 0 0 30rpx; |
|
|
|
// border-color:var(--c); |
|
|
|
// } |
|
|
|
// &:nth-child(2){ |
|
|
|
// border-radius: 0 30rpx 30rpx 0; |
|
|
|
// border-color:var(--c); |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -112,7 +118,7 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<template> |
|
|
|
<view class="container"> |
|
|
|
<view class="container flex"> |
|
|
|
<d-navbar style="--bg:#10C176;--c:#fff;" isBack text="库存管理"> |
|
|
|
<view slot="right" class="head_btns"> |
|
|
|
<image @click="$u.route({url:'pages/stock/already'})" mode="aspectFit" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAh9JREFUOE+N0++rz2ccx/HH+5z5EZ1QZ+aGJEsStjgKIxrJIkUxRqa1pIlsmrM7ItzbuSN/gJw782Oo5dcN3BFlOYrdIto525EkzhlKjWNvu04fOr7ODe/61Oe6rvf1vN4/Xu/Qj2XmRGzHLNSjB+fQEhF3a69E7UZmrsFufI8/MQ2d+Bh7sDYiLva99xYkM2fgAGZHxD+Z+TnmV6BRWI+zmBcR5YFeewPJzDrcwCpccC3GYAvmqHPQ5O6/DBj+W7W3LiK+7A8yHodxzMvnna4P2qxhwQwxgPoGun/doCln4gT2Y2pEPK2NpBRxB4a5FEsN+aDLyK0MnsTgCdya3aMpi8+Kki6+iYg7tZDp2IcHOpo36Wq556Pm0POIhoW0r/5bU27DuAq0KiI6aiEf4hpWYqe2OKJOq/oR5H88ezzWZ3kaX5WUI2LCOzUpG5n5M27iu/JFRFu2aYzpHlbn6yOiNbM3rUvoxpPaFhdhLcInGIEuHMe/1atFaEPQXvlsKme9kMwsB40oIjqEU9Wlofgag6r13Aq4BPdxBZMiM0stfsdoLIuIM69zzcxPUfTy2n6sOngZV8t/RJwtkNv4CUUnJbwpEfGkinB5DaR043xVjzJHv/R2JzOLQssLpTP38G1fUN8ZycyBld/eiDj6VncqUDMWYzJKSn/0M+Cl8Lsi4mS/A1iBfkBriSYiivjey2pbXIZqI76IiBfvRfjf6RX9Zrpq7UEdfAAAAABJRU5ErkJggg=="/> |
|
|
@ -120,35 +126,82 @@ |
|
|
|
</view> |
|
|
|
</d-navbar> |
|
|
|
|
|
|
|
<d-search /> |
|
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
<view class="btns shadow bg-white"> |
|
|
|
<button class="cu-btn bg-white active">农资</button> |
|
|
|
<button class="cu-btn bg-white">农产品</button> |
|
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='nz'}" @click="searchVal.substanceType='nz';clean();search()">农资</button> |
|
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='ncp'}" @click="searchVal.substanceType='ncp';clean();search()">农产品</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card item"> |
|
|
|
<view class="info"> |
|
|
|
<text>化肥</text> |
|
|
|
<text data-unit="100kg/袋">中量元素水溶肥</text> |
|
|
|
<text>补货量≥300kg</text> |
|
|
|
</view> |
|
|
|
<view class="company"> |
|
|
|
<text style="--c:#FBA83C;margin-right:14rpx;">微量元素肥</text> |
|
|
|
<text style="--c:#999;">云南云天化股份有限公司</text> |
|
|
|
</view> |
|
|
|
<view class="num"> |
|
|
|
<text>库存量:200kg</text> |
|
|
|
<view class="btns" @click="$u.route({url:'pages/stock/list'})"> |
|
|
|
<button class="cu-btn">出库</button> |
|
|
|
<button class="cu-btn">入库</button> |
|
|
|
<scroll-view scroll-y @scrolltowoer="search"> |
|
|
|
<view class="card item" v-for="(v,k) in list" :key="k"> |
|
|
|
<view class="info"> |
|
|
|
<text>{{v.agriculturalGoods}}</text> |
|
|
|
<text :data-unit="v.specDescribe">{{v.substanceName}}</text> |
|
|
|
<text>补货量≥{{v.replenishment||0}}kg</text> |
|
|
|
</view> |
|
|
|
<view class="company"> |
|
|
|
<text style="--c:#FBA83C;margin-right:14rpx;">{{v.detailType}}</text> |
|
|
|
<text style="--c:#999;">{{v.supplierName}}</text> |
|
|
|
</view> |
|
|
|
<view class="num"> |
|
|
|
<text>库存量:{{v.equivalentInventory||0}}kg</text> |
|
|
|
<view class="btns" @click="$u.route({url:'pages/stock/list'})"> |
|
|
|
<button class="cu-btn">出库</button> |
|
|
|
<button class="cu-btn">入库</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</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:"1610890499027365889"||this.$store.state.plantBaseInfoId, |
|
|
|
search:"", |
|
|
|
substanceType:"nz", |
|
|
|
pageNo:1, |
|
|
|
pageSize:5, |
|
|
|
}, |
|
|
|
total:0, |
|
|
|
list:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
// this.searchVal |
|
|
|
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/InventoryManageApi/queryInventoryList",{ |
|
|
|
method:"post", |
|
|
|
body: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.nz) |
|
|
|
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> |