瀏覽代碼

库存统计、库存记录、往来单位以及仓库管理页面画写及接口联调完成

htc 2 月之前
父節點
當前提交
7028cc2de0

+ 35 - 0
pages.json

@@ -332,6 +332,41 @@
 						"navigationStyle": "custom",
 						"enablePullDownRefresh": true
 					}
+				},
+				{
+					"path": "inventoryStatistics/index",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "storageRecord/index",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "storageRecord/detail",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "units/index",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "storage/index",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
 				}
 			]
 		}

+ 4 - 4
pagesStorage/home.vue

@@ -81,22 +81,22 @@
 					{
 						icon:this.$imgBase+'storage/home_icon_kcjl.png',
 						title:'库存记录',
-						path:''
+						path:'/pagesStorage/storageRecord/index'
 					},
 					{
 						icon:this.$imgBase+'storage/home_icon_kctj.png',
 						title:'库存统计',
-						path:''
+						path:'/pagesStorage/inventoryStatistics/index'
 					},
 					{
 						icon:this.$imgBase+'storage/home_icon_wldw.png',
 						title:'往来单位',
-						path:''
+						path:'/pagesStorage/units/index'
 					},
 					{
 						icon:this.$imgBase+'storage/home_icon_ckgl.png',
 						title:'仓库管理',
-						path:''
+						path:'/pagesStorage/storage/index'
 					}
 				],
 				rkIdx:0,

+ 236 - 0
pagesStorage/inventoryStatistics/index.vue

