Browse Source

数据统计

常志远 2 năm trước cách đây
mục cha
commit
aab669d21f

+ 2 - 2
App.vue

@@ -1,7 +1,7 @@
 <style lang="scss">
 	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
 	@import "@/uni_modules/uview-ui/index.scss";
-	// @import '@/assets/font/font.css';
+	@import '@/assets/font/font.css';
 	
 </style>
 <script>
@@ -34,7 +34,7 @@
 /deep/.u-divider{
 	color: rgba(182, 189, 195, 1);
 	font-size: 12px;
-	font-weight: bold;
+	
 	font-family: 'Regular';
 }
 	.uni-icon-success-no-circle:before {

BIN
assets/font/font/Alibaba-PuHuiTi-Regular.ttf


BIN
assets/font/font/PingFang Regular.ttf


BIN
assets/font/font/SourceHanSerifSC-Bold.otf


BIN
assets/font/font/SourceHanSerifSC-ExtraLight.otf


BIN
assets/font/font/SourceHanSerifSC-Heavy.otf


BIN
assets/font/font/SourceHanSerifSC-Light.otf


BIN
assets/font/font/SourceHanSerifSC-Medium.otf


BIN
assets/font/font/SourceHanSerifSC-Regular.otf


BIN
assets/font/font/SourceHanSerifSC-SemiBold.otf


+ 80 - 0
assets/font/font/font.css

@@ -0,0 +1,80 @@
+ @font-face {
+	  
+	      font-family: 'Alibaba-PuHuiTi-Regular';
+	  
+	      src: url('Alibaba-PuHuiTi-Regular.ttf');
+	  
+	      font-weight: normal;
+	  
+	      font-style: normal;
+	  
+	    }
+@font-face {  
+
+    font-family: 'PingFang Regular';
+
+    src: url('PingFang Regular.ttf');
+
+    font-weight: normal;  
+
+    font-style: normal;  
+
+  }
+
+@font-face {  
+
+    font-family: 'Bold';
+
+    src: url('SourceHanSerifSC-Bold.otf');
+
+    font-weight: normal;  
+
+    font-style: normal;  
+
+  }
+
+  @font-face {  
+
+    font-family: 'Medium';
+
+    src: url('SourceHanSerifSC-Medium.otf');
+
+    font-weight: normal;  
+
+    font-style: normal;  
+
+  }
+
+@font-face {  
+
+    font-family: 'SemiBold';
+
+    src: url('SourceHanSerifSC-SemiBold.otf');
+
+    font-weight: normal;  
+
+    font-style: normal;  
+
+  }
+@font-face {  
+
+    font-family: 'Regular';
+
+    src: url('SourceHanSerifSC-Regular.otf');
+
+    font-weight: normal;  
+
+    font-style: normal;  
+
+  }
+  @font-face {
+  
+      font-family: 'Light';
+  
+      src: url('SourceHanSerifSC-Light.otf');
+  
+      font-weight: normal;  
+  
+      font-style: normal;  
+  
+    }

BIN
assets/img/riLine-calendar-2-line@1x.png


BIN
components/bar-chart-box-fill 1.png


BIN
components/bar-chart-box-fill 2.png


+ 100 - 0
components/canteenTabbar.vue

@@ -0,0 +1,100 @@
+<template >
+	<view>
+		<u-tabbar v-model="myCurrent" :list="tabbarList" 
+		:before-switch="beforeSwitch" active-color="#1F4A99" inactive-color="#B3BED1"  ></u-tabbar>
+		
+	</view>
+</template>
+
+<script>
+ 	var img1=require('@/components/bar-chart-box-fill 1.png')
+	var img2=require('@/components/bar-chart-box-fill 2.png')
+	var img3=require('@/components/file-list-3-fill.png')
+	var img4=require('@/components/file-list-3-fill (1).png')
+ 	export default {
+		name:"tabbarJob",
+		props:{
+			current: 0,
+			elderStatus: false
+		},
+		data() {
+			return {
+				activeColor:"#1F4A99",
+				oldindex:this.current,
+				 myCurrent:this.current,
+				 tabbarList: [
+					 {
+					 
+				 		iconPath: img2,
+				 		selectedIconPath: img1,
+				 		text: '主页 ',
+						pagePath2:"/pages/canteenManagement/dataStatistics/dataStatistics",
+						login:false,
+				 	},
+					{
+					 
+						iconPath: img4,
+						selectedIconPath: img3,
+						text: '消费明细 ',
+						login:true,
+						pagePath2:"/pages/canteenManagement/consumption/consumption",
+						
+					
+					},
+				 	{
+				 		iconPath: "account",
+				 		selectedIconPath: "account-fill",
+				 		text: '个人中心',
+						login:true,
+						pagePath2:"/pages/canteenManagement/mine/mine",
+				 	}
+			 ],
+			};
+			
+		},methods:{
+			setcount(c){
+				//this.myCurrent=c
+			},
+			beforeSwitch(index){
+			
+				var bl=false
+				
+				if(index==this.current){
+					
+					return false
+				}
+				//this.myCurrent=index
+				var url =this.tabbarList[index].pagePath2;
+				
+				if(this.tabbarList[index].login){
+					var userInfo=this.carhelp.getPersonInfo()
+					if(userInfo){
+						
+					}else{
+						url="/pages/login/index"
+						bl=true	
+					}
+					
+				}
+				uni.navigateTo({
+					url: url
+				})
+			
+				
+				
+			},
+			
+		},
+		mounted(){
+			
+		},destroyed(){
+			
+		}
+		
+		
+	}
+</script>
+
+<style>
+	 
+</style>

BIN
components/file-list-3-fill (1).png


BIN
components/file-list-3-fill.png


+ 1 - 1
main.js

@@ -2,7 +2,7 @@ import App from './App'
 import Vue from 'vue'
 import getOpenId from './apis/utils/init.js'
 import getALIOpenId from './apis/utils/initALI.js'
-
+import './assets/font/font/font.css'
 var IS_WEIXIN = /MicroMessenger/.test(window.navigator.userAgent)
 var IS_ALI = /AlipayClient/.test(window.navigator.userAgent)
 

+ 36 - 0
pages.json

@@ -338,6 +338,42 @@
             }
             
         }
