茶室
This commit is contained in:
parent
4e2e6fffe9
commit
868a080155
|
@ -112,7 +112,6 @@
|
|||
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding: 28rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
.tishi{
|
||||
margin-top: 6rpx;
|
||||
.tit{
|
||||
|
@ -188,6 +187,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -108,6 +108,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -7,7 +7,7 @@
|
|||
<view class="top_box">
|
||||
<view class="tip">账户余额(元)</view>
|
||||
<view class="txt">
|
||||
¥{{user.balance == null ? 0 : user.balance}} (可提现金额¥{{user.withdrawalAmount == null ? 0 : user.withdrawalAmount}})
|
||||
¥{{user.balance == null ? 0 : user.balance}} (<text style="font-size: 24rpx;">可提现金额</text>¥{{user.withdrawalAmount == null ? 0 : user.withdrawalAmount}})
|
||||
</view>
|
||||
<view class="tip" style="display: flex;justify-content: space-between;">
|
||||
<text>累计提现:¥{{user.totalWithdrawAmount == null ? 0 : user.totalWithdrawAmount}}</text>
|
||||
|
@ -24,15 +24,15 @@
|
|||
¥
|
||||
</view>
|
||||
<view class="ipt">
|
||||
<u-input v-model="money" type="number" placeholder='输入自定义金额'
|
||||
<u-input v-model="money" type="number" @input="inputs" placeholder='输入自定义金额'
|
||||
placeholder-style='font-size: 24rpx;' />
|
||||
</view>
|
||||
<view class="altx" @click="money = user.withdrawalAmount">
|
||||
<view class="altx" @click="btnmoney">
|
||||
全部提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="color: red;font-size: 24rpx;padding-top: 30rpx;box-sizing: border-box;" v-if="shouxuobj != ''">
|
||||
提现服务费为 ¥{{shouxuobj.withdrawHandlingCharge == null ? '' : shouxuobj.withdrawHandlingCharge}} 最低提现¥{{shouxuobj.minAmount == null ? '' : shouxuobj.minAmount}} 最高提现¥{{shouxuobj.maxAmount == null ? '' : shouxuobj.maxAmount}}
|
||||
提现服务费为 ¥{{shouxuprice.toFixed(2)}} 最低提现¥{{shouxuobj.minAmount == null ? '' : shouxuobj.minAmount}} 最高提现¥{{shouxuobj.maxAmount == null ? '' : shouxuobj.maxAmount}}
|
||||
</view>
|
||||
<view class="tit">
|
||||
<view class="" style="display: flex;">
|
||||
|
@ -75,7 +75,8 @@
|
|||
currentindex:-1,
|
||||
shouxuobj:'',
|
||||
money:'',
|
||||
id:''
|
||||
id:'',
|
||||
shouxuprice:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -86,6 +87,21 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
btnmoney(){
|
||||
this.money = this.user.withdrawalAmount
|
||||
if(this.shouxuobj.handlingChargeType == 1){
|
||||
this.shouxuprice = this.shouxuobj.withdrawHandlingCharge / 10 * this.money
|
||||
}else{
|
||||
this.shouxuprice = this.shouxuobj.withdrawHandlingCharge
|
||||
}
|
||||
},
|
||||
inputs(e){
|
||||
if(this.shouxuobj.handlingChargeType == 1){
|
||||
this.shouxuprice = this.shouxuobj.withdrawHandlingCharge / 10 * this.money
|
||||
}else{
|
||||
this.shouxuprice = this.shouxuobj.withdrawHandlingCharge
|
||||
}
|
||||
},
|
||||
// 点击进行提现
|
||||
btntx(){
|
||||
if(this.shouxuobj.collectionCode == null && this.shouxuobj.name == '线下收款码'){
|
||||
|
@ -130,10 +146,14 @@
|
|||
},
|
||||
// 点击选择提现方式
|
||||
btntxxz(item,index){
|
||||
console.log(item);
|
||||
this.id = item.userChannelId
|
||||
this.currentindex = index
|
||||
this.shouxuobj = item
|
||||
if(item.handlingChargeType == 1){
|
||||
this.shouxuprice = item.withdrawHandlingCharge / 10 * this.money
|
||||
}else{
|
||||
this.shouxuprice = item.withdrawHandlingCharge
|
||||
}
|
||||
},
|
||||
// 获取个人信息
|
||||
getinfo(){
|
||||
|
@ -242,7 +262,6 @@
|
|||
page {
|
||||
background: #F7FAFE;
|
||||
}
|
||||
|
||||
.addtj {
|
||||
margin-top: 44rpx;
|
||||
width: 646rpx;
|
||||
|
@ -255,13 +274,11 @@
|
|||
font-size: 36rpx;
|
||||
color: #48893B;
|
||||
}
|
||||
|
||||
.cont {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
width: 634rpx;
|
||||
|
||||
.top_box {
|
||||
padding: 28rpx 32rpx;
|
||||
margin-top: 38rpx;
|
||||
|
@ -270,14 +287,12 @@
|
|||
background: #48893B;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.tip {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
|
||||
.txt {
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
|
@ -287,7 +302,6 @@
|
|||
line-height: 54rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
|
@ -300,7 +314,6 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
|
||||
.tit_line {
|
||||
margin-right: 12rpx;
|
||||
width: 4rpx;
|
||||
|
@ -310,7 +323,6 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
.input_box {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -321,7 +333,6 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
||||
border-radius: 20rpx;
|
||||
|
||||
.yuan {
|
||||
margin-left: 36rpx;
|
||||
font-weight: 500;
|
||||
|
@ -329,11 +340,9 @@
|
|||
color: #48893B;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.ipt {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.altx {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -350,7 +359,6 @@
|
|||
line-height: 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pay_type {
|
||||
.type_box {
|
||||
width: 100%;
|
||||
|
@ -363,18 +371,15 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
||||
border-radius: 20rpx;
|
||||
|
||||
.box_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
margin-left: 22rpx;
|
||||
|
||||
image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-left: 30rpx;
|
||||
font-weight: 400;
|
||||
|
@ -383,7 +388,6 @@
|
|||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.box_right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -395,14 +399,12 @@
|
|||
border: 2rpx solid #444444;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.act1 {
|
||||
color: #FFFFFF;
|
||||
background-color: #48893B;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -348,7 +348,7 @@
|
|||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=false`).then(res => {
|
||||
this.$u.post(`/app/device/admin/adminAll/${this.roomId}/switch?open=false`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '全部关闭成功',
|
||||
|
@ -378,7 +378,7 @@
|
|||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/admin/adminAll/${this.roomId}/switch?open=true`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '全部开启成功',
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<view class="lt">
|
||||
自助操作
|
||||
</view>
|
||||
<view class="rt" @click="btnkz" v-if="orderobj.userId == user.userId">
|
||||
<view class="rt" @click="btnkz" v-if="orderobj.userId == user.userId && orderobj.status == 3">
|
||||
控制设备
|
||||
</view>
|
||||
</view>
|
||||
|
@ -471,7 +471,7 @@
|
|||
// 点击开包厢门
|
||||
btnkbxm(){
|
||||
if(this.orderobj.roomType2 == 1){
|
||||
this.$u.post(`/app/device/adminAll/${this.orderobj.roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/adminAll/${this.orderobj.roomId}/switch?open=true&orderNo=${this.orderNo}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '开启包厢门成功',
|
||||
|
|
|
@ -678,7 +678,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
@ -720,7 +722,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
|
|
@ -276,65 +276,65 @@
|
|||
}
|
||||
},
|
||||
// 设施全关
|
||||
btnguan(){
|
||||
const allDeviceIdsAreNull = this.roomList.every(item => item.deviceId == null)
|
||||
if (allDeviceIdsAreNull) {
|
||||
uni.showToast({
|
||||
title: '该房间设施暂无绑定设备',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=false`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '全部关闭成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.roomList.forEach(item => {
|
||||
item.device.powerStatus = 0
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 设施全开
|
||||
btnkai(){
|
||||
const allDeviceIdsAreNull = this.roomList.every(item => item.deviceId == null)
|
||||
if (allDeviceIdsAreNull) {
|
||||
uni.showToast({
|
||||
title: '该房间设施暂无绑定设备',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=true`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '全部开启成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.roomList.forEach(item => {
|
||||
item.device.powerStatus = 1
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// btnguan(){
|
||||
// const allDeviceIdsAreNull = this.roomList.every(item => item.deviceId == null)
|
||||
// if (allDeviceIdsAreNull) {
|
||||
// uni.showToast({
|
||||
// title: '该房间设施暂无绑定设备',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// } else {
|
||||
// this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=false`).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// uni.showToast({
|
||||
// title: '全部关闭成功',
|
||||
// icon: 'success',
|
||||
// duration: 2000
|
||||
// })
|
||||
// this.roomList.forEach(item => {
|
||||
// item.device.powerStatus = 0
|
||||
// })
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// // 设施全开
|
||||
// btnkai(){
|
||||
// const allDeviceIdsAreNull = this.roomList.every(item => item.deviceId == null)
|
||||
// if (allDeviceIdsAreNull) {
|
||||
// uni.showToast({
|
||||
// title: '该房间设施暂无绑定设备',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// } else {
|
||||
// this.$u.post(`/app/device/adminAll/${this.roomId}/switch?open=true`).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// uni.showToast({
|
||||
// title: '全部开启成功',
|
||||
// icon: 'success',
|
||||
// duration: 2000
|
||||
// })
|
||||
// this.roomList.forEach(item => {
|
||||
// item.device.powerStatus = 1
|
||||
// })
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// 点击控制房间设施
|
||||
btnroomkg(num,index,item){
|
||||
console.log(item);
|
||||
|
|
|
@ -101,19 +101,26 @@
|
|||
</image>
|
||||
<view class="moneytop">
|
||||
<view class="zongjia">
|
||||
<view class="">订单总价</view>
|
||||
<view class="" v-if="tcobj.mode == 1">预存费用</view><view class="" v-else>订单总价</view>
|
||||
<view class="pricered">¥{{price == null ? '--' : price}}</view>
|
||||
</view>
|
||||
<view class="yuding">
|
||||
<view class="">续单时长</view>
|
||||
<view class="yuding" v-if="tcobj.mode == 1">
|
||||
<view class="">计费规则</view>
|
||||
<view class="">1小时{{tcobj.price}}元</view>
|
||||
</view>
|
||||
<view class="yuding" v-else>
|
||||
<view class="">预定时长</view>
|
||||
<view class="">{{hourstime == null ? '--' : hourstime}}小时</view>
|
||||
</view>
|
||||
<view class="yudingtime">
|
||||
<view class="">续单时间段</view>
|
||||
<view class="time" v-if="kstime !='' && jstime != ''">
|
||||
{{kstime.slice(0,-3) + '至'}}{{jstime == null ? '--' : jstime.slice(10,16)}}</view>
|
||||
<view class="time" v-else>--</view>
|
||||
<view class="yudingtime" v-if="tcobj.mode == 1">
|
||||
<view class="">预存费用剩余金额会根据您实际使用时间扣除使用后退还您的账户</view>
|
||||
</view>
|
||||
<!-- <view class="yudingtime">
|
||||
<view class="">预定时间段</view>
|
||||
<view class="time" v-if="ksriqi != '' && kstime !=''">
|
||||
{{timeshijian.slice(0,-3) + '至'}}{{jstime == null ? '--' : jstime}}</view>
|
||||
<view class="time" v-else>--</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="moneybot">
|
||||
<!-- <view class="xudan">
|
||||
|
@ -376,7 +383,17 @@
|
|||
}
|
||||
console.log(startHour, endHour, room.startTime, room.endTime)
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if (timefen == '00') { //判断续单结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if(startHour == endHour){
|
||||
if (timefen == '00'){
|
||||
if (this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}else{
|
||||
if (this.arr[i] <= Number(endHour) + 1) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}else if(timefen == '00') { //判断续单结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if (this.arr[i] > startHour && this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
|
@ -513,7 +530,7 @@
|
|||
ruleId:this.ruleId,
|
||||
type2:this.viewType,
|
||||
// type: 2,
|
||||
mode: this.tclist[0].mode,
|
||||
mode: this.tclist[this.indextwo].mode,
|
||||
hours: this.hourstime,
|
||||
price: this.price,
|
||||
originalOrderNo:this.orderNo
|
||||
|
@ -588,7 +605,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date();
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
@ -630,7 +649,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date();
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
@ -777,11 +798,21 @@
|
|||
}
|
||||
console.log(startHour, endHour, room.startTime, room.endTime)
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if (timefen == '00') { //判断续单结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if(startHour == endHour){
|
||||
if (timefen == '00'){
|
||||
if (this.arr[i].slice(0,2) <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}else{
|
||||
if (this.arr[i].slice(0,2) <= Number(endHour) + 1) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}else if(timefen == '00') { //判断续单结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if (this.arr[i].slice(0,2) > startHour && this.arr[i].slice(0,2) <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
} else {
|
||||
}else{
|
||||
if (this.arr[i].slice(0,2) > startHour && Number(this.arr[i].slice(0,2) - 1) <= Number(endHour)) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
|
@ -819,8 +850,13 @@
|
|||
btntc(index, item) {
|
||||
this.tcobj = item
|
||||
this.ruleId = item.ruleId
|
||||
this.price = item.price //订单金额
|
||||
this.hourstime = item.hours //订单时间
|
||||
if(item.mode == 1){
|
||||
this.price = this.tcobj.deposit //订单金额
|
||||
this.hourstime = Math.ceil(this.tcobj.deposit / this.tcobj.price) //订单时间
|
||||
}else{
|
||||
this.price = item.price //订单金额
|
||||
this.hourstime = item.hours //订单时间
|
||||
}
|
||||
this.indextwo = index
|
||||
const originalDateTime = this.kstime
|
||||
const date = new Date(originalDateTime.replace(/-/g, '/'))
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
border: 2rpx solid #979797;
|
||||
line-height: 78rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
margin-left: 58rpx;
|
||||
}
|
||||
|
|
|
@ -714,12 +714,6 @@
|
|||
// 更新房间的预订状态且与initializeData进行匹对
|
||||
updateRoomReservationStatus() {
|
||||
this.roomList.forEach(room => {
|
||||
// if (room.reservationStatus == null) {
|
||||
// room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
||||
// this.hours.forEach(hour => {
|
||||
// room.reservationStatus[hour] = false // 初始化为未预订状态
|
||||
// })
|
||||
// } else {
|
||||
room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
||||
this.hours.forEach(hour => {
|
||||
room.reservationStatus[hour] = false // 初始化为未预订状态
|
||||
|
@ -748,20 +742,29 @@
|
|||
} else {
|
||||
console.log("第一个日期不小于第二个日期")
|
||||
}
|
||||
console.log(startHour, endHour, period.startTime, period.endTime)
|
||||
console.log(startHour, endHour, period.startTime, period.endTime,this.arr)
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if (timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if (this.arr[i] > startHour && this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
} else {
|
||||
} else if(startHour == endHour){
|
||||
if (timefen == '00'){
|
||||
if (this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}else{
|
||||
if (this.arr[i] <= Number(endHour) + 1) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (this.arr[i] > startHour && Number(this.arr[i] - 1) <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// }
|
||||
})
|
||||
console.log(this.roomList, '00')
|
||||
},
|
||||
|
@ -835,7 +838,7 @@
|
|||
})
|
||||
}else if(this.jinxintxt == '开包厢'){
|
||||
let roomId = this.jinxinglist[this.mdindex].roomId
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[this.mdindex].orderNo}`).then(res => {
|
||||
if(res.code == 200){
|
||||
this.jinxinflag = false
|
||||
this.mdindex = -1
|
||||
|
@ -912,7 +915,7 @@
|
|||
this.jinxintxt = '开包厢'
|
||||
}else if(this.jinxinglist.length == 1){
|
||||
let roomId = this.jinxinglist[0].roomId
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[0].orderNo}`).then(res => {
|
||||
if(res.code == 200){
|
||||
uni.showToast({
|
||||
title: '开启包厢门成功',
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<text style="color: #fff;margin-left: 10rpx;" @click="btnhx">{{user.phonenumber == null ? '' : user.phonenumber}}</text>
|
||||
<image style="" src="https://api.ccttiot.com/smartmeter/img/static/unOSDXbaM4kbZH0gElDy" mode=""></image>
|
||||
</view>
|
||||
|
||||
<view class="bd">
|
||||
<view class="name">
|
||||
常用功能
|
||||
|
|
|
@ -53,17 +53,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="tcxz" v-else> v-if="tclist[0].mode == 2"
|
||||
<view class="tcxzname">
|
||||
收费方式:
|
||||
</view>
|
||||
<view class="taocan" style="width: 600rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
flex-wrap: wrap;">
|
||||
{{tclist[0].price == null ? '--' : tclist[0].price}}元/小时,最低消费{{tclist[0].minHours == null ? '--' : tclist[0].minHours}}小时,押金金额{{tclist[0].deposit == null ? '--' : tclist[0].deposit}}元
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="shichangxz">
|
||||
<view class="tcxzname">
|
||||
时长选择:
|
||||
|
@ -443,7 +432,17 @@
|
|||
}
|
||||
console.log(startHour, endHour, room.startTime, room.endTime)
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if (timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if(startHour == endHour){
|
||||
if (timefen == '00'){
|
||||
if (this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}else{
|
||||
if (this.arr[i] <= Number(endHour) + 1) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}else if(timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if (this.arr[i] > startHour && this.arr[i] <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
|
@ -574,7 +573,7 @@
|
|||
ruleId:this.ruleId,
|
||||
// type: 1,
|
||||
reserveStartTime: this.timeshijian,
|
||||
mode: this.tclist[0].mode,
|
||||
mode: this.tclist[this.tcindex].mode,
|
||||
hours: this.hourstime,
|
||||
price: this.price
|
||||
}
|
||||
|
@ -686,8 +685,10 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date()
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
// console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
title: '请选择当前时间之后',
|
||||
|
@ -701,11 +702,11 @@
|
|||
uni.showToast({
|
||||
title: '该时间段已被预订,请选择其他时间段',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else { //微信支付
|
||||
let mergedData = this.hourPointsArray.map((time, index) => {
|
||||
let roomNumber = Object.keys(this.roomList)[index]
|
||||
let roomStatus = this.roomList[roomNumber]
|
||||
|
@ -728,7 +729,11 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date();
|
||||
targetDate.setSeconds(1)
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
@ -912,11 +917,23 @@
|
|||
}
|
||||
console.log(startHour, endHour, room.startTime, room.endTime)
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if (timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if(startHour == endHour){
|
||||
console.log(1);
|
||||
if (timefen == '00'){
|
||||
if (this.arr[i].slice(0,2) <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}else{
|
||||
console.log(2,this.arr);
|
||||
if (this.arr[i].slice(0,2) <= Number(endHour) + 1) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
}
|
||||
}else if (timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
|
||||
if (this.arr[i].slice(0,2) > startHour && this.arr[i].slice(0,2) <= endHour) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
} else {
|
||||
}else {
|
||||
if (this.arr[i].slice(0,2) > startHour && Number(this.arr[i].slice(0,2) - 1) <= Number(endHour)) {
|
||||
room.reservationStatus[i] = true
|
||||
}
|
||||
|
|
|
@ -648,7 +648,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date();
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
@ -690,7 +692,9 @@
|
|||
if (!isBooked) {
|
||||
let timeshijian = this.timeshijian
|
||||
let targetDate = new Date(timeshijian.replace(/-/g, '/'))
|
||||
let currentDate = new Date();
|
||||
targetDate.setSeconds(1)
|
||||
let currentDate = new Date();
|
||||
currentDate.setSeconds(0)
|
||||
console.log(targetDate,currentDate,'020202');
|
||||
if (targetDate < currentDate) {
|
||||
uni.showToast({
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uU0nfPcXVEhbEsvECEQg" mode=""></image>
|
||||
<text>已连接</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="kongzhi">
|
||||
<!-- <view class="lxkai" @click.stop="btngb">
|
||||
关闭
|
||||
|
@ -282,11 +282,6 @@
|
|||
xBlufi.initXBlufi(1)
|
||||
},
|
||||
fail: function (err) {
|
||||
// uni.showToast({
|
||||
// title: '蓝牙权限获取失败,请打开系统蓝牙和定位',
|
||||
// icon: 'none',
|
||||
// duration:3000
|
||||
// })
|
||||
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err)
|
||||
}
|
||||
})
|
||||
|
@ -606,7 +601,7 @@
|
|||
})
|
||||
} else if (this.jinxintxt == '开包厢') {
|
||||
let roomId = this.jinxinglist[this.mdindex].roomId
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[this.mdindex].orderNo}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jinxinflag = false
|
||||
this.mdindex = -1
|
||||
|
@ -673,7 +668,7 @@
|
|||
this.jinxintxt = '开包厢'
|
||||
} else if (this.jinxinglist.length == 1) {
|
||||
let roomId = this.jinxinglist[0].roomId
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true`).then(res => {
|
||||
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[0].orderNo}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '开启包厢门成功',
|
||||
|
@ -726,8 +721,8 @@
|
|||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue)
|
||||
let id = getQueryParam(decodedValue, 'sn')
|
||||
let storeCode = getQueryParam(decodedValue, 'd');
|
||||
let roomCode = getQueryParam(decodedValue, 'f');
|
||||
let storeCode = getQueryParam(decodedValue, 'd')
|
||||
let roomCode = getQueryParam(decodedValue, 'f')
|
||||
if (id) {
|
||||
let that = this
|
||||
let data = {
|
||||
|
@ -818,7 +813,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
console.log('URL 中未找到 storeCode 或 roomCode');
|
||||
console.log('URL 中未找到 storeCode 或 roomCode')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -914,6 +909,7 @@
|
|||
confirm() {
|
||||
this.pagesum = 1
|
||||
this.getshop()
|
||||
console.log(this.sousuovalue,11)
|
||||
},
|
||||
// 根据定位来获取门店
|
||||
getshop() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user