From 86005dc980106809704a7df9ecf201c8ef3db9f7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 03 六月 2024 18:17:34 +0800
Subject: [PATCH] ‘’

---
 h5/pages/staff/meetingCalendar.vue |   61 ++++++++++++++++----
 h5/pages/staff/meetingSubOrder.vue |   22 ++++++
 h5/pages/staff/meetingDetail.vue   |   14 ++++
 h5/pages/staff/meetingSub.vue      |   23 ++++---
 h5/pages/staff/meetingManager.vue  |    2 
 5 files changed, 97 insertions(+), 25 deletions(-)

diff --git a/h5/pages/staff/meetingCalendar.vue b/h5/pages/staff/meetingCalendar.vue
index 7af417d..6f1fd57 100644
--- a/h5/pages/staff/meetingCalendar.vue
+++ b/h5/pages/staff/meetingCalendar.vue
@@ -71,26 +71,30 @@
 		<template v-if="activeTab === '1'">
 			<view class="card_list">
 				<view class="list">
-					<view class="item" @click="handleDetail()">
+					<view class="item" v-for="item in recordList" :key="item.id" @click="handleDetail(item.id)">
 						<view class="head">
-							<view class="name">aaaaa閫夊瀷</view>
-							<view class="status">鍗冲皢寮�濮�</view>
+							<view class="name">{{ item.meetingName }}</view>
+							<view class="status" v-if="item.meetingStatus == '1'">鏈紑濮�</view>
+							<view class="status red" v-if="item.meetingStatus == '2'">杩涜涓�</view>
+							<view class="status" v-if="item.meetingStatus == '3'">宸茬粨鏉�</view>
+							<view class="status padding" v-if="item.meetingStatus == '4'">鍗冲皢寮�濮�</view>
+							<view class="status" v-if="item.meetingStatus == '5'">宸叉挙閿�</view>
 						</view>
 						<view class="line">
 							<view class="label">浼氳鏃堕棿锛�</view>
-							<view class="value">12:00-12</view>
+							<view class="value">{{ item.meetingTime	 }}</view>
 						</view>
 						<view class="line">
 							<view class="label">浼氳瀹わ細</view>
-							<view class="value">202浼氳瀹�</view>
+							<view class="value">{{ item.roomName }}</view>
 						</view>
 						<view class="line">
 							<view class="label">棰勭害浜猴細</view>
-							<view class="value">鏉ㄦ煇鏌�</view>
+							<view class="value">{{ item.bookingUser }}</view>
 						</view>
 						<view class="line">
 							<view class="label">澶囨敞锛�</view>
-							<view class="value">--</view>
+							<view class="value">{{ item.remark }}</view>
 						</view>
 					</view>
 				</view>
@@ -102,6 +106,7 @@
 <script>
 import Calendar from '@/components/Li-Calendar/Li-Calendar.vue';
 import { getDay } from '@/utils/utils.js';
+import { myMeetingPage } from '@/api'
 function getDate(date, AddDayCount = 0) {
 	if (!date) {
 		date = new Date();
@@ -131,6 +136,8 @@
 	data() {
 		return {
 			activeTab: '0',
+			recordList: [],
+			recordPage: 1,
 			currentTime1: '',
 			dateStart: '1999-05-01',
 			dateEnd: '2999-06-15',
@@ -152,17 +159,23 @@
 					date: getDate(new Date(), -1).fullDate,
 					info: '宸叉墦鍗�'
 				}
-			]
+			],
+
 		};
 	},
 	methods: {
 		tabClick(val) {
 			this.activeTab = val;
+			if(val === '1'){
+				this.getRecordList()
+			}else{
+				this.getList()
+			}
 		},
-		handleDetail(item) {
+		handleDetail(id) {
 			uni.navigateTo({
-				// url: `/pages/staff/meetingDetail?id=${item.id}`,
-				url: `/pages/staff/meetingDetail`
+				url: `/pages/staff/meetingDetail?id=${id}`,
+				// url: `/pages/staff/meetingDetail`
 			});
 		},
 		changeCalendar(e) {
@@ -196,7 +209,22 @@
 			console.log('鏃ユ湡', riqi);
 			this.currentTime1 = riqi;
 			// this.getDateNum()
-		}
+		},
+		getList(){},
+		getRecordList() {
+			const { activeStatus } = this
+      myMeetingPage({
+        capacity: 10,
+        page: this.recordPage,
+        model: {
+					// status: activeStatus.key || null,
+          // roomsId: this.roomId,
+          queryType: 2
+        }
+      }).then(res => {
+				this.recordList = res.data.records
+			})
+    },
 	}
 };
 </script>
@@ -295,6 +323,7 @@
 				padding: 0rpx 30rpx 30rpx;
 				background: #ffffff;
 				border-radius: 8rpx;
+				margin-bottom: 24rpx;
 				.head {
 					display: flex;
 					justify-content: space-between;
@@ -316,6 +345,14 @@
 						font-size: 22rpx;
 						color: #999999;
 					}