+        ,{
+            "path" : "pages/canteenManagement/dataStatistics/dataStatistics",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/canteenManagement/consumption/consumption",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/canteenManagement/mine/mine",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/canteenManagement/dataStatistics/records",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 
 	

+ 30 - 0
pages/canteenManagement/consumption/consumption.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		消费
+		
+		<canteenTabbar  ref="mytabbar"
+				current="1"></canteenTabbar>
+	</view>
+</template>
+
+<script>
+	import canteenTabbar from "../../../components/canteenTabbar.vue"
+	export default {
+		components: {
+			canteenTabbar
+		},
+		data() {
+			
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 334 - 0
pages/canteenManagement/dataStatistics/dataStatistics.vue

@@ -0,0 +1,334 @@
+<template>
+	<view>
+		<view class="head">
+			<view class="title">
+				<view class="name">
+					食堂管理系统
+				</view>
+				<view class="option" @click="changePlaceShow">
+					地方铁路食堂<u-icon name="arrow-down"></u-icon>
+					<view class="options-box" v-if="placeShow">
+						<view class="options-item">
+							选项1
+						</view>
+						<view class="options-item">
+							选项2
+						</view>
+						<view class="options-item">
+							选项3
+						</view>
+					</view>
+				</view>
+
+			</view>
+			<!-- 曲线图 -->
+			<view class="chart">
+				<view class="chart-title">
+					<view class="name">
+						月度饭卡消费曲线图
+					</view>
+					<view class="time" @click="changeTimeShow">
+						2023年4月<u-icon name="arrow-down"></u-icon>.
+						<view class="time-box" v-if="timeShow">
+							<view class="options-item">
+								2023年4月
+							</view>
+
+						</view>
+					</view>
+				</view>
+				<img src="../../../assets/img/chart.png" alt="">
+			</view>
+
+		</view>
+
+		<!-- 订餐上报 -->
+		<view class="order-food">
+			<view class="title">
+				<view class="name">
+					<text><img src="../../../assets/img/riLine-calendar-2-line@1x.png" alt=""></text>订餐上报
+				</view>
+				<view class="record">
+					全部记录 <u-icon name="arrow-right" size="20"></u-icon>
+				</view>
+			</view>
+			<!-- 记录卡片 -->
+			<view class="record-card" v-for="item in 2">
+				<view class="record-title">
+					<view class="date">
+						2023年4月10日 星期一
+					</view>
+					<view class="people-number">
+						订餐人数 <text class="num1">29</text>
+					</view>
+				</view>
+				<view class="classify">
+					<view class="item">
+						<view class="type1">
+							机务段
+						</view>
+						<view class="number">
+							订餐人数 <text class="num2">10</text>
+						</view>
+					</view>
+
+					<view class="item">
+						<view class="type2">
+							荆州南
+						</view>
+						<view class="number">
+							订餐人数 <text class="num3">19</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+<canteenTabbar  ref="mytabbar"
+		current="0"></canteenTabbar> 
+	</view>
+</template>
+
+<script>
+	import canteenTabbar from "../../../components/canteenTabbar.vue"
+	export default {
+		components: {
+			canteenTabbar
+		},
+		data() {
+			return {
+				placeShow: false,
+				timeShow: false
+			}
+		},
+		methods: {
+			changePlaceShow() {
+				this.placeShow = !this.placeShow
+			},
+			changeTimeShow() {
+				this.timeShow = !this.timeShow
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		padding-bottom: 100px;
+
+	}
+
+	.head {
+		padding: 24rpx 32rpx;
+		background: linear-gradient(180deg, rgba(183, 208, 255, 1) 0%, rgba(244, 244, 246, 1) 100%);
+		height: 177px;
+
+		.title {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.name {
+				color: rgba(31, 74, 153, 1);
+				font-size: 40rpx;
+				font-family: 'Medium';
+			}
+
+			.option {
+				color: rgba(65, 80, 88, 1);
+				font-size: 32rpx;
+				position: relative;
+
+				.options-box {
+					background-color: #fff;
+					z-index: 999;
+					width: 240rpx;
+					box-shadow: 0px 0px 2px #999999;
+					position: absolute;
+					top: 50rpx;
+					left: 0px;
+
+					.options-item {
+						line-height: 60rpx;
+						padding-left: 8rpx;
+					}
+
+				}
+			}
+		}
+
+		// 曲线图
+		.chart {
+			border-radius: 12px;
+			margin-top: 24rpx;
+			background-color: #fff;
+			height: 268px;
+
+			.chart-title {
+				padding: 38rpx 24rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				font-size: 32rpx;
+
+				.name {
+					color: rgba(51, 51, 51, 1);
+					font-weight: bold;
+					font-family: 'Medium';
+				}
+
+				.time {
+					color: rgba(119, 119, 119, 1);
+					position: relative;
+
+					.time-box {
+						background-color: #fff;
+						z-index: 999;
+						width: 200rpx;
+						box-shadow: 0px 0px 2px #999999;
+						position: absolute;
+						top: 50rpx;
+						left: 0px;
+
+						.options-item {
+							line-height: 64rpx;
+							padding-left: 8rpx;
+						}
+
+					}
+				}
+			}
+
+			img {
+				width: 100%;
+				height: 200px;
+			}
+		}
+	}
+
+	// 订餐上报
+
+	.order-food {
+		padding: 0 32rpx;
+		margin-top: 160px;
+		font-family: 'PingFang Regular';
+
+		.title {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.name {
+				color: rgba(56, 109, 205, 1);
+				font-size: 36rpx;
+				line-height: 36rpx;
+				font-weight: bold;
+
+				text {
+					vertical-align: middle;
+					margin-right: 8rpx;
+				}
+			}
+
+			.record {
+				color: rgba(119, 119, 119, 1);
+
+			}
+		}
+	}
+
+	// 记录卡片
+	.record-card {
+		padding: 24rpx;
+		margin-top: 24rpx;
+		border-radius: 12px;
+		background-color: rgba(255, 255, 255, 1);
+
+		.record-title {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-bottom: 16rpx;
+
+			.date {
+				color: rgba(51, 51, 51, 1);
+				font-size: 32rpx;
+		 }
+
+			.people-number {
+				color: rgba(51, 51, 51, 1);
+				font-size: 16px;
+
+				text {
+					margin-left: 8rpx;
+				}
+			}
+		}
+
+		.classify {
+			display: flex;
+
+			align-items: center;
+
+			.item {
+				display: flex;
+				align-items: center;
+
+				.type1 {
+				 width: 112rpx;
+					height: 48rpx;
+					line-height: 48rpx;
+					border-radius: 4px;
+					border: 1px solid rgba(96, 184, 201, 1);
+					color: rgba(96, 184, 201, 1);
+					text-align: center;
+					margin-right: 8rpx;
+				}
+
+				.type2 {
+					width: 112rpx;
+					height: 48rpx;
+					line-height: 48rpx;
+					border-radius: 4px;
+				 border: 1px solid rgba(77, 140, 255, 1);
+					color: rgba(77, 140, 255, 1);
+					text-align: center;
+					margin-right: 8rpx;
+				}
+
+				.number {
+					color: rgba(51, 51, 51, 1);
+
+					text {
+						margin-left: 8rpx;
+					}
+				}
+			}
+
+			.item:nth-of-type(2) {
+				margin-left: 48rpx;
+			}
+		}
+
+		.num1 {
+			color: #FF6923;
+			font-weight: bold;
+		}
+
+		.num2 {
+			color: #85C8D5;
+			font-weight: bold;
+		}
+
+		.num3 {
+			color: #74A5FF;
+			font-weight: bold;
+		}
+	}
+
+	/deep/.uicon-arrow-down,
+	/deep/.uicon-arrow-right {
+		margin-left: 8rpx;
+
+	}
+</style>

+ 1 - 1
pages/canteenManagement/login.vue

@@ -112,7 +112,7 @@
 
 		.name {
 			color: rgba(16, 16, 16, 1);
-			font-size: 40rDDpx;
+			font-size: 40rpx;
 			text-align: center;
 			font-weight: bold;
 			margin-top: 8rpx;

+ 30 - 0
pages/canteenManagement/mine/mine.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		mine
+		<canteenTabbar  ref="mytabbar"
+				current="2"></canteenTabbar>
+	</view>
+	
+</template>
+
+<script>
+	import canteenTabbar from "../../../components/canteenTabbar.vue"
+	export default {
+		components: {
+			canteenTabbar
+		},
+		data() {
+			
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 1 - 1
pages/login/login.vue

@@ -110,7 +110,7 @@
 
 		.name {
 			color: rgba(16, 16, 16, 1);
-			font-size: 40rDDpx;
+			font-size: 40rpx;
 			text-align: center;
 			font-weight: bold;
 			margin-top: 8rpx;

+ 2 - 1
pages/mine/mine.vue

@@ -311,7 +311,7 @@
 
 <style lang="scss" scoped>
 	page{
-		font-family: 'Regular';
+		font-family: 'PingFang Regular';
 	}
 	// 个人信息
 	.person-infos {
@@ -452,6 +452,7 @@
 					opacity: 0.7;
 					color: rgba(49, 54, 66, 1);
 					font-size: 24rpx;
+					margin-top: 8rpx;
 					.icon{
 						vertical-align: middle;
 						margin-right: 4rpx;

+ 6 - 0
pages/mine/myMealCard.vue

@@ -100,13 +100,16 @@
 		.head{
 			display: flex;
 			justify-content: space-between;
+			align-items: center;
 			.balance{
 				color: rgba(51, 51, 51, 1);
+				font-family: 'Regular';
 			}
 			.time{
 				opacity: 0.7;
 				color: rgba(49, 54, 66, 1);
 				font-size: 24rpx;
+				font-family: 'PingFang Regular';
 				.icon{
 					vertical-align: middle;
 					margin-right: 4rpx;
@@ -148,6 +151,7 @@
 			  color: rgba(16, 16, 16, 1);
 			  font-size: 36rpx;
 			  border-top: 1px solid #E6E6E6;
+			  font-family: 'Alibaba-PuHuiTi-Regular';
 		  }
 		  .each{
 		  	display: flex;
@@ -160,6 +164,7 @@
 		  			color: #101010;
 		  			font-size: 32rpx;
 					font-weight: bold;
+					font-family: 'Alibaba-PuHuiTi-Regular';
 		  		}
 		  		.date{
 		  			color: rgba(119, 119, 119, 1);
@@ -169,6 +174,7 @@
 		  	.number{
 		  		color: rgba(31, 74, 153, 1);
 		  		font-size: 48rpx;
+				font-weight: bold;
 		  	}
 		  	
 		  }

+ 1 - 0
pages/mine/paymentCode.vue

@@ -76,6 +76,7 @@
 <style lang="scss" scoped>
 	page{
 		background-color: #2A8EFB;
+		font-family: 'PingFang Regular';
 	}
 	/deep/.u-navbar{
 		background-color: #2A8EFB !important;

+ 3 - 0
pages/scanToPay/payResult.vue

@@ -90,6 +90,7 @@
 			color: rgba(16, 16, 16, 1);
 			font-size: 48rpx;
 			margin-top: 8rpx;
+			font-family: 'PingFang Regular';
 			
 		}
 		// 订单信息
@@ -102,10 +103,12 @@
 				.title{
 					color: rgba(134, 137, 140, 1);
 					font-size: 32rpx;
+					font-family: 'PingFang Regular';
 				}
 				.value{
 					color: rgba(51, 51, 51, 1);
 					font-size: 32rpx;
+					
 				}
 			}
 		}