chenrui 3 years ago
parent
commit
bc604917e2

+ 12 - 2
pages.json

@@ -157,8 +157,14 @@
                 "navigationBarTitleText": "打印标签",
                 "navigationBarTitleText": "打印标签",
                 "enablePullDownRefresh": false
                 "enablePullDownRefresh": false
             }
             }
-            
-        }
+        },
+		{
+			"path": "pages/stock/index", // 库存
+			"style": {
+				"navigationBarTitleText": "库存",
+				"enablePullDownRefresh": false
+			}
+		}
     ],
     ],
 	"globalStyle": {
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTextStyle": "black",
@@ -174,6 +180,10 @@
 	"tabBar": {
 	"tabBar": {
 		"fontSize": "14px",
 		"fontSize": "14px",
 		"list": [
 		"list": [
+		{
+			"pagePath": "pages/stock/index",
+			"text": "库存"
+		},
 		{
 		{
 			"pagePath": "pages/index/index",
 			"pagePath": "pages/index/index",
 			"text": "首页"
 			"text": "首页"

+ 6 - 1
pages/index/index.vue

@@ -38,11 +38,16 @@
 			this.theme = theme
 			this.theme = theme
 			uni.setTabBarItem({
 			uni.setTabBarItem({
 			  "index": 0,
 			  "index": 0,
+			  "iconPath": "static/"+theme+"/tabbar/stock.png",
+			  "selectedIconPath": "static/"+theme+"/tabbar/stock-active.png",
+			})
+			uni.setTabBarItem({
+			  "index": 1,
 			  "iconPath": "static/"+theme+"/tabbar/home.png",
 			  "iconPath": "static/"+theme+"/tabbar/home.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/home-active.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/home-active.png",
 			})
 			})
 			uni.setTabBarItem({
 			uni.setTabBarItem({
-			  "index": 1,
+			  "index": 2,
 			  "iconPath": "static/"+theme+"/tabbar/user.png",
 			  "iconPath": "static/"+theme+"/tabbar/user.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/user-active.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/user-active.png",
 			})
 			})

+ 90 - 0
pages/stock/index.vue

@@ -0,0 +1,90 @@
+<template>
+	<view class="stock-wrap">
+		<!-- 统计 -->
+		<view class="panel-box">
+			<view class="item-box">
+				<u-count-to :end-val="1542" separator=","></u-count-to>
+				<view>库存总数量(个)</view>
+			</view>
+			<view class="item-box">
+				<u-count-to :end-val="1542" separator=","></u-count-to>
+				<view>库存总成本(¥)</view>
+			</view>
+		</view>
+		<!-- 库存查询 -->
+		<view class="stock-con">
+			<view class="stock-tit">
+				<view class="u-line"></view>库存查询
+			</view>
+			<u-form :model="form" ref="uForm" label-width="180">
+				<u-form-item label="产品编码"><u-input v-model="form.productCode" placeholder="请输入产品编码" style="text-align: right;" /></u-form-item>
+				<u-form-item label="原厂编码"><u-input v-model="form.productOrigCode" placeholder="请输入原厂编码" style="text-align: right;" /></u-form-item>
+				<u-form-item label="产品名称"><u-input v-model="form.productName" placeholder="请输入产品名称" style="text-align: right;" /></u-form-item>
+				<u-form-item label="产品品牌"><view></view></u-form-item>
+				<u-form-item label="只查看有库存"><u-switch slot="right" v-model="form.zeroQtyFlag"></u-switch></u-form-item>
+			</u-form>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return {
+				form: {
+					productCode: '', //  产品编码
+					productName: '', //  产品名称
+					productOrigCode: '', //  原厂编码
+					productBrandSn: undefined, //  产品品牌
+					productTypeSn1: '', //  产品分类1
+					productTypeSn2: '', //  产品分类2
+					productTypeSn3: '', //  产品分类3
+					zeroQtyFlag: false //  库存情况
+				}
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.stock-wrap{
+		width: 100%;
+		padding: 30upx;
+		.panel-box {
+			background-color: #ffffff;
+			padding: 20upx 20upx;
+			border-radius: 20upx;
+			box-shadow: 3upx 2upx 6upx #eee;
+			margin-bottom: 30upx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			.item-box{
+				text-align: center;
+				width: 50%;
+			}
+			.item-box:first-child{
+				border-right: 1px solid #e4e7ed;
+			}
+		}
+		.stock-con{
+			background-color: #ffffff;
+			border-radius: 20upx;
+			box-shadow: 3upx 2upx 6upx #eee;
+			padding: 20upx;
+			.stock-tit{
+				.u-line{
+					display: inline-block;
+					width: 6upx;
+					height: 40upx;
+					background-color: red;
+					vertical-align: bottom;
+					margin: 0 20upx 0 10upx;
+				}
+			}
+		}
+	}
+</style>

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


BIN
static/default/tabbar/stock.png