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.

128 lines
2.8 KiB

2 years ago
<style lang="scss" scoped>
2 years ago
.container{
height: 100%;
2 years ago
background:#F6F6F6;
2 years ago
padding-bottom:20rpx;
2 years ago
scroll-view{
flex-grow: 1;
height:1rpx;
.item{
2 years ago
.title{
display:flex;
align-items: center;
font-weight: bold;
text{
margin-left:auto;
color:#333;
}
}
.adder{
color:#999;
2 years ago
font-size:24rpx;
margin-top: 16rpx;
2 years ago
}
.data{
display:flex;
justify-content: space-between;
align-items: center;
2 years ago
margin-top:16rpx;
2 years ago
color:#999;
2 years ago
font-size:24rpx;
text:nth-child(2){
2 years ago
color:#10C176;
font-weight: bold;
2 years ago
font-size: 32rpx;
2 years ago
}
}
.btns{
display: flex;
justify-content: space-between;
align-items: center;
2 years ago
border-top:2rpx solid #D8D8D8;
padding-top:16rpx;
margin-top:20rpx;
2 years ago
text{
color:#999;
2 years ago
font-size:24rpx;
2 years ago
&:before{
color:#10C176;
2 years ago
margin-right:8rpx;
2 years ago
}
}
}
}
}
}
</style>
<template>
<view class="container flex">
2 years ago
<d-navbar style="--bg:#10C176;--c:#fff;" text="仓库管理" isBack>
2 years ago
<text class="plant-xinjian" slot="right" @click="$u.route({url:'pages/warehouse/info'})"/>
2 years ago
</d-navbar>
2 years ago
<d-search v-model="searchVal.search" style="margin-top:30rpx;" @search="clean();search()"/>
2 years ago
<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}})">
<view class="title">{{v.warehouseName}} <text class="plant-youbian"/></view>
<view class="adder">{{v.warehouseAddress}}</view>
2 years ago
<view class="data">
<text>库存种类{{v.inventoryType||0}}</text> <text>{{v.capacity||0}}</text>
2 years ago
</view>
<view class="btns">
<text class="plant-xiugai">修改</text>
<text class="plant-shanchu">删除</text>
2 years ago
<text class="plant-chakan" @click.stop="$u.route({url:'pages/warehouse/info'})">查看库存</text>
2 years ago
</view>
</view>
</scroll-view>
2 years ago
</view>
</template>
<script>
import request from '@/common/request.js'
2 years ago
export default {
data(){
return{
searchVal:{
baseId: this.$store.state.plantBaseInfoId,
search:"",
pageNo:1,
pageSize:6
},
list:[],
total:0,
}
},
onLoad(options){
this.search()
},
2 years ago
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/WarehouseManageApi/queryWarehouseList",{
method:"post",
body: this.searchVal
})
if(res.statu){
this.list=this.list.concat(res.data.warehouseList)
this.total=res.data.total
}else{
uni.showModal({
title:"提示",
content:res.msg||"获取仓库列表失败!",
showCancel:false,
})
}
}
}
2 years ago
}
2 years ago
}
</script>