@@ -0,0 +1,236 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='库存统计' bgColor='transparent'></cus-header>
+		<image class="topbg" :src="imgBase+'storage/home_bg.png'" mode="widthFix"></image>
+		<div class="search">
+			<u--input
+				placeholder="请输入商品名称"
+				border="none"
+				prefixIcon="search"
+				prefixIconStyle="font-size: 24px;color: #86909C"
+				v-model="params.itemName"
+			></u--input>
+			<div class="btn" @tap="search">搜索</div>
+		</div>
+		<div class="select">
+			<div class="left">选择仓库</div>
+			<div class="right" @tap="selectWarehouse">
+				<text v-if="warehouseName">{{warehouseName}} ></text>
+				<text class="tip" v-else>请选择仓库 ></text>
+			</div>
+		</div>
+		<div class="list" :style="{'height':'calc(100vh - '+(mt+125)+'px)'}">
+			<template v-if="list.length">
+				<u-list @scrolltolower="scrolltolower">
+					<u-list-item v-for="(good, index) in list" :key="good.id">
+						<div class="item">
+							<div class="title">{{good.item.itemName}}</div>
+							<div class="info">
+								<div>
+									规格信息:<span v-if="good.itemSku.skuCode">{{good.itemSku.skuCode+'/'}}</span>
+									<span v-if="good.itemSku.skuName">{{good.itemSku.skuName}}</span>
+								</div>
+								<div>库存:<span :class="{'zero':good.quantity=='0'}" style="font-size: 28rpx;font-weight: bold;">{{good.quantity||''}}</span></div>
+							</div>
+						</div>
+					</u-list-item>
+				</u-list>
+			</template>
+			<template v-else>
+				<page-empty height="100vh"></page-empty>
+			</template>
+		</div>
+		<u-picker title="仓库" :show="warehouseShow" :columns="warehouseList" keyName="warehouseName" 
+			@cancel="warehouseShow=false" @confirm="warehouseConfirm">
+		</u-picker>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				params:{
+					page:1,
+					limit:10,
+					itemName:'',
+					warehouseId:'',
+				},
+				list:[],
+				warehouseName:'',
+				warehouseShow:false,
+				warehouseList:[],
+				isOver:false
+			}
+		},
+		onLoad() {
+			this.getList();
+		},
+		methods:{
+			selectWarehouse(){
+				this.warehouseShow = true;
+				this.$nextTick(()=>{
+					this.$api.get('/wms/warehouse/page').then(res=>{
+						if(res.data.code===0){
+							this.warehouseList = [res.data.data.list];
+						}else this.$showToast(res.data.msg)
+					})
+				})
+			},
+			warehouseConfirm(e){
+				this.params.warehouseId = e.value[0].id;
+				this.warehouseName = e.value[0].warehouseName;
+				this.warehouseShow = false;
+				this.initList();
+			},
+			getList(){
+				this.$api.get('/wms/inventory/boardList/warehouse',this.params).then(res=>{
+					if(res.data.code===0){
+						if(this.list.length<res.data.data.total){
+							this.params.page++;
+							this.list = [...this.list,...res.data.data.list];
+						}else this.isOver = true
+					}else this.$showModal(res.data.msg)
+				});
+			},
+			search(){
+				this.initList();
+			},
+			initList(){
+				this.params.page = 1;
+				this.list = [];
+				this.isOver = false;
+				this.getList();
+			},
+			scrolltolower(){
+				if(this.isOver) return
+				this.getList();
+			},
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		padding: 0 24rpx 20rpx;
+		background: #F4F8FB;
+		box-sizing: border-box;
+		
+		.topbg{
+			width: 100%;
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 0;
+		}
+		
+		.search{
+			width: 100%;
+			height: 84rpx;
+			padding: 6rpx 6rpx 6rpx 30rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 40rpx;
+			border: 1rpx solid #198CFF;
+			position: relative;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.btn{
+				width: 118rpx;
+				height: 68rpx;
+				background: #198CFF;
+				border-radius: 40rpx;
+				border: 1rpx solid #198CFF;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 28rpx;
+				color: #FFFFFF;
+				line-height: 68rpx;
+				text-align: center;
+				letter-spacing: 2rpx;
+			}
+		}
+	
+		.select{
+			width: 100%;
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			padding: 24rpx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: relative;
+			margin-top: 20rpx;
+			.left{
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				font-size: 30rpx;
+				color: #1D2129;
+				line-height: 42rpx;
+			}
+			.right{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 30rpx;
+				color: #4E5969;
+				line-height: 42rpx;
+				text-align: right;
+			}
+		}
+		
+		.list{
+			width: 100%;
+			margin-top: 20rpx;
+			background: #FFFFFF;
+			position: relative;
+			border-radius: 16rpx 16rpx 0rpx 0rpx;
+			::v-deep .u-list{
+				width: 100%;
+				height: 100% !important;
+			}
+			::v-deep .u-list-item{
+				width: 100%;
+			}
+			.item{
+				width: 100%;
+				padding: 36rpx 24rpx;
+				box-sizing: border-box;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
+				.title{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 30rpx;
+					color: #1D2129;
+					line-height: 30rpx;
+					text-align: left;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					white-space: nowrap;
+				}
+				.info{
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 28rpx;
+					&>div{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #86909C;
+						line-height: 24rpx;
+						text-align: left;
+						span{
+							color: #4E5969;
+							&.zero{
+								color: #FA415E;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 105 - 0
pagesStorage/storage/index.vue

@@ -0,0 +1,105 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='仓库管理'></cus-header>
+		<template v-if="list.length">
+			<div class="list">
+				<div class="item" v-for="item in list" :key="item.id">
+					<div class="name">{{item.warehouseName}}</div>
+					<div class="info">
+						<div class="left">仓库编号</div>
+						<div class="right">{{item.warehouseCode||''}}</div>
+					</div>
+					<div class="info">
+						<div class="left">创建时间</div>
+						<div class="right">{{item.createDate||''}}</div>
+					</div>
+				</div>
+			</div>
+		</template>
+		<template v-else>
+			<page-empty :height="'calc(100vh - '+mt+'px)'"></page-empty>
+		</template>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				list:[]
+			}
+		},
+		onLoad() {
+			this.getList();
+		},
+		onPullDownRefresh() {
+			this.getList();
+		},
+		methods:{
+			getList(){
+				this.$api.get('/wms/warehouse/page').then(res=>{
+					if(res.data.code===0) this.list = res.data.data.list;
+					else this.$showModal(res.data.msg)
+				});
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		width: 100%;
+		padding: 0 24rpx 20rpx;
+		box-sizing: border-box;
+		background: #F5F8FA;
+		
+		.list{
+			width: 100%;
+			.item{
+				width: 100%;
+				padding: 40rpx 24rpx;
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				margin-top: 20rpx;
+				.name{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 36rpx;
+					color: #1D2129;
+					line-height: 36rpx;
+					text-align: left;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+				.info{
+					width: 100%;
+					margin-top: 32rpx;
+					display: flex;
+					.left{
+						width: 160rpx;
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #86909C;
+						line-height: 28rpx;
+						text-align: left;
+					}
+					.right{
+						width: calc(100% - 160rpx);
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #333333;
+						line-height: 28rpx;
+						text-align: left;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 157 - 0
pagesStorage/storageRecord/detail.vue

@@ -0,0 +1,157 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='详情'></cus-header>
+		<div class="info">
+			<div class="item">
+				<div class="left">订单类型</div>
+				<div class="right">
+					<div class="box" :class="typeClass[storageDto.orderType]||'mr'">{{typeCfg[storageDto.orderType]||''}}</div>
+				</div>
+			</div>
+			<div class="item">
+				<div class="left">商品信息</div>
+				<div class="right">{{storageDto.itemName||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">规格信息</div>
+				<div class="right">{{storageDto.skuName||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">仓库</div>
+				<div class="right">{{storageDto.warehouseName||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">操作单号</div>
+				<div class="right">{{storageDto.orderNo||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">操作前</div>
+				<div class="right jc">{{storageDto.beforeQuantity||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">操作后</div>
+				<div class="right jc">{{storageDto.afterQuantity||''}}</div>
+			</div>
+			<div class="item">
+				<div class="left">数量</div>
+				<div class="right jc"><span v-if="storageDto.quantity>0">+</span>{{storageDto.quantity||0}}</div>
+			</div>
+			<div class="item">
+				<div class="left">金额</div>
+				<div class="right jc">¥{{storageDto.amount||0}}</div>
+			</div>
+			<div class="item">
+				<div class="left">操作时间</div>
+				<div class="right">{{storageDto.createDate||''}}</div>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				typeCfg:{},
+				typeClass:{
+					1:'rk',
+					2:'ck',
+					3:'yk',
+					4:'pk'
+				},
+				storageDto:{}
+			}
+		},
+		async onLoad(option) {
+			await this.getStorageType();
+			this.getDetailInfo(option.id);
+		},
+		methods:{
+			async getStorageType(){
+				let res = await this.$api.get('/sys/dict/data/getListByType/wms_inventory_history_type');
+				if(res.data.code===0){
+					res.data.data.forEach(d=>{
+						this.typeCfg[d.dictValue] = d.dictLabel;
+					})
+				}else this.$showToast(res.data.msg)
+			},
+			getDetailInfo(id){
+				this.$api.get('/wms/inventoryhistory/'+id).then(res=>{
+					if(res.data.code===0){
+						this.storageDto = res.data.data;
+					}else this.$showToast(res.data.msg)
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		width: 100%;
+		padding: 0 24rpx 20rpx;
+		box-sizing: border-box;
+		background: #F4F8FB;
+		.info{
+			width: 100%;
+			padding: 0 24rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			margin-top: 20rpx;
+			.item{
+				width: 100%;
+				padding: 24rpx 0;
+				box-sizing: border-box;
+				background: #FFFFFF;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
+				display: flex;
+				justify-content: space-between;
+				.left{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #1D2129;
+					line-height: 42rpx;
+					text-align: left;
+				}
+				.right{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #4E5969;
+					line-height: 42rpx;
+					text-align: right;
+					&.jc{
+						font-weight: bold;
+					}
+					.box{
+						height: 42rpx;
+						border-radius: 6rpx;
+						padding: 0 12rpx;
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #FFFFFF;
+						line-height: 42rpx;
+						&.rk{
+							background: #14CC8C;
+						}
+						&.ck{
+							background: #FF817C;
+						}
+						&.yk{
+							background: #FEA34C;
+						}
+						&.pk{
+							background: #98A1FE;
+						}
+						&.mr{
+							background: lightgray;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 386 - 0
pagesStorage/storageRecord/index.vue

@@ -0,0 +1,386 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='库存记录' bgColor='transparent'></cus-header>
+		<image class="topbg" :src="imgBase+'storage/home_bg.png'" mode="widthFix"></image>
+		<div class="search">
+			<u--input
+				placeholder="请输入商品名称"
+				border="none"
+				prefixIcon="search"
+				prefixIconStyle="font-size: 24px;color: #86909C"
+				v-model="params.itemName"
+			></u--input>
+			<div class="btn" @tap="search">搜索</div>
+		</div>
+		<div class="type">
+			<template v-if="typeList.length">
+				<div class="pre" v-for="(item,index) in typeList" :key="index" :style="{'width':'calc(100% / '+typeList.length+')'}"
+				@tap="changeType(item.dictValue)" :class="{'active':params.orderType===item.dictValue}">
+					{{item.dictLabel}}
+				</div>
+			</template>
+		</div>
+		<div class="select">
+			<div class="left">选择仓库</div>
+			<div class="right" @tap="selectWarehouse">
+				<text v-if="warehouseName">{{warehouseName}} ></text>
+				<text class="tip" v-else>请选择仓库 ></text>
+			</div>
+		</div>
+		<div class="list" :style="{'height':'calc(100vh - '+(mt+175)+'px)'}">
+			<template v-if="list.length">
+				<u-list @scrolltolower="scrolltolower">
+					<u-list-item v-for="(good, index) in list" :key="good.id">
+						<div class="item">
+							<div class="top">
+								<div class="name">{{good.item.itemName}}</div>
+								<div class="ktype" @tap="toDetail(good.id)">
+									<div class="box" :class="typeClass[good.orderType]||'mr'">{{typeCfg[good.orderType]||''}}</div>
+									<span>></span>
+								</div>
+							</div>
+							<div class="info">
+								<div class="iitem">
+									<div class="pre pre1">
+										操作时间:<span>{{good.createDate||''}}</span>
+									</div>
+									<div class="pre">
+										数量:<span class="jc"><span v-if="good.quantity>0">+</span>{{good.quantity||0}}</span>
+									</div>
+								</div>
+								<div class="iitem">
+									<div class="pre pre1">
+										操作前:<span class="jc">{{good.beforeQuantity||0}}</span>
+									</div>
+									<div class="pre">
+										操作后:<span class="jc">{{good.afterQuantity||0}}</span>
+									</div>
+								</div>
+								<div class="iitem">
+									<div class="pre pre1">
+										规格信息:<span v-if="good.itemSku.skuCode">{{good.itemSku.skuCode+'/'}}</span>
+										<span v-if="good.itemSku.skuName">{{good.itemSku.skuName||''}}</span>
+									</div>
+								</div>
+							</div>
+						</div>
+					</u-list-item>
+				</u-list>
+			</template>
+			<template v-else>
+				<page-empty height="100vh"></page-empty>
+			</template>
+		</div>
+		<u-picker title="仓库" :show="warehouseShow" :columns="warehouseList" keyName="warehouseName" 
+			@cancel="warehouseShow=false" @confirm="warehouseConfirm">
+		</u-picker>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				params:{
+					page:1,
+					limit:10,
+					orderType:'',
+					itemName:'',
+					warehouseId:'',
+				},
+				typeList:[],
+				typeCfg:{},
+				typeClass:{
+					1:'rk',
+					2:'ck',
+					3:'yk',
+					4:'pk'
+				},
+				list:[],
+				warehouseName:'',
+				warehouseShow:false,
+				warehouseList:[],
+				isOver:false
+			}
+		},
+		async onLoad() {
+			await this.getStorageType();
+			this.getList();
+		},
+		methods:{
+			async getStorageType(){
+				let res = await this.$api.get('/sys/dict/data/getListByType/wms_inventory_history_type');
+				if(res.data.code===0){
+					this.typeList = res.data.data;
+					res.data.data.forEach(d=>{
+						this.typeCfg[d.dictValue] = d.dictLabel;
+					})
+					this.typeList.unshift({dictValue:'',dictLabel:'全部'})
+				}else this.$showToast(res.data.msg)
+			},
+			changeType(type){
+				this.params.orderType = type;
+				this.initList();
+			},
+			initList(){
+				this.params.page = 1;
+				this.list = [];
+				this.isOver = false;
+				this.getList();
+			},
+			selectWarehouse(){
+				this.warehouseShow = true;
+				this.$nextTick(()=>{
+					this.$api.get('/wms/warehouse/page').then(res=>{
+						if(res.data.code===0){
+							this.warehouseList = [res.data.data.list];
+						}else this.$showToast(res.data.msg)
+					})
+				})
+			},
+			warehouseConfirm(e){
+				this.params.warehouseId = e.value[0].id;
+				this.warehouseName = e.value[0].warehouseName;
+				this.warehouseShow = false;
+				this.initList();
+			},
+			getList(){
+				this.$api.get('/wms/inventoryhistory/page',this.params).then(res=>{
+					if(res.data.code===0){
+						if(this.list.length<res.data.data.total){
+							this.params.page++;
+							this.list = [...this.list,...res.data.data.list];
+						}else this.isOver = true
+					}else this.$showModal(res.data.msg)
+				});
+			},
+			search(){
+				this.initList();
+			},
+			initList(){
+				this.params.page = 1;
+				this.list = [];
+				this.getList();
+			},
+			scrolltolower(){
+				if(this.isOver) return
+				this.getList();
+			},
+			toDetail(id){
+				uni.navigateTo({
+					url:'/pagesStorage/storageRecord/detail?id='+id
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		padding: 0 24rpx 20rpx;
+		background: #F4F8FB;
+		box-sizing: border-box;
+		
+		.topbg{
+			width: 100%;
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 0;
+		}
+		
+		.search{
+			width: 100%;
+			height: 84rpx;
+			padding: 6rpx 6rpx 6rpx 30rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 40rpx;
+			border: 1rpx solid #198CFF;
+			position: relative;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.btn{
+				width: 118rpx;
+				height: 68rpx;
+				background: #198CFF;
+				border-radius: 40rpx;
+				border: 1rpx solid #198CFF;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 28rpx;
+				color: #FFFFFF;
+				line-height: 68rpx;
+				text-align: center;
+				letter-spacing: 2rpx;
+			}
+		}
+		
+		.type{
+			width: 100%;
+			height: 80rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			display: flex;
+			position: relative;
+			margin-top: 20rpx;
+			.pre{
+				height: 100%;
+				position: relative;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 28rpx;
+				color: #1D2129;
+				&.active{
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #198CFF;
+					&::after{
+						content: '';
+						width: 40rpx;
+						height: 6rpx;
+						background: #198CFF;
+						border-radius: 3rpx;
+						position: absolute;
+						left: 50%;
+						margin-left: -20rpx;
+						bottom: 3rpx;
+					}
+				}
+			}
+		}
+	
+		.select{
+			width: 100%;
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			padding: 24rpx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: relative;
+			margin-top: 20rpx;
+			.left{
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				font-size: 30rpx;
+				color: #1D2129;
+				line-height: 42rpx;
+			}
+			.right{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 30rpx;
+				color: #4E5969;
+				line-height: 42rpx;
+				text-align: right;
+			}
+		}
+		
+		.list{
+			width: 100%;
+			padding: 0 24rpx;
+			box-sizing: border-box;
+			margin-top: 20rpx;
+			background: #FFFFFF;
+			position: relative;
+			border-radius: 16rpx 16rpx 0rpx 0rpx;
+			::v-deep .u-list{
+				width: 100%;
+				height: 100% !important;
+			}
+			::v-deep .u-list-item{
+				width: 100%;
+			}
+			.item{
+				width: 100%;
+				padding: 36rpx 0;
+				box-sizing: border-box;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
+				.top{
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.name{
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: bold;
+						font-size: 30rpx;
+						color: #1D2129;
+						line-height: 30rpx;
+						text-align: left;
+					}
+					.ktype{
+						display: flex;
+						align-items: center;
+						.box{
+							height: 40rpx;
+							border-radius: 6rpx;
+							padding: 0 12rpx;
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 24rpx;
+							color: #FFFFFF;
+							line-height: 40rpx;
+							&.rk{
+								background: #14CC8C;
+							}
+							&.ck{
+								background: #FF817C;
+							}
+							&.yk{
+								background: #FEA34C;
+							}
+							&.pk{
+								background: #98A1FE;
+							}
+							&.mr{
+								background: lightgray;
+							}
+						}
+						span{
+							font-size: 36rpx;
+							color: #86909C;
+							margin-left: 23rpx;
+						}
+					}
+				}
+				.info{
+					width: 100%;
+					.iitem{
+						width: 100%;
+						display: flex;
+						.pre{
+							margin-top: 24rpx;
+							width: 250rpx;
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 24rpx;
+							color: #86909C;
+							line-height: 24rpx;
+							text-align: right;
+							padding-right: 40rpx;
+							span{
+								color: #4E5969;
+								&.jc{
+									font-weight: bold;
+									font-size: 26rpx;
+								}
+							}
+							&.pre1{
+								width: calc(100% - 250rpx);
+								text-align: left;
+								padding-right: 0;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 201 - 0
pagesStorage/units/index.vue

@@ -0,0 +1,201 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='往来单位' bgColor='transparent'></cus-header>
+		<image class="topbg" :src="imgBase+'storage/home_bg.png'" mode="widthFix"></image>
+		<div class="search">
+			<u--input
+				placeholder="请输入单位名称"
+				border="none"
+				prefixIcon="search"
+				prefixIconStyle="font-size: 24px;color: #86909C"
+				v-model="params.merchantName"
+			></u--input>
+			<div class="btn" @tap="search">搜索</div>
+		</div>
+		<template v-if="list.length">
+			<div class="list">
+				<div class="item" v-for="item in list" :key="item.id">
+					<div class="name">{{item.merchantName}}</div>
+					<div class="info">
+						<div class="iitem">
+							<div class="pre">
+								<div class="title">企业类型</div>
+								<div class="nr">{{merchantTypeCfg[item.merchantType]||''}}</div>
+							</div>
+							<div class="pre">
+								<div class="title">企业编号</div>
+								<div class="nr">{{item.merchantCode||''}}</div>
+							</div>
+						</div>
+						<div class="iitem">
+							<div class="pre">
+								<div class="title">联系人</div>
+								<div class="nr">{{item.contactPerson||''}}</div>
+							</div>
+							<div class="pre">
+								<div class="title">职称级别</div>
+								<div class="nr">{{item.merchantLevel||''}}</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</template>
+		<template v-else>
+			<page-empty :height="'calc(100vh - '+(mt+50)+'px)'" marginTop="50px"></page-empty>
+		</template>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				params:{
+					page:1,
+					limit:10,
+					merchantName:''
+				},
+				merchantTypeCfg:{},
+				list:[],
+				isOver:false
+			}
+		},
+		onLoad() {
+			this.getMerchantType();
+			this.getList();
+		},
+		onReachBottom() {
+			if(this.isOver) return;
+			this.getList();
+		},
+		methods:{
+			async getMerchantType(){
+				let res = await this.$api.get('/sys/dict/data/getListByType/merchant_type');
+				if(res.data.code===0){
+					res.data.data.forEach(d=>{
+						this.merchantTypeCfg[+d.dictValue] = d.dictLabel;
+					})
+				}else this.$showToast(res.data.msg)
+			},
+			getList(){
+				this.$api.get('/wms/merchant/page',this.params).then(res=>{
+					if(res.data.code===0){
+						if(this.list.length<res.data.data.total){
+							this.params.page++;
+							this.list = [...this.list,...res.data.data.list];
+						}else this.isOver = true
+					}else this.$showModal(res.data.msg)
+				});
+			},
+			search(){
+				this.params.page = 1;
+				this.isOver = false;
+				this.list = [];
+				this.getList();
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		padding: 0 24rpx 20rpx;
+		background: #F4F8FB;
+		box-sizing: border-box;
+		
+		.topbg{
+			width: 100%;
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 0;
+		}
+		
+		.search{
+			width: 100%;
+			height: 84rpx;
+			padding: 6rpx 6rpx 6rpx 30rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 40rpx;
+			border: 1rpx solid #198CFF;
+			position: relative;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.btn{
+				width: 118rpx;
+				height: 68rpx;
+				background: #198CFF;
+				border-radius: 40rpx;
+				border: 1rpx solid #198CFF;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 28rpx;
+				color: #FFFFFF;
+				line-height: 68rpx;
+				text-align: center;
+				letter-spacing: 2rpx;
+			}
+		}
+		
+		.list{
+			width: 100%;
+			position: relative;
+			.item{
+				width: 100%;
+				padding: 36rpx 24rpx;
+				box-sizing: border-box;
+				margin-top: 20rpx;
+				background: #FFFFFF;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
+				border-radius: 16rpx;
+				.name{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 30rpx;
+					color: #1D2129;
+					line-height: 30rpx;
+					text-align: left;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+				.info{
+					.iitem{
+						width: 100%;
+						display: flex;
+						.pre{
+							width: 50%;
+							margin-top: 28rpx;
+							display: flex;
+							align-items: center;
+							.title{
+								width: 116rpx;
+								font-family: PingFangSC, PingFang SC;
+								font-weight: 400;
+								font-size: 24rpx;
+								color: #86909C;
+								line-height: 24rpx;
+								text-align: left;
+							}
+							.nr{
+								width: calc(100% - 116rpx);
+								font-family: PingFang-SC, PingFang-SC;
+								font-weight: bold;
+								font-size: 28rpx;
+								color: #4E5969;
+								line-height: 30rpx;
+								text-align: left;
+								overflow: hidden;
+								text-overflow: ellipsis;
+								white-space: nowrap;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>