lilei 3 роки тому
батько
коміт
8f93c61665

+ 115 - 0
components/icon-items-list/icon-items-list.vue

@@ -0,0 +1,115 @@
+<template>
+	<div class="icon-items-list" :class="'icon-items-list-'+type">
+		<div class="icon-items-icons" v-for="(item,index) in list" :key="item.id" :style="{width:itemWidth}" @click="toPage(item,index)">
+			<image class="icon-items-imgse" :class="item.auth?'':'uni-img-gray'" :fade-show='true' :src="item.icon+'?x-oss-process=image/resize,m_fixed,h_140,w_215,color_ffffff'"></image>
+			<div class="icon-items-text">{{item.name.slice(0,14)}}</div>
+		</div>
+		<div class="nodata" v-if="list.length==0">
+			<u-empty :text="noDataText" mode="list"></u-empty>
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		name: "iconItemsList",
+		props:{
+			// 套餐服务项 或配件id
+			list:{
+				type: Array,
+				default: function(){
+					return []
+				}
+			},
+			itemWidth: {
+				type: String,
+				default: '25%'
+			},
+			type: {
+				type: String,
+				default: 'icon'
+			},
+			noDataText: {
+				type: String,
+				default: '暂无数据'
+			}
+		},
+		data() {
+			return {
+				datas: this.list
+			}
+		},
+		methods: {
+			toPage(item,index){
+				if(!item.auth){
+					uni.showToast({icon: 'none',title: '你无权限操作此功能'})
+					return
+				}
+				if(item.url&&item.url!=''){
+					if(item.target == 'page'){
+						// console.log(item.url)
+						// 生意经
+						if(this.type=="knowledge"){
+							this.$store.state.vuex_knowledgePageNo = index
+						}
+						uni.navigateTo({
+							url: item.url
+						})
+					}
+					if(item.target == 'tabPage'){
+						uni.switchTab({
+							url: item.url
+						})
+					}
+					if(item.target == 'fun'){
+						item.url()
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.icon-items-list{
+		align-items: center;
+		display: flex;
+		flex-wrap: wrap;
+		.nodata{
+			text-align: center;
+			font-size: 24upx;
+			width: 100%;
+			color: #999999;
+		}
+	}
+	.icon-items-list-icon{
+		.icon-items-imgse{
+			width: 64upx;
+			height: 64upx;
+		}
+		.icon-items-text{
+			font-size: 28upx;
+			color: #666666;
+		}
+	}
+	.icon-items-icons{
+		text-align: center;
+		margin: 20upx 0;
+	}
+	// 生意经
+	.icon-items-list-knowledge{
+		align-items: flex-start;
+		justify-content: space-between;
+		.icon-items-imgse{
+			width: 100%;
+			height: 140upx;
+			border-radius: 10upx;
+		}
+		.icon-items-text{
+			font-size: 28upx;
+			color: #666666;
+			padding: 0 10upx;
+			min-height: 70upx;
+		}
+	}
+</style>

+ 119 - 25
pages/index/index.vue

@@ -1,25 +1,44 @@
 <template>
 	<view class="homePage-container">
-		<view class="scan-con">
-			<u-icon name="scan" class="scan-icon" size="70"></u-icon>
-			<text class="scan-txt">扫描识别</text>
-		</view>
+		 <!-- 数字货架 -->
+		 <div class="panel-box">
+		 	<div class="panel-title"><div class="texts">数字货架</div></div>
+		 	<div class="panel-body"><iconItemsList :list="storageRacksNavList"></iconItemsList></div>
+		 </div>
+		 <!-- 调回管理 -->
+		 <div class="graid-box">
+			 <div class="graid-box-1">
+				 <div class="title">调回管理</div>
+				 <div>商品调回记录查询</div>
+			 </div>
+			 <div class="graid-box-1">
+				 <div class="title">补打贴签</div>
+				 <div>遗漏标签快捷处理</div>
+			 </div>
+		 </div>
 	</view>
 </template>
 <script>
+	import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
 	export default {
+		components: {
+			iconItemsList,
+		},
 		data() {
 			return {
-				
+				// 数字货架
+				storageRacksNavList: [],
+				theme: ''
 			}
 		},
 		onLoad() {
 			// 设置底部tabbar 样式
 			const theme = getApp().globalData.theme
+			this.theme = theme
 			uni.setTabBarItem({
 			  "index": 0,
-			  "iconPath": "static/"+theme+"/tabbar/record.png",
-			  "selectedIconPath": "static/"+theme+"/tabbar/record-active.png",
+			  "iconPath": "static/"+theme+"/tabbar/home.png",
+			  "selectedIconPath": "static/"+theme+"/tabbar/home-active.png",
 			})
 			uni.setTabBarItem({
 			  "index": 1,
@@ -34,6 +53,43 @@
 				console.log(res)
 			  }
 			})
+			// 数组货架导航按钮
+			this.storageRacksNavList = [
+				{
+					id: 'scanVin',
+					icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
+					name: '待确认',
+					url: function() {
+						_this._pickPhoto('carVinNumber')
+					},
+					target: 'fun',
+					auth: true
+				},
+				{
+					id: 'scanGoods',
+					icon: `/static/${this.theme}/navIcon/home_icon_out@3x.png`,
+					name: '待出库',
+					url: '/pages/digitalShelf/orderList',
+					target: 'page',
+					auth: true
+				},
+				{
+					id: 'bhrk',
+					icon: `/static/${this.theme}/navIcon/home_icon_warehousing@3x.png`,
+					name: '待入库',
+					url: '/pages/digitalShelf/stockPut',
+					target: 'page',
+					auth: true
+				},
+				{
+					id: 'jsgl',
+					icon: `/static/${this.theme}/navIcon/home_icon_entire@3x.png`,
+					name: '全部',
+					url: '/pages/digitalShelf/settlementManage/settlementManage',
+					target: 'page',
+					auth: true
+				}
+			];
 		},
 		onShow() {
 			
@@ -45,27 +101,65 @@
 </script>
 
 <style lang="scss">
-	page{
-		height: 100%;
-	}
 	.homePage-container {
 		width: 100%;
-		height: 100%;
-		background-color: rgba(0,0,0,.6);
-		.scan-con{
-			background-color: #ed1c24;
-			width: 260upx;
-			height: 260upx;
-			border-radius: 50%;
-			color: #fff;
-			margin: 300upx auto 0;
-			text-align: center;
-			.scan-icon{
-				margin: 70upx 0 14upx;
+		padding: 30rpx;
+		.graid-box{
+			display: flex;
+			align-items: center;
+			.graid-box-1{
+				background-color: #ffffff;
+				border-radius: 30upx;
+				box-shadow: 3upx 2upx 6upx #eee;
+				padding: 30rpx;
+				width: 50%;
+				font-size: 28rpx;
+				color: #424D5E;
+				.title{
+					font-size: 45rpx;
+					color: #191919;
+					font-weight: bold;
+				}
+			}
+			> div{
+				&:first-child{
+					margin-right: 15rpx;
+				}
+				&:last-child{
+					margin-left: 15rpx;
+				}
+			}
+		}
+		.panel-box {
+			background-color: #ffffff;
+			border-radius: 30upx;
+			padding: 10upx 20upx;
+			box-shadow: 3upx 2upx 6upx #eee;
+			margin-bottom: 30upx;
+			.panel-title {
+				display: flex;
+				align-items: center;
+				padding: 20upx 12upx;
+				.texts {
+					font-size: 32upx;
+					flex-grow: 1;
+				}
+				.btns {
+					font-size: 28upx;
+					color: #999;
+					display: flex;
+					align-items: center;
+				}
 			}
-			.scan-txt{
-				display: block;
-				font-size: 30upx;
+			.panel-body {
+				padding: 0 10upx;
+				.nodata {
+					text-align: center;
+					font-size: 24upx;
+					width: 100%;
+					color: #999999;
+					padding: 30upx 0;
+				}
 			}
 		}
 	}

BIN
static/default/navIcon/home_icon_confirm@3x.png


BIN
static/default/navIcon/home_icon_entire@3x.png


BIN
static/default/navIcon/home_icon_out@3x.png


BIN
static/default/navIcon/home_icon_warehousing@3x.png


BIN
static/default/tabbar/home-active.png


+ 0 - 0
static/default/tabbar/record.png → static/default/tabbar/home.png


BIN
static/default/tabbar/record-active.png


BIN
static/default/tabbar/user.png