+					.padding{
+						color: $uni-color-primary;
+						border: 1rpx solid $uni-color-primary;
+					}
+					.red{
+						color: #e23f29;
+						border: 1rpx solid #e23f29;
+					}
 				}
 				.line {
 					display: flex;
diff --git a/h5/pages/staff/meetingDetail.vue b/h5/pages/staff/meetingDetail.vue
index d2a52c6..cda2876 100644
--- a/h5/pages/staff/meetingDetail.vue
+++ b/h5/pages/staff/meetingDetail.vue
@@ -47,13 +47,25 @@
 </template>
 
 <script>
+import { meetingDetail } from '@/api'
 	export default {
 		data() {
 			return {
-				param: {}
+				param: {},
+				detail: {}
 			};
 		},
+		onLoad(option) {
+			this.id = option.id
+			this.getDetail()
+		},
 		methods: {
+			getDetail() {
+				const { id } = this
+				meetingDetail({id}).then(res => {
+					this.detail = res.data
+				})
+			},
 			handleSub() {
 				
 			}
diff --git a/h5/pages/staff/meetingManager.vue b/h5/pages/staff/meetingManager.vue
index 21a04b5..f55bb51 100644
--- a/h5/pages/staff/meetingManager.vue
+++ b/h5/pages/staff/meetingManager.vue
@@ -123,7 +123,7 @@
           queryDate: this.currentDate,
 					status: activeStatus.key || null,
           // roomsId: this.roomId,
-          queryType: 1
+          queryType: 2
         }
       }).then(res => {
 				this.dataList = res.data.records
diff --git a/h5/pages/staff/meetingSub.vue b/h5/pages/staff/meetingSub.vue
index fd13806..c33f1b5 100644
--- a/h5/pages/staff/meetingSub.vue
+++ b/h5/pages/staff/meetingSub.vue
@@ -67,18 +67,18 @@
     >
       <view class="detail_modal">
         <view class="title">浼氳瀹ら绾︽儏鍐�</view>
-        <view class="h1">璁ㄨxxxxx閫夊瀷</view>
+        <view class="h1">{{ activeInfo.meetingName }}</view>
         <view class="line">
           <view class="label">浼氳鏃堕棿</view>
-          <view class="value">00000</view>
+          <view class="value">{{ activeInfo.meetingTime }}</view>
         </view>
         <view class="line">
           <view class="label">浼氳瀹�</view>
-          <view class="value">00000</view>
+          <view class="value">{{ activeInfo.roomName }}</view>
         </view>
         <view class="line">
           <view class="label">棰勭害浜�</view>
-          <view class="value">00000</view>
+          <view class="value">{{ activeInfo.bookingUserName }}</view>
         </view>
         <view class="btn" @click="isShowDetail = false">鍏抽棴</view>
       </view>
@@ -101,6 +101,7 @@
       },
 			selDatetime: '',
       isShowDetail: false,
+      activeInfo: {},
       meetingList: [],
       timeList: [],
 
@@ -140,9 +141,10 @@
 			const obj = {
 				startTime: selTimeList[0].startTime,
 				endTime: selTimeList[selTimeList.length - 1].endTime,
+        bookingTimeList: selTimeList.map(i=>i.id).join(',')
 			}
 			uni.navigateTo({
-				url: `/pages/staff/meetingSubOrder?yudingDate=${activeRoom.yudingDate}&roomName=${activeRoom.roomName}&roomId=${activeRoom.roomId}&startTime=${obj.startTime}&endTime=${obj.endTime}`
+				url: `/pages/staff/meetingSubOrder?yudingDate=${activeRoom.yudingDate}&roomName=${activeRoom.roomName}&roomId=${activeRoom.roomId}&startTime=${obj.startTime}&endTime=${obj.endTime}&bookingTimeList=${obj.bookingTimeList}`
 			})
       // this.$jump('/pages/staff/vehicle/apply')
     },
@@ -169,11 +171,11 @@
       })
     },
     datetimeClick(item, index) {
-      if (item.isUse == '1') return
-			if(item.isChoose){
-				this.getDetail(item.id)
+      if(item.bookingTimeId){
+				this.getDetail(item.bookingTimeId)
 				return
 			}
+      if (item.isUse == '1') return
       const { timeList } = this
       const selTimeList = timeList.filter(i => i.checked == '1')
       if (selTimeList.length === 0) {
@@ -229,7 +231,10 @@
 		getDetail(id) {
 			meetingDetail({
 				id
-			})
+			}).then(res => {
+        this.activeInfo = res.data
+        this.isShowDetail = true
+      })
 		},
   }
 }
diff --git a/h5/pages/staff/meetingSubOrder.vue b/h5/pages/staff/meetingSubOrder.vue
index 7180c9a..5e07b7b 100644
--- a/h5/pages/staff/meetingSubOrder.vue
+++ b/h5/pages/staff/meetingSubOrder.vue
@@ -129,12 +129,21 @@
   },
   onLoad(option) {
     this.param = { ...option }
+    const bookingTimeList = option.bookingTimeList.split(',').map(i => {
+      return {
+        timeId: Number(i)
+      }
+    })
+    this.$set(this.param, 'bookingTimeList', bookingTimeList)
     this.$set(this.param, 'activeDate', dayjs(option.yudingDate).format('YYYY骞碝鏈圖鏃�'))
 		this.initOption()
   },
 	mounted() {
     this.$eventBus.$on('meetingPeo', (res) => {
-      this.$set(this.param, 'sysList', res)
+      this.$set(this.param, 'sysList', res.map(i=>{
+        i.userId = i.id
+        return i
+      }))
       // this.$set(this.param, 'memberIds', res.map(i => i.id).join(','))
       // this.$set(this.param, 'memberNames', res.map(i => i.name).join(','))
     })
@@ -153,7 +162,16 @@
 				projectList: info.projectList.filter(i => i.checked),
 			}).then(res => {
 				if(res.code === 200){
-
+					setTimeout(() => {
+						uni.showToast({
+							title: '棰勭害鎴愬姛',
+							icon:'success',
+							duration: 2000
+						})
+					})
+          uni.redirectTo({
+          	url: '/pages/staff/index'
+          })
 				}
 			})
 		},

--
Gitblit v1.9.3