wkyy 2 年之前
父節點
當前提交
f77f7b3a36
共有 7 個文件被更改,包括 545 次插入259 次删除
  1. 30 0
      apis/pagejs/mine.js
  2. 40 0
      apis/pagejs/staffHome.js
  3. 4 2
      config/.env.dev.js
  4. 135 88
      pages/mine/myMealCard.vue
  5. 40 4
      pages/mine/paymentCode.vue
  6. 248 138
      pages/staffHome/orderReport.vue
  7. 48 27
      pages/staffHome/staffHome.vue

+ 30 - 0
apis/pagejs/mine.js

@@ -0,0 +1,30 @@
+import request from '@/apis/utils/request'
+import requestWhite from '@/apis/utils/requestWhite'
+ 
+import Qs from 'qs';
+
+// 订餐月度记录
+export function cardPayAmountList(formData) {
+	return request({
+		url: '/mobile/cardInfo/cardPayAmountList',
+		data: formData,
+		method: 'post'
+	})
+}
+
+// 二维码获取信息
+export function loadCardData() {
+	return request({
+		url: '/mobile/payAmountRecord/loadCardData',
+		method: 'get'
+	})
+}
+
+// 扫码付款
+export function payAmount(formData) {
+	return request({
+		url: '/mobile/payAmountRecord/payAmount',
+		data: formData,
+		method: 'post'
+	})
+}

+ 40 - 0
apis/pagejs/staffHome.js

@@ -0,0 +1,40 @@
+import request from '@/apis/utils/request'
+import requestWhite from '@/apis/utils/requestWhite'
+ 
+import Qs from 'qs';
+
+// 订餐月度记录
+export function monthList(formData) {
+	return request({
+		url: '/mobile/orderFoodRecord/monthList',
+		data: formData,
+		method: 'post'
+	})
+}
+
+// 订餐
+export function add(formData) {
+	return request({
+		url: '/mobile/orderFoodRecord/add',
+		data: formData,
+		method: 'post'
+	})
+}
+
+// 查询人员是否能订餐
+export function loadUserOrderFlag(formData) {
+	return request({
+		url: '/mobile/orderFoodRecord/loadUserOrderFlag',
+		data: formData,
+		method: 'post'
+	})
+}
+
+// 订餐信息修改
+export function update(formData) {
+	return request({
+		url: '/mobile/orderFoodRecord/update',
+		data: formData,
+		method: 'post'
+	})
+}

+ 4 - 2
config/.env.dev.js

