From 43942a545271345ce26e40d82bb97138c5ea7611 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 28 六月 2024 13:54:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/staff/meetingSub.vue | 79 +++++++++++++++++++++++----------------
1 files changed, 46 insertions(+), 33 deletions(-)
diff --git a/h5/pages/staff/meetingSub.vue b/h5/pages/staff/meetingSub.vue
index c33f1b5..34a81db 100644
--- a/h5/pages/staff/meetingSub.vue
+++ b/h5/pages/staff/meetingSub.vue
@@ -3,14 +3,14 @@
<view class="heade_title">
<image
class="icon"
- src="../../static/staff/ar_left@2x.png"
+ src="@/static/staff/ar_left@2x.png"
@click="changeDate(-1)"
mode="widthFix"
></image>
<text class="date">{{ activeDateCum }}</text>
<image
class="icon"
- src="../../static/staff/ar_right@2x.png"
+ src="@/static/staff/ar_right@2x.png"
@click="changeDate(1)"
mode="widthFix"
></image>
@@ -33,7 +33,11 @@
<view
@click="datetimeClick(item, i)"
class="item"
- :class="{ disable: item.isUse, active: item.checked == '1' }"
+ :class="{
+ disable: item.isUse,
+ active: item.checked == '1',
+ hasSub: item.bookingTimeId,
+ }"
v-for="(item, i) in timeList"
:key="i"
>
@@ -53,9 +57,7 @@
<view class="">{{ item.name }}</view>
</view>
</view>
- <view class="sub" @click="onSubmit"
- >纭棰勭害</view
- >
+ <view class="sub" @click="onSubmit">纭棰勭害</view>
</view>
</view>
<!-- -->
@@ -70,7 +72,7 @@
<view class="h1">{{ activeInfo.meetingName }}</view>
<view class="line">
<view class="label">浼氳鏃堕棿</view>
- <view class="value">{{ activeInfo.meetingTime }}</view>
+ <view class="value" v-if="activeInfo.meetingDate">{{ activeInfo.meetingDate.slice(5) }} {{ activeInfo.meetingTime }}</view>
</view>
<view class="line">
<view class="label">浼氳瀹�</view>
@@ -91,7 +93,7 @@
import {
roomsListPost,
getRoomUseTime,
- meetingDetail
+ meetingDetail
} from '@/api'
export default {
data() {
@@ -99,7 +101,7 @@
activeRoom: {
yudingDate: ''
},
- selDatetime: '',
+ selDatetime: '',
isShowDetail: false,
activeInfo: {},
meetingList: [],
@@ -128,9 +130,11 @@
roomClick(item) {
this.$set(this.activeRoom, 'roomId', item.id)
this.$set(this.activeRoom, 'roomName', item.name)
+ this.$set(this.activeRoom, 'limitNum', item.limitNum)
+ this.getRoomTime()
},
- onSubmit() {
- const { activeRoom } = this
+ onSubmit() {
+ const { activeRoom } = this
const selTimeList = this.timeList.filter(i => i.checked == '1')
if (selTimeList.length == -1) {
return uni.showToast({
@@ -138,14 +142,16 @@
icon: 'none'
})
}
- 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}&bookingTimeList=${obj.bookingTimeList}`
- })
+ 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}
+ &bookingTimeList=${obj.bookingTimeList}&limitNum=${activeRoom.limitNum}`
+ })
// this.$jump('/pages/staff/vehicle/apply')
},
getRoomList() {
@@ -154,6 +160,7 @@
if (this.meetingList.length > 0) {
this.$set(this.activeRoom, 'roomId', this.meetingList[0].id)
this.$set(this.activeRoom, 'roomName', this.meetingList[0].name)
+ this.$set(this.activeRoom, 'limitNum', this.meetingList[0].limitNum)
this.getRoomTime()
}
})
@@ -171,10 +178,10 @@
})
},
datetimeClick(item, index) {
- if(item.bookingTimeId){
- this.getDetail(item.bookingTimeId)
- return
- }
+ if (item.bookingTimeId) {
+ this.getDetail(item.bookingTimeId)
+ return
+ }
if (item.isUse == '1') return
const { timeList } = this
const selTimeList = timeList.filter(i => i.checked == '1')
@@ -224,18 +231,20 @@
},
changeDate(num) {
const yudingDate = this.activeRoom.yudingDate
+ if (num < 0 && yudingDate === dayjs().format('YYYY-MM-DD')) return
let fn = num > 0 ? 'add' : 'subtract'
- this.yudingDate = dayjs(yudingDate)[fn](1, 'days').format('YYYY-MM-DD')
+ this.activeRoom.yudingDate = dayjs(yudingDate)[fn](1, 'days').format('YYYY-MM-DD')
+ console.log('yudingDate', this.activeRoom.yudingDate)
this.getRoomList()
},
- getDetail(id) {
- meetingDetail({
- id
- }).then(res => {
+ getDetail(id) {
+ meetingDetail({
+ id
+ }).then(res => {
this.activeInfo = res.data
this.isShowDetail = true
})
- },
+ },
}
}
</script>
@@ -245,12 +254,12 @@
padding: 40rpx 30rpx;
.title {
text-align: center;
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
margin-bottom: 40rpx;
}
.h1 {
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
margin-bottom: 30rpx;
}
@@ -273,7 +282,7 @@
text-align: center;
background: $uni-color-primary;
border-radius: 44rpx;
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
color: #ffffff;
}
@@ -283,7 +292,7 @@
width: 100%;
left: 0;
bottom: 0;
- background-color: #fff;
+ background-color: #fff;
padding: 20rpx 30rpx 84rpx;
box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
.sel_time {
@@ -343,6 +352,10 @@
background-color: #cccccc;
color: #999999;
}
+ .hasSub{
+ color: #fff;
+ background-color: #2d5c65;
+ }
}
.meeting_list {
display: flex;
--
Gitblit v1.9.3