From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化

---
 h5/pages/staff/meetingSubOrder.vue |   51 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/h5/pages/staff/meetingSubOrder.vue b/h5/pages/staff/meetingSubOrder.vue
index f12e3dd..1d82d33 100644
--- a/h5/pages/staff/meetingSubOrder.vue
+++ b/h5/pages/staff/meetingSubOrder.vue
@@ -3,7 +3,7 @@
     <view class="module_list">
       <view class="item">
         <view class="name">浼氳鏃堕棿</view>
-        <view class="line">
+        <view class="line" @click="handleBack">
           <view class="label">
             {{ param.activeDate || param.meetingDate }} 
             <text class="ml12" v-if="!param.id">{{ param.startTime }}-{{ param.endTime }}</text>
@@ -15,7 +15,7 @@
       <view class="item">
         <view class="name">浼氳瀹�</view>
         <view class="line">
-          <view class="label">{{ param.roomName }}</view>
+          <view class="label">{{ param.roomName }}(鍙绾硔{ param.limitNum }}浜�)</view>
         </view>
       </view>
       <view class="item">
@@ -58,7 +58,10 @@
       </view>
       <view class="empty"></view>
       <view class="item">
-        <view class="name">鍙備細浜哄憳</view>
+        <view class="name">
+          鍙備細浜哄憳
+           <text class="star"></text>
+        </view>
         <view class="line" @click="selPeople">
           <view class="label">
             <text v-if="param.sysList && param.sysList.length > 0">
@@ -137,16 +140,6 @@
         title: '浼氳璇︽儏'
       })
       this.getDetail(option.id)
-    } else {
-      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() {
@@ -157,6 +150,17 @@
       }))
       // this.$set(this.param, 'memberIds', res.map(i => i.id).join(','))
       // this.$set(this.param, 'memberNames', res.map(i => i.name).join(','))
+    })
+    this.$eventBus.$on('meetingSub', (res) => {
+      this.param = { ...res }
+      this.$set(this.param, 'activeDate', dayjs(res.yudingDate).format('YYYY骞碝鏈圖鏃�'))
+      const bookingTimeList = res.bookingTimeList.split(',').map(i => {
+        return {
+          timeId: Number(i)
+        }
+      })
+      this.$set(this.param, 'bookingTimeList', bookingTimeList)
+      this.initOption()
     })
   },
   methods: {
@@ -210,12 +214,20 @@
         }
       })
     },
+    handleBack() {
+      if(this.param.id) return
+      uni.navigateBack( )
+    },
     onSubmit() {
       const { param, info } = this
       if (!param.name) return uni.showToast({
         title: '璇疯緭鍏ヤ細璁富棰�',
         icon: 'none'
       })
+      // if (!param.sysList || param.sysList.length == 0) return uni.showToast({
+      //   title: '璇烽�夋嫨鍙備細浜哄憳',
+      //   icon: 'none'
+      // })
       reservationMeeting({
         ...param,
         startTime: `${param.yudingDate} ${param.startTime}:00`,
@@ -238,10 +250,15 @@
     },
     selPeople() {
       const { param } = this
-      let startTime = param.yudingDate + ' ' + param.startTime
-      let endTime = param.yudingDate + ' ' + param.endTime
+      let startTime = new Date(param.yudingDate + ' ' + param.startTime).getTime()
+      let endTime = new Date(param.yudingDate + ' ' + param.endTime).getTime()
+      if(this.param.sysList && this.param.sysList.length > 0){
+        setTimeout(() => {
+          this.$eventBus.$emit('meetingPeoDetail', this.param.sysList || [])
+        }, 500)
+      }
       uni.navigateTo({
-        url: `/pages/staff/meetingSel?startTime=${startTime}&endTime=${endTime}`
+        url: `/pages/staff/meetingSel?startTime=${startTime}&endTime=${endTime}&limitNum=${this.param.limitNum}`
       })
     },
     serviceClick(item) {
@@ -283,6 +300,7 @@
       .label {
         flex: 1;
         display: flex;
+        flex-wrap: wrap;
         align-items: center;
         .service_item {
           height: 64rpx;
@@ -291,6 +309,7 @@
           border-radius: 4rpx;
           padding: 0 24rpx;
           margin-right: 20rpx;
+          margin-bottom: 12rpx;
         }
         .active {
           background-color: #4d99a8;

--
Gitblit v1.9.3