@@ -1,6 +1,7 @@
 const UNI_APP = {  
 	ProjectName :"地方铁路",
-	BASE_URL: 'http://36.134.122.108/railroad-server/',
+	// BASE_URL: 'http://36.134.122.108/railroad-server/',
+	BASE_URL: 'http://192.168.33.220:8086/railroad-server/',
 	IMG_URL:"http://www.jsrailway.com.cn/",
 	
 	//BASE_URL:'http://192.168.77.162:8081/railroad-server/',
@@ -11,7 +12,8 @@ const UNI_APP = {
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
-	openId:"oBEnI6GDWCRQqn_xlyPlCYFY8Amg",//zkx
+	// openId:"oBEnI6GDWCRQqn_xlyPlCYFY8Amg",//zkx
+	openId:"oBEnI6FVaHBZOgnxVa70ePPIBd68",
 	//openId:"oBEnI6L-ne5I6ZMZIRWpmLhlgNBs",
 	//openId:"oBEnI6PiaBMNUMTnjT0ffT1R2JOk",//杨所
 	//openId:"oBEnI6N9gRq3xOVlw34JfYjhtB9k",//  伊明

+ 135 - 88
pages/mine/myMealCard.vue

@@ -13,172 +13,219 @@
 			</view>
 			<view class="main">
 				<view class="number">
-					330
+					{{balance}}
 				</view>
 				<view class="img">
 					<img src="../../assets/img/ze-card@1x.png" alt="">
 				</view>
 			</view>
-			
+
 		</view>
-		
+
 		<view class="content">
 			<view class="tabs">
-				<u-tabs bar-width="100" inactive-color="#bbbbbb" active-color="#101010"  :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+				<u-tabs bar-width="100" inactive-color="#bbbbbb" active-color="#101010" :list="list" :is-scroll="false"
+					:current="current" @change="change"></u-tabs>
 			</view>
 			<!-- 消费 -->
 			<view class="consumption" v-if="this.current==0">
 				<view class="total">
-					6月消费105
+					{{month}}月消费{{payAmountTotal}}
 				</view>
-				<view class="each" v-for="item in 7">
+				<view class="each" v-for="(item,index) in payAmountList" :key="index">
 					<view class="place-date">
 						<view class="place">
-							地方铁路食堂
+							{{item.deviceName}}
 						</view>
 						<view class="date">
-							2023-04-07 12:00
+							{{item.payTime}}
 						</view>
 					</view>
 					<view class="number">
-						-15
+						-{{item.payAmount}}
 					</view>
 				</view>
 			</view>
 			<!-- 餐费存入 -->
 			<view class="deposit" v-if="this.current==1">
-				<view class="each" v-for="item in 5">
+				<view class="each" v-for="(item,index) in rechargeRecordList" :key="index">
 					<view class="place-date">
 						<view class="place">
-							2023年4月餐费存入
+							{{item.chargeTime.slice(0,4)}}年{{parseInt(item.chargeTime.slice(5,7))}}月餐费存入
 						</view>
 						<view class="date">
-							2023-04-07 12:00
+							{{item.chargeTime}}
 						</view>
 					</view>
 					<view class="number">
-						+330
+						+{{item.rechargeAmount}}
 					</view>
 				</view>
 			</view>
-			
+
 		</view>
-		
-		<u-divider   bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
+
+		<!-- <u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider> -->
 	</view>
 </template>
 
 <script>
+	import * as mineAPI from '@/apis/pagejs/mine.js'
+	
 	export default {
 		data() {
 			return {
 				list: [{
-									name: '余额消费'
-								}, {
-									name: '餐费存入'
-								}],
-								current: 0
+					name: '余额消费'
+				}, {
+					name: '餐费存入'
+				}],
+				current: 0,
+				balance: 0,
+				payAmountList: [],
+				payAmountTotal: 0,
+				rechargeRecordList: [],
+				month: ''
 			}
 		},
+		onReady() {
+			var date = new Date();
+			this.month = date.getMonth() + 1;
+			
+			this.getCardPayAmountList();
+		},
 		methods: {
+			getCardPayAmountList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				mineAPI.cardPayAmountList().then((response) => {
+					uni.hideLoading();
+					this.balance = response.data.balance;
+					this.payAmountList = response.data.payAmountList;
+					this.payAmountTotal = response.data.payAmountTotal;
+					this.rechargeRecordList = response.data.rechargeRecordList;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			change(index) {
-							this.current = index;
-						}
+				this.current = index;
+			}
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-	page{
+	page {
 		padding-bottom: 100px;
 	}
-	.background{
-		background: linear-gradient(-0.06deg, rgba(246,248,248,1) -0.15%,rgba(240,225,198,1) 48.47%,rgba(236,193,148,1) 101.15%);
+
+	.background {
+		background: linear-gradient(-0.06deg, rgba(246, 248, 248, 1) -0.15%, rgba(240, 225, 198, 1) 48.47%, rgba(236, 193, 148, 1) 101.15%);
 		padding: 32rpx;
 		color: #fff;
 		height: 231px;
-		.head{
+
+		.head {
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
-			.balance{
+
+			.balance {
 				color: rgba(51, 51, 51, 1);
 				font-family: 'Regular';
 			}
-			.time{
+
+			.time {
 				opacity: 0.7;
 				color: rgba(49, 54, 66, 1);
 				font-size: 24rpx;
 				font-family: 'PingFang Regular';
-				.icon{
+
+				.icon {
 					vertical-align: middle;
 					margin-right: 4rpx;
 				}
 			}
 		}
-		.main{
-			
-				display: flex;
-				justify-content: space-between;
-			.number{
+
+		.main {
+
+			display: flex;
+			justify-content: space-between;
+
+			.number {
 				color: rgba(16, 16, 16, 1);
 				font-size: 80rpx;
 				font-weight: bold;
 			}
-			.img{
-				margin-top:-20rpx
+
+			.img {
+				margin-top: -20rpx
 			}
 		}
-		
-		
-		
-}
-
-  .content{
-	  margin: -260rpx 32rpx 24rpx;
-	  background-color: #fff;
-	  border-radius: 8px 8px 0px 0px;
-	  overflow: hidden;
-	  min-height: 800rpx;
-	  /deep/.u-tab-bar{
-	  			 background-color: #0076FF !important ;
-	  }
-	  // 消费
-	  .consumption,.deposit{
-		  padding: 0 36rpx;
-		  .total{
-			  line-height: 88rpx;
-			  color: rgba(16, 16, 16, 1);
-			  font-size: 36rpx;
-			  border-top: 1px solid #E6E6E6;
-			  font-family: 'Alibaba-PuHuiTi-Regular';
-		  }
-		  .each{
-		  	display: flex;
-		  	justify-content: space-between;
-		  	align-items: center;
-		  	padding: 28rpx 0;
-		  	border-top: 1px solid #E6E6E6;
-		  	.place-date{
-		  		.place{
-		  			color: #101010;
-		  			font-size: 32rpx;
+
+
+
+	}
+
+	.content {
+		margin: -260rpx 32rpx 24rpx;
+		background-color: #fff;
+		border-radius: 8px 8px 0px 0px;
+		overflow: hidden;
+		min-height: 800rpx;
+
+		/deep/.u-tab-bar {
+			background-color: #0076FF !important;
+		}
+
+		// 消费
+		.consumption,
+		.deposit {
+			padding: 0 36rpx;
+
+			.total {
+				line-height: 88rpx;
+				color: rgba(16, 16, 16, 1);
+				font-size: 36rpx;
+				border-top: 1px solid #E6E6E6;
+				font-family: 'Alibaba-PuHuiTi-Regular';
+			}
+
+			.each {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 28rpx 0;
+				border-top: 1px solid #E6E6E6;
+
+				.place-date {
+					.place {
+						color: #101010;
+						font-size: 32rpx;
+						font-weight: bold;
+						font-family: 'Alibaba-PuHuiTi-Regular';
+					}
+
+					.date {
+						color: rgba(119, 119, 119, 1);
+						margin-top: 16rpx;
+					}
+				}
+
+				.number {
+					color: rgba(31, 74, 153, 1);
+					font-size: 48rpx;
 					font-weight: bold;
-					font-family: 'Alibaba-PuHuiTi-Regular';
-		  		}
-		  		.date{
-		  			color: rgba(119, 119, 119, 1);
-		  			margin-top: 16rpx;
-		  		}
-		  	}
-		  	.number{
-		  		color: rgba(31, 74, 153, 1);
-		  		font-size: 48rpx;
-				font-weight: bold;
-		  	}
-		  	
-		  }
-	  }
-  }
+				}
 
-</style>
+			}
+		}
+	}
+</style>

+ 40 - 4
pages/mine/paymentCode.vue

@@ -7,10 +7,11 @@
 			<view class="head">
 				<view class="person">
 					<view class="photo">
-						<img src="../../assets/img/shareP.png" alt="">
+						<img v-if="userInfo.headImg" :src="userInfo.headImg" alt="">
+						<u-avatar v-else size="48"></u-avatar>
 					</view>
 					<view class="name">
-						王泽
+						{{userInfo.name}}
 					</view>
 				</view>
 				<view class="balance">
@@ -18,7 +19,7 @@
 						饭卡余额:
 					</view>
 					<view class="value">
-						330
+						{{balance}}
 					</view>
 				</view>
 			</view>
@@ -60,18 +61,53 @@
 </template>
 
 <script>
+	import * as mineAPI from '@/apis/pagejs/mine.js'
 	import QRCode from 'qrcodejs2'
 
 	export default {
 		data() {
 			return {
-				
+				userInfo: {},
+				balance: ''
 			}
 		},
 		onReady() {
+			this.userInfo=this.carhelp.getPersonInfo();
+			
+			this.getLoadCardData();
+			this.getPayAmount();
 			this.getQrcode();
 		},
 		methods: {
+			getPayAmount() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				mineAPI.payAmount().then((response) => {
+					uni.hideLoading();
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getLoadCardData() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				mineAPI.loadCardData().then((response) => {
+					uni.hideLoading();
+					this.balance = response.data.balance;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			getQrcode() {
 				this.$nextTick(() => {
 					let div = document.createElement('div');// 创建一个div,用来生成二维码

+ 248 - 138
pages/staffHome/orderReport.vue

@@ -3,40 +3,35 @@
 		<u-navbar title="订餐上报"></u-navbar>
 		<view class="head">
 			<view class="department">
-				订餐部门:机务段
+				订餐部门:{{orgName}}
 			</view>
-			<view class="date" @click="changeDateShow">
-				2023年4月<u-icon name="arrow-down" size="24"></u-icon>
-				<view class="date-box" v-if="dateShow">
-					<view class="options-item">
-						选项1
-					</view>
-					<view class="options-item">
-						选项2
-					</view>
-					<view class="options-item">
-						选项3
-					</view>
-				</view>
+			<view class="date" @click="show = true">
+				{{orderFoodDate}}<u-icon name="arrow-down" size="24"></u-icon>
 			</view>
 		</view>
-		
+
+		<u-picker mode="time" v-model="show" :params="params" :defaultTime="defaultTime" @confirm="confirm">
+		</u-picker>
+
 		<!-- 上报记录 -->
 		<view class="records">
-			<view class="record-item">
+			<!-- <view class="record-item">
 				<view class="date">
-					4月10日 星期一
+					{{today}}
 				</view>
 				<view class="number report" @click="maskShow">
 					{{report}} <u-icon name="arrow-right" size="20"></u-icon>
 				</view>
-			</view>
-			<view class="record-item" v-for="item in 8">
+			</view> -->
+			<view class="record-item" v-for="(item,index) in orderFoodList" :key="index">
 				<view class="date">
-					4月10日 星期一
+					{{item.date}}
+				</view>
+				<view class="number report" @click="maskShow(item)" v-if="item.date == today">
+					{{report}} <u-icon name="arrow-right" size="20"></u-icon>
 				</view>
-				<view class="number">
-					订餐9人
+				<view class="number" v-else>
+					订餐{{item.peopleNum}}
 				</view>
 			</view>
 		</view>
@@ -48,15 +43,11 @@
 						<u-icon name="close" color="#777777" @click="close"></u-icon>
 						订餐人数
 					</view>
-		
-					<!-- <textarea  placeholder="请填写订餐人数" name="" id="" cols="30" rows="10" v-model="name1" >
-						
-					</textarea> -->
-					<u-input v-model="name1" :clearable="false" type="number"  placeholder="请填写订餐人数"> </u-input>
+					<u-input v-model="name1" :clearable="false" type="number" placeholder="请填写订餐人数"> </u-input>
 					<view class="unit">
 					</view>
-					<u-button class="btn" @click="submit" >保存</u-button>
+					<u-button class="btn" @click="submit">保存</u-button>
 				</view>
 			</view>
 		</u-mask>
@@ -64,47 +55,154 @@
 </template>
 
 <script>
+	import * as staffHomeAPI from '@/apis/pagejs/staffHome.js'
+
 	export default {
 		data() {
 			return {
-				dateShow:false,
+				dateShow: false,
 				show1: false,
-				report:'点击上报',
-				name1:''
+				report: '点击上报',
+				name1: '',
+				defaultTime: '',
+				params: {
+					year: true,
+					month: true,
+					day: false,
+					hour: false,
+					minute: false,
+					second: false,
+					timestamp: true
+				},
+				show: false,
+				orderFoodDate: '',
+				orderFoodList: [],
+				yearMonth: '',
+				today: '',
+				orgName: '',
+				orderFoodId: ''
+			}
+		},
+		onReady() {
+			var date = new Date();
+			var year = date.getFullYear();
+			var month = date.getMonth() + 1;
+			var day = date.getDate();
+			var week = "星期" + "日一二三四五六".charAt(new Date().getDay())
+			if (month >= 1 && month <= 9) {
+				month = '0' + month;
 			}
+			this.defaultTime = year + '-' + month;
+			this.yearMonth = year + '-' + month;
+			this.orderFoodDate = year + '年' + parseInt(month) + '月';
+			this.today = month + '月' + day + '日' + ' ' + week;
+
+			this.getOrderFoodList();
 		},
 		methods: {
-			changeDateShow() {
-				this.dateShow = !this.dateShow
+			getOrderFoodList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				staffHomeAPI.monthList({
+					yearMonth: this.yearMonth
+				}).then((response) => {
+					uni.hideLoading();
+					var list = response.data.mapList;
+					if(this.yearMonth == this.defaultTime) {
+						if(list.length == 0) {
+							list.unshift({
+								id: '',
+								date: this.today,
+								peopleNum: 0
+							});
+						} else if(list[0].date != this.today) {
+							list.unshift({
+								id: '',
+								date: this.today,
+								peopleNum: 0
+							});
+						} else {
+							this.report = "订餐" + list[0].peopleNum + "人";
+							this.name1 = list[0].peopleNum;
+						}
+					}
+					this.orderFoodList = list;
+					this.orgName = response.data.orgName;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			confirm(params) {
+				this.orderFoodDate = params.year + '年' + parseInt(params.month) + '月';
+				this.yearMonth = params.year + '-' + params.month;
+				this.getOrderFoodList();
 			},
-			maskShow() {
+			maskShow(item) {
 				this.show1 = true;
+				this.orderFoodId = item.id;
 			},
-			close(){
-				this.show1 =false ;
+			close() {
+				this.show1 = false;
 			},
 			submit() {
-				this.report ="订餐"+ this.name1+"人";
-				this.show1 = false;
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				if(this.orderFoodId.length == 0) {
+					staffHomeAPI.add({
+						peopleNum: this.name1
+					}).then((response) => {
+						uni.hideLoading();
+						this.show1 = false;
+						this.getOrderFoodList();
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				} else {
+					staffHomeAPI.update({
+						id: this.orderFoodId,
+						peopleNum: this.name1
+					}).then((response) => {
+						uni.hideLoading();
+						this.show1 = false;
+						this.getOrderFoodList();
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				}
 			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.head{
-		background: linear-gradient(89.02deg, rgba(18,114,238,1) 1.34%,rgba(102,169,255,1) 99.5%);
-	    padding: 40rpx 32rpx;
+	.head {
+		background: linear-gradient(89.02deg, rgba(18, 114, 238, 1) 1.34%, rgba(102, 169, 255, 1) 99.5%);
+		padding: 40rpx 32rpx;
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
 		color: rgba(255, 255, 255, 1);
-		.department{
-			
+
+		.department {
+
 			font-size: 36rpx;
 			font-family: 'Medium';
 		}
-		.date{
+
+		.date {
 			width: 218rpx;
 			height: 72rpx;
 			line-height: 72rpx;
@@ -112,18 +210,20 @@
 			border-radius: 8px;
 			border: 1px solid rgba(255, 255, 255, 1);
 			position: relative;
-			/deep/.uicon-arrow-down{
+
+			/deep/.uicon-arrow-down {
 				margin-left: 8rpx;
 			}
-			.date-box{
+
+			.date-box {
 				background-color: #fff;
 				z-index: 999;
 				width: 180rpx;
 				box-shadow: 0px 0px 2px #999999;
 				position: absolute;
 				top: 70rpx;
-			    left: 0px;
-			
+				left: 0px;
+
 				.options-item {
 					line-height: 60rpx;
 					padding-left: 16rpx;
@@ -131,100 +231,110 @@
 					color: #101010;
 					text-align: left;
 				}
-			
+
 			}
 		}
 	}
 
- // 上报记录
- .records{
-	 background-color: #fff;
-	 .record-item{
-		 font-family: 'PingFang Regular';
-		 padding: 0 24rpx;
-		 line-height: 88rpx;
-		 display: flex;
-		 justify-content: space-between;
-		 align-items: center;
-		 color: rgba(16, 16, 16, 1);
-		 border-bottom: 1px solid rgba(232, 232, 232, 1);
-		 
-	 }
-	 .report{
-		 color: rgba(18, 114, 238, 1);
-		 /deep/.uicon-arrow-right{
-			 margin-left: 8rpx;
-		 }
-	 }
- }
- 
- .warp {
- 
- 	position: fixed;
- 	left: 0;
- 	bottom: 0;
- 	width: 100%;
-	/deep/.uicon-close{
-		position: absolute;
-		left: 32rpx;
-		top: 6rpx !important;
-		
-	};
-	.title {
-		color: rgba(16, 16, 16, 100);
-		line-height: 48rpx;
-		color: rgba(16, 16, 16, 1);
-		font-size: 36rpx;
-		text-align: center;
-		position: relative;
-		font-weight:bold
+	// 上报记录
+	.records {
+		background-color: #fff;
+
+		.record-item {
+			font-family: 'PingFang Regular';
+			padding: 0 24rpx;
+			line-height: 88rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			color: rgba(16, 16, 16, 1);
+			border-bottom: 1px solid rgba(232, 232, 232, 1);
+
+		}
+
+		.report {
+			color: rgba(18, 114, 238, 1);
+
+			/deep/.uicon-arrow-right {
+				margin-left: 8rpx;
+			}
+		}
 	}
- }
- .rect {
- 	width: 100%;
- 	height: 100%;
- 	background-color: #fff;
- 	padding: 32rpx 0;
-   
- 	
- 
- 	/deep/.u-input {
- 		width: 87.2%;
- 		border-radius: 8px;
- 		background-color: rgba(229, 231, 234, 100);
- 		margin: 40rpx auto 0;
- 		height: 96rpx;
- 		line-height: 96rpx !important;
- 		padding: 0 16rpx;
- 		position: relative;
-		
- 	}
-	/deep/.u-input__input{
-		height: 96rpx !important;
-		line-height: 96rpx !important;
-		text-indent: 24rpx;
+
+	.warp {
+
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+
+		/deep/.uicon-close {
+			position: absolute;
+			left: 32rpx;
+			top: 6rpx !important;
+
+		}
+
+		;
+
+		.title {
+			color: rgba(16, 16, 16, 100);
+			line-height: 48rpx;
+			color: rgba(16, 16, 16, 1);
+			font-size: 36rpx;
+			text-align: center;
+			position: relative;
+			font-weight: bold
+		}
 	}
-	.unit{
-		width: 20px;
-		height: 20px;
-		position: absolute;
-		top: 140rpx;
-		right: 60rpx;
-		color: rgba(16, 16, 16, 1);
-		font-size: 36rpx;
-		
+
+	.rect {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		padding: 32rpx 0;
+
+
+
+		/deep/.u-input {
+			width: 87.2%;
+			border-radius: 8px;
+			background-color: rgba(229, 231, 234, 100);
+			margin: 40rpx auto 0;
+			height: 96rpx;
+			line-height: 96rpx !important;
+			padding: 0 16rpx;
+			position: relative;
+
+		}
+
+		/deep/.u-input__input {
+			height: 96rpx !important;
+			line-height: 96rpx !important;
+			text-indent: 24rpx;
+		}
+
+		.unit {
+			width: 20px;
+			height: 20px;
+			position: absolute;
+			top: 140rpx;
+			right: 60rpx;
+			color: rgba(16, 16, 16, 1);
+			font-size: 36rpx;
+
+		}
+
+
+
+		.u-btn {
+			width: 89.2%;
+			color: rgba(255, 255, 255, 100);
+			font-size: 36rpx;
+			border-radius: 8px;
+			margin-top: 48rpx;
+			z-index: 99999;
+			background-color: rgba(31, 74, 153, 1);
+		}
 	}
- 
- 	
- 
- 	.u-btn {
- 		width: 89.2%;
- 		color: rgba(255, 255, 255, 100);
- 		font-size: 36rpx;
- 		border-radius: 8px;
- 		margin-top: 48rpx;
- 		z-index: 99999;
-		background-color: rgba(31, 74, 153, 1);
- 	}
- }
-</style>
+</style>

+ 48 - 27
pages/staffHome/staffHome.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-navbar title="职工之家" :is-back="false" ></u-navbar>
+		<u-navbar title="职工之家" :is-back="false"></u-navbar>
 		<view class="banner" v-if="false">
 			<view class="">
 				2023年度荆州市地方铁路优先公司
@@ -12,55 +12,55 @@
 
 		<view class="grid">
 			<u-grid :col="3" :border="false">
-				<u-grid-item  @click="ckList2()" v-if="false" >
+				<u-grid-item @click="ckList2()" v-if="false">
 					<view class="icon icon0">
 						<img src="../../assets/img/tdry.png" alt="">
 					</view>
 					<view class="grid-text">荣誉列表</view>
 				</u-grid-item>
-				<u-grid-item  @click="gotoUrl('pages/staffHome/teamHonor/teamHonor?type=my')" >
+				<u-grid-item @click="gotoUrl('pages/staffHome/teamHonor/teamHonor?type=my')">
 					<view class="icon">
 						<img src="../../assets/img/riFill-vip-crown-2-fill@2x.png" alt="">
 					</view>
 					<view class="grid-text">个人荣誉</view>
 				</u-grid-item>
-				<u-grid-item   @click="gotoUrl('pages/staffHome/teamHonor/teamHonor?type=team')" >
+				<u-grid-item @click="gotoUrl('pages/staffHome/teamHonor/teamHonor?type=team')">
 					<view class="icon icon0">
 						<img src="../../assets/img/tdry.png" alt="">
 					</view>
 					<view class="grid-text">团队荣誉</view>
 				</u-grid-item>
-				<u-grid-item   @click="gotoUrl('pages/staffHome/filesonic')">
+				<u-grid-item @click="gotoUrl('pages/staffHome/filesonic')">
 					<view class="icon icon1">
 						<img src="../../assets/img/fxkj.png" alt="">
 					</view>
 					<view class="grid-text">分享空间</view>
 				</u-grid-item>
-				<u-grid-item  @click="gotoUrl('pages/staffHome/activityCenter/activityCenter')">
+				<u-grid-item @click="gotoUrl('pages/staffHome/activityCenter/activityCenter')">
 					<view class="icon icon 2">
 						<img src="../../assets/img/hdzx.png" alt="">
 					</view>
 					<view class="grid-text">活动中心</view>
 				</u-grid-item>
-				<u-grid-item  @click="gotoUrl('pages/staffHome/activityReward/activityReward')">
+				<u-grid-item @click="gotoUrl('pages/staffHome/activityReward/activityReward')">
 					<view class="icon icon3">
 						<img src="../../assets/img/hdjl.png" alt="">
 					</view>
 					<view class="grid-text">活动奖励</view>
 				</u-grid-item>
-				<u-grid-item    @click="gotoUrl('pages/mine/points/rankingList')" >
+				<u-grid-item @click="gotoUrl('pages/mine/points/rankingList')">
 					<view class="icon icon4">
 						<img src="../../assets/img/phb.png" alt="">
 					</view>
 					<view class="grid-text">排行榜</view>
 				</u-grid-item>
-				<u-grid-item  v-if="false" @click="gotoUrl('pages/mine/points/pointsExchange/pointsExchange')" >
+				<u-grid-item v-if="false" @click="gotoUrl('pages/mine/points/pointsExchange/pointsExchange')">
 					<view class="icon icon5">
 						<img src="../../assets/img/jfyh.png" alt="">
 					</view>
 					<view class="grid-text">积分兑换</view>
 				</u-grid-item>
-				<u-grid-item >
+				<u-grid-item v-if="isOrderReport" @click="gotoUrl('pages/staffHome/orderReport')">
 					<view class="icon icon6">
 						<img src="../../assets/img/dcsb.png" alt="">
 					</view>
@@ -75,34 +75,54 @@
 </template>
 
 <script>
+	import * as staffHomeAPI from '@/apis/pagejs/staffHome.js'
 	import tabbar from "../../components/Tabbar.vue"
+
 	export default {
 		components: {
 			tabbar
 		},
 		data() {
 			return {
-				noticeList:[
-					"9dbeddd2-a863-42d0-a145-260fe008bdbb",//	个人荣誉0
-					"412eff92-a443-42f7-98c6-5c67d9e64ad8",//	集体荣誉1	
-					
+				noticeList: [
+					"9dbeddd2-a863-42d0-a145-260fe008bdbb", //	个人荣誉0
+					"412eff92-a443-42f7-98c6-5c67d9e64ad8", //	集体荣誉1
 				],
+				isOrderReport: true
 			}
 		},
-		onShow(){
-			
+		onReady() {
+			this.getLoadUserOrderFlag();
+		},
+		onShow() {
+
 		},
 		methods: {
-			ckList2(){
-				var url="/pages/news/list";
+			getLoadUserOrderFlag() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				staffHomeAPI.loadUserOrderFlag().then((response) => {
+					uni.hideLoading();
+					this.isOrderReport = response.data;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			ckList2() {
+				var url = "/pages/news/list";
 				uni.navigateTo({
-					url:url
+					url: url
 				})
 			},
-			ckList(id,title){
-				var url="/pages/news/news?id="+id+"&title="+title;
+			ckList(id, title) {
+				var url = "/pages/news/news?id=" + id + "&title=" + title;
 				uni.navigateTo({
-					url:url
+					url: url
 				})
 			},
 		}
@@ -127,6 +147,7 @@
 
 	.grid {
 		font-family: 'Regular';
+
 		.icon {
 			width: 96rpx;
 			height: 96rpx;
@@ -166,17 +187,17 @@
 		.icon5 {
 			background: linear-gradient(180deg, rgba(103, 226, 232, 1) 2%, rgba(54, 202, 209, 1) 100%);
 		}
-		
-		.icon6{
-			background: linear-gradient(180deg, rgba(189,172,255,1) 0%,rgba(162,139,255,1) 100%);
+
+		.icon6 {
+			background: linear-gradient(180deg, rgba(189, 172, 255, 1) 0%, rgba(162, 139, 255, 1) 100%);
 		}
 
 		.icon7 {
 			background: linear-gradient(180deg, rgba(255, 212, 119, 1) 3%, rgba(255, 186, 88, 1) 100%);
 		}
-		
+
 		.grid-text {
 			margin-top: 16rpx;
 		}
 	}
-</style>
+</style>