You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.6 KiB

2 years ago
<style lang="scss">
2 years ago
.container{
2 years ago
min-height: 100%;
background:#f6f6f6;
padding:30rpx 0;
.card{
margin-top:0;
&>.head{
display:flex;
align-items: center;
border-bottom: 2rpx solid #D8D8D8;
padding-bottom:20rpx;
text{
&:first-child{
flex-shrink: 0;
color:#10C176;
margin-right:20rpx;
}
&:nth-child(2){
flex-grow: 1;
color:#10C176;
}
&:nth-child(3){
flex-shrink: 0;
color:#FBB65C;
margin-left:10rpx;
}
}
}
&>.plant-youbian{
margin-top:20rpx;
display:flex;
flex-direction: row-reverse;
align-items: center;
justify-content: flex-end;
text{
flex-grow: 1;
font-weight: bold;
display:flex;
align-items: center;
&:after{
content:"("attr(data-unit)")";
font-size:20rpx;
color:#999;
margin-left:6rpx;
}
}
}
&>.company{
margin-top:12rpx;
display: flex;
align-items: center;
justify-content: space-between;
text{
&:first-child{
font-size:24rpx;
color:#999;
}
&:nth-child(2){
color:#10C176;
}
}
}
}
}
</style>
<template>
2 years ago
<view class="container">
<view class="card" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/stock/goods_detail'})">
2 years ago
<view class="head">
<text class="plant-rili"/> <text>批次号{{v.batchNo}}</text> <text>{{v.inOutType}}</text>
2 years ago
</view>
<view class="plant-youbian"> <text :data-unit="v.specDescribe">{{v.substanceName}}</text> </view>
2 years ago
<view class="company">
<text>{{v.supplierName}}</text> <text>{{v.number}}({{v.equivalentAmount}}{{v.unit}})</text>
2 years ago
</view>
</view>
2 years ago
<u-empty v-if="list.length<=0" width="70%" icon="/static/noData.png"/>
2 years ago
</view>
</template>
<script>
import request from '@/common/request.js'
2 years ago
export default {
data(){
return{
searchVal:{
2 years ago
baseId: this.$store.state.plantBaseInfoId,
pageNo:1,
pageSize:6,
},
list:[],
total:0,
2 years ago
}
},
onLoad(options){
this.search()
},
methods:{
async search(){
if(this.total==0 || this.list.length<this.total){
var res=await request("/api/OutInManageApi/queryOutInRecord",{
method:"post",
body: this.searchVal
})
if(res.statu){
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,
})
}
}
}
},
onReachBottom(){
this.search()
},
2 years ago
}
</script>