茶室
This commit is contained in:
		
							parent
							
								
									535ccab02d
								
							
						
					
					
						commit
						8ac054164f
					
				| 
						 | 
				
			
			@ -28,6 +28,14 @@
 | 
			
		|||
					{{obj.device.sn == null  ? '' : obj.device.sn}}  <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="ulbox" @click="btnewm">
 | 
			
		||||
				<view class="one">
 | 
			
		||||
					生成二维码
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="two">
 | 
			
		||||
					 <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="ulbox" style="border: none;" @click="btnshoufei">
 | 
			
		||||
				<view class="one">
 | 
			
		||||
					收费方式
 | 
			
		||||
| 
						 | 
				
			
			@ -94,9 +102,6 @@
 | 
			
		|||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -147,6 +152,12 @@
 | 
			
		|||
		  uni.removeStorageSync('ruleIdlist')
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			// 点击去生成二维码
 | 
			
		||||
			btnewm(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_shanghu/erwm?equipmentId=' + this.obj.equipmentId + '&viewType=' + this.obj.viewType
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 点击未投列表放选择
 | 
			
		||||
			btntouf(){
 | 
			
		||||
				this.dtflags = false
 | 
			
		||||
| 
						 | 
				
			
			@ -281,7 +292,7 @@
 | 
			
		|||
						if(res.data.type == 2){
 | 
			
		||||
							this.ksfs = '麻将桌'
 | 
			
		||||
						}else if(res.data.type == 3){
 | 
			
		||||
							this.ksfs = '棋牌桌'
 | 
			
		||||
							this.ksfs = '台球桌'
 | 
			
		||||
						}
 | 
			
		||||
						this.obj = res.data
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,7 @@
 | 
			
		|||
				         </view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="shuom">
 | 
			
		||||
					   (订单结束{{item.refundDuration == null ? '--' : item.refundDuration}}分钟后退还押金)注:订单提前结束剩余消费时长、金额不返还
 | 
			
		||||
					   (订单结束{{item.refundDuration == 0 ? '立即' : item.refundDuration + '分钟后'}}退还押金)注:订单提前结束剩余消费时长、金额不返还
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
				         </view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="shuom">
 | 
			
		||||
					   (订单结束{{item.refundDuration == null ? '--' : item.refundDuration}}分钟后退还押金)
 | 
			
		||||
					   (订单结束{{item.refundDuration == 0 ? '立即' : item.refundDuration + '分钟后'}}退还押金)
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
| 
						 | 
				
			
			@ -82,7 +82,7 @@
 | 
			
		|||
				show:false,
 | 
			
		||||
				tclist:[],
 | 
			
		||||
				modelist:[],
 | 
			
		||||
				yajinindex:'',
 | 
			
		||||
				yajinindex:-1,
 | 
			
		||||
				selectedIndices:[],
 | 
			
		||||
				ruleIdsone:[],
 | 
			
		||||
				nameone:[],
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +94,7 @@
 | 
			
		|||
		onShow() {
 | 
			
		||||
			this.tclist = []
 | 
			
		||||
			this.modelist = []
 | 
			
		||||
			this.yajinindex = ''
 | 
			
		||||
			this.yajinindex = -1
 | 
			
		||||
			this.selectedIndices = []
 | 
			
		||||
			this.ruleIdsone = []
 | 
			
		||||
			this.getlist()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,6 +44,14 @@
 | 
			
		|||
					{{kstj}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="ulbox" @click="btnewm">
 | 
			
		||||
				<view class="one">
 | 
			
		||||
					生成二维码
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="two">
 | 
			
		||||
					 <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<u-select v-model="showone" :list="listone" @confirm="btnone"></u-select>
 | 
			
		||||
			<u-picker mode="time" v-model="showtwo" :params="params" @confirm="btntwo"></u-picker>
 | 
			
		||||
			<u-select v-model="showthr" :list="listthr" @confirm="btnthr"></u-select>
 | 
			
		||||
| 
						 | 
				
			
			@ -185,6 +193,12 @@
 | 
			
		|||
			this.getxx()
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			// 生成二维码
 | 
			
		||||
			btnewm(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_shanghu/erwm?equipmentId=' + this.obj.equipmentId
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 点击未投列表放选择
 | 
			
		||||
			btntouf(){
 | 
			
		||||
				this.dtflags = false
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -756,7 +756,7 @@
 | 
			
		|||
					name: this.dtname,
 | 
			
		||||
					roomId: this.roomId,
 | 
			
		||||
					type: this.type,
 | 
			
		||||
					picture: ''
 | 
			
		||||
					picture: this.type == 2 ? 'https://api.ccttiot.com/smartmeter/img/static/uYJuFqo8fmq8vZ0xeSzP' : 'https://api.ccttiot.com/smartmeter/img/static/u8BAJ6O6waeSGyYlesEU'
 | 
			
		||||
				}
 | 
			
		||||
				this.$u.post(`/app/equipment`, data).then(res => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,8 +68,12 @@
 | 
			
		|||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="" style="width: 100%;text-align: center;color: red;margin-top: 30rpx;">
 | 
			
		||||
				注:押金的金额需是基础价格的倍数
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		<!-- <view class="mask" v-if="maskflag"></view> -->
 | 
			
		||||
		<view class="tanchuang" v-if="type == 2">
 | 
			
		||||
			<view class="names">
 | 
			
		||||
| 
						 | 
				
			
			@ -160,7 +164,11 @@
 | 
			
		|||
						this.explain = res.data.explain
 | 
			
		||||
						this.tuitimes = res.data.refundDuration
 | 
			
		||||
						this.yajin = res.data.deposit
 | 
			
		||||
						this.tuitime = res.data.refundDuration + '分钟'
 | 
			
		||||
						if(res.data.refundDuration == 0){
 | 
			
		||||
							this.tuitime = '立即退还'
 | 
			
		||||
						}else{
 | 
			
		||||
							this.tuitime = res.data.refundDuration + '分钟'
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			@ -217,53 +225,61 @@
 | 
			
		|||
			},
 | 
			
		||||
			// 确定新建and修改
 | 
			
		||||
			btnshop(){
 | 
			
		||||
				let data = {
 | 
			
		||||
					ruleId:this.ruleId,
 | 
			
		||||
					mode:this.type,
 | 
			
		||||
					hours:1,
 | 
			
		||||
					price:this.price,
 | 
			
		||||
					minHours:this.mintime,
 | 
			
		||||
					explain:this.explain,
 | 
			
		||||
					refundDuration:this.tuitimes,
 | 
			
		||||
					deposit:this.yajin
 | 
			
		||||
				}
 | 
			
		||||
				if(this.anniutxt == '确认新建'){
 | 
			
		||||
					this.$u.post(`/app/rule`,data).then(res => {
 | 
			
		||||
						if (res.code == 200) {
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: '新建成功',
 | 
			
		||||
								icon: 'success',
 | 
			
		||||
								duration: 2000
 | 
			
		||||
							})
 | 
			
		||||
							setTimeout(()=>{
 | 
			
		||||
								uni.navigateBack()
 | 
			
		||||
							},1000)
 | 
			
		||||
						}else{
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: res.msg,
 | 
			
		||||
								icon: 'none',
 | 
			
		||||
								duration: 2000
 | 
			
		||||
							})
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
				}else if(this.anniutxt == '确认修改'){
 | 
			
		||||
					this.$u.put(`/app/rule`,data).then(res => {
 | 
			
		||||
						if (res.code == 200) {
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: '修改成功',
 | 
			
		||||
								icon: 'success',
 | 
			
		||||
								duration: 2000
 | 
			
		||||
							})
 | 
			
		||||
							setTimeout(()=>{
 | 
			
		||||
								uni.navigateBack()
 | 
			
		||||
							},1000)
 | 
			
		||||
						}else{
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: res.msg,
 | 
			
		||||
								icon: 'none',
 | 
			
		||||
								duration: 2000
 | 
			
		||||
							})
 | 
			
		||||
						}
 | 
			
		||||
				if(this.yajin % this.price == 0){
 | 
			
		||||
					let data = {
 | 
			
		||||
						ruleId:this.ruleId,
 | 
			
		||||
						mode:this.type,
 | 
			
		||||
						hours:1,
 | 
			
		||||
						price:this.price,
 | 
			
		||||
						minHours:this.mintime,
 | 
			
		||||
						explain:this.explain,
 | 
			
		||||
						refundDuration:this.tuitimes,
 | 
			
		||||
						deposit:this.yajin
 | 
			
		||||
					}
 | 
			
		||||
					if(this.anniutxt == '确认新建'){
 | 
			
		||||
						this.$u.post(`/app/rule`,data).then(res => {
 | 
			
		||||
							if (res.code == 200) {
 | 
			
		||||
								uni.showToast({
 | 
			
		||||
									title: '新建成功',
 | 
			
		||||
									icon: 'success',
 | 
			
		||||
									duration: 2000
 | 
			
		||||
								})
 | 
			
		||||
								setTimeout(()=>{
 | 
			
		||||
									uni.navigateBack()
 | 
			
		||||
								},1000)
 | 
			
		||||
							}else{
 | 
			
		||||
								uni.showToast({
 | 
			
		||||
									title: res.msg,
 | 
			
		||||
									icon: 'none',
 | 
			
		||||
									duration: 2000
 | 
			
		||||
								})
 | 
			
		||||
							}
 | 
			
		||||
						})
 | 
			
		||||
					}else if(this.anniutxt == '确认修改'){
 | 
			
		||||
						this.$u.put(`/app/rule`,data).then(res => {
 | 
			
		||||
							if (res.code == 200) {
 | 
			
		||||
								uni.showToast({
 | 
			
		||||
									title: '修改成功',
 | 
			
		||||
									icon: 'success',
 | 
			
		||||
									duration: 2000
 | 
			
		||||
								})
 | 
			
		||||
								setTimeout(()=>{
 | 
			
		||||
									uni.navigateBack()
 | 
			
		||||
								},1000)
 | 
			
		||||
							}else{
 | 
			
		||||
								uni.showToast({
 | 
			
		||||
									title: res.msg,
 | 
			
		||||
									icon: 'none',
 | 
			
		||||
									duration: 2000
 | 
			
		||||
								})
 | 
			
		||||
							}
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				}else{
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: '押金需是基础价格的倍数',
 | 
			
		||||
						icon: 'none',
 | 
			
		||||
						duration: 2000
 | 
			
		||||
					})
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@
 | 
			
		|||
			<view class="imgewm">
 | 
			
		||||
				<canvas canvas-id="qrcode" style="height: 100%;margin: 0 auto;" />
 | 
			
		||||
				<view class="" style="width: 100%;text-align: center;margin-top: 20rpx;">
 | 
			
		||||
					SN:{{sn}}
 | 
			
		||||
					<!-- sn -->
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
        </view>
 | 
			
		||||
| 
						 | 
				
			
			@ -31,11 +31,31 @@
 | 
			
		|||
                bgc: {
 | 
			
		||||
                	backgroundColor: "#DEF1DA",
 | 
			
		||||
                },
 | 
			
		||||
				sn:''
 | 
			
		||||
				sn:'',
 | 
			
		||||
				roomId:'',
 | 
			
		||||
				viewType:'',
 | 
			
		||||
				equipmentId:'',
 | 
			
		||||
				https:''
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		onLoad(option) {
 | 
			
		||||
			this.sn = option.sn
 | 
			
		||||
			if(option.equipmentId){ //设施
 | 
			
		||||
			   this.equipmentId = option.equipmentId
 | 
			
		||||
			   if(option.viewType){ //判断是否为卫生间
 | 
			
		||||
				   this.viewType = option.viewType
 | 
			
		||||
			   }else{
 | 
			
		||||
				   this.viewType = ''
 | 
			
		||||
			   }
 | 
			
		||||
			   this.https = 'https://testcha.chuangtewl.com?equipmentId=' + this.equipmentId + '&viewType=' + this.viewType 
 | 
			
		||||
			}else if(option.roomId){ //房间
 | 
			
		||||
			   this.roomId = option.roomId
 | 
			
		||||
			   this.viewType = option.viewType
 | 
			
		||||
			   this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId + '&viewType=' + this.viewType 
 | 
			
		||||
			}else if(option.storeId){ //大门
 | 
			
		||||
				this.storeId = option.storeId
 | 
			
		||||
				this.https = 'https://testcha.chuangtewl.com?storeId=' + this.storeId
 | 
			
		||||
			}
 | 
			
		||||
		   console.log(option)
 | 
			
		||||
           this.qrFun()
 | 
			
		||||
		},
 | 
			
		||||
		mounted() {
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +94,7 @@
 | 
			
		|||
				this.wemflag = true
 | 
			
		||||
				uQRCode.make({
 | 
			
		||||
					canvasId: 'qrcode',
 | 
			
		||||
					text: 'https://kg.chuantewulian.cn/w?s=' + this.sn,
 | 
			
		||||
					text: this.https,
 | 
			
		||||
					size: 300,
 | 
			
		||||
					margin: 0,
 | 
			
		||||
					backgroundColor: '#ffffff',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -222,7 +222,7 @@
 | 
			
		|||
			// 点击添加设施
 | 
			
		||||
			btnaddsb(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_shanghu/roomsheshi?roomId='  + this.roomId
 | 
			
		||||
					url:'/page_shanghu/roomsheshi?roomId=' + this.roomId
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 点击房间下线维护
 | 
			
		||||
| 
						 | 
				
			
			@ -435,7 +435,7 @@
 | 
			
		|||
			// 跳转到保存二维码
 | 
			
		||||
			btnewm(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_shanghu/erwm'
 | 
			
		||||
					url:'/page_shanghu/erwm?roomId=' + this.roomId + '&viewType=' + this.roomobj.viewType
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 点击进行扫码
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,6 +36,14 @@
 | 
			
		|||
					{{kstj}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="ulbox" @click="btnewm">
 | 
			
		||||
				<view class="one">
 | 
			
		||||
					生成二维码 
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="two">
 | 
			
		||||
					 <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="ulbox" style="border: none;" v-if="xxobj.equipmentId" @click="addmenflag = true">
 | 
			
		||||
				<view class="one">
 | 
			
		||||
					设备绑定
 | 
			
		||||
| 
						 | 
				
			
			@ -160,6 +168,12 @@
 | 
			
		|||
			this.getmendian()
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			// 点击去生成二维码
 | 
			
		||||
			btnewm(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_shanghu/erwm?storeId=' + this.storeId
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 点击解绑店门
 | 
			
		||||
			btnjieb(){
 | 
			
		||||
				let that = this
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -333,9 +333,17 @@
 | 
			
		|||
			},
 | 
			
		||||
		    // 续单
 | 
			
		||||
			btnxudan(){
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url:'/page_user/xudan?roomId=' + this.orderobj.roomId + '&orderNo=' + this.orderNo + '&viewType=' + this.viewType
 | 
			
		||||
				})
 | 
			
		||||
				if(this.orderobj.mode == 2){
 | 
			
		||||
					uni.navigateTo({
 | 
			
		||||
						url:'/page_user/xudan?roomId=' + this.orderobj.roomId + '&orderNo=' + this.orderNo + '&viewType=' + this.viewType
 | 
			
		||||
					})
 | 
			
		||||
				}else{
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: '押金收费暂不支持续单',
 | 
			
		||||
						icon: 'none',
 | 
			
		||||
						duration:2000
 | 
			
		||||
					})
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,7 +145,7 @@
 | 
			
		|||
			
 | 
			
		||||
			btnmy() {
 | 
			
		||||
				uni.reLaunch({
 | 
			
		||||
					url: '/pages/my'
 | 
			
		||||
					url: '/page_user/luru'
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			qrcode() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@
 | 
			
		|||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view> -->
 | 
			
		||||
				<view class="tcxz">
 | 
			
		||||
				<view class="tcxz" v-if="tclist[0].mode == 2">
 | 
			
		||||
					<view class="tcxzname">
 | 
			
		||||
						套餐选择:
 | 
			
		||||
					</view>
 | 
			
		||||
| 
						 | 
				
			
			@ -50,6 +50,17 @@
 | 
			
		|||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="tcxz" v-else style="display: block;">
 | 
			
		||||
					<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">
 | 
			
		||||
						时长选择:
 | 
			
		||||
| 
						 | 
				
			
			@ -60,7 +71,7 @@
 | 
			
		|||
						</view>
 | 
			
		||||
						至
 | 
			
		||||
						<view class="kaishi" style="background-color: #eee;">
 | 
			
		||||
							{{jstime.slice(10,16)}}
 | 
			
		||||
							{{jstime.length > 10 ? jstime.slice(10,16) : jstime}}
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
| 
						 | 
				
			
			@ -212,92 +223,6 @@
 | 
			
		|||
					value: 'wx',
 | 
			
		||||
					label: '微信支付'
 | 
			
		||||
				}],
 | 
			
		||||
				list: [
 | 
			
		||||
					[{
 | 
			
		||||
							value: '1',
 | 
			
		||||
							label: '00'
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							value: '2',
 | 
			
		||||
							label: '01'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '3',
 | 
			
		||||
							label: '02'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '4',
 | 
			
		||||
							label: '03'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '5',
 | 
			
		||||
							label: '04'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '6',
 | 
			
		||||
							label: '05'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '7',
 | 
			
		||||
							label: '06'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '8',
 | 
			
		||||
							label: '07'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '9',
 | 
			
		||||
							label: '08'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '10',
 | 
			
		||||
							label: '09'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '11',
 | 
			
		||||
							label: '10'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '12',
 | 
			
		||||
							label: '11'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '13',
 | 
			
		||||
							label: '12'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '14',
 | 
			
		||||
							label: '13'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '15',
 | 
			
		||||
							label: '14'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '16',
 | 
			
		||||
							label: '15'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '17',
 | 
			
		||||
							label: '16'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '18',
 | 
			
		||||
							label: '17'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '19',
 | 
			
		||||
							label: '18'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '20',
 | 
			
		||||
							label: '19'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '21',
 | 
			
		||||
							label: '20'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '22',
 | 
			
		||||
							label: '21'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '23',
 | 
			
		||||
							label: '22'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '24',
 | 
			
		||||
							label: '23'
 | 
			
		||||
						},
 | 
			
		||||
					],
 | 
			
		||||
					[{
 | 
			
		||||
							value: '3',
 | 
			
		||||
							label: '00'
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							value: '4',
 | 
			
		||||
							label: '30'
 | 
			
		||||
						}
 | 
			
		||||
					],
 | 
			
		||||
				],
 | 
			
		||||
				kstime: '',
 | 
			
		||||
				jstime: '',
 | 
			
		||||
				timetype: '',
 | 
			
		||||
| 
						 | 
				
			
			@ -331,7 +256,6 @@
 | 
			
		|||
			this.viewType = option.viewType
 | 
			
		||||
			this.getstoredetail()
 | 
			
		||||
			this.getstoredetails()
 | 
			
		||||
			this.gettaocan()
 | 
			
		||||
			this.getbiaoqian()
 | 
			
		||||
			this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -545,9 +469,32 @@
 | 
			
		|||
				this.$u.get(`/app/rule/getListByRoomId?roomId=${this.roomId}`).then(res => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
						this.tclist = res.data
 | 
			
		||||
						if(res.data[0].mode == 1){
 | 
			
		||||
							// this.kstime = e.hour + ':' + e.minute
 | 
			
		||||
							// let shijian = '20' + this.ksriqi + ' ' + this.kstime
 | 
			
		||||
							// console.log(shijian,shijian.slice(2,5)); 
 | 
			
		||||
							// if(shijian.slice(2,5) == 'Wed'){ 
 | 
			
		||||
							// 	this.timeshijian = this.formatDate(shijian)
 | 
			
		||||
							// }else{
 | 
			
		||||
							// 	this.timeshijian = this.parseTime(shijian)
 | 
			
		||||
							// }
 | 
			
		||||
							this.jstime = this.addOneHourToTimess(this.kstime.slice(10,16))
 | 
			
		||||
							console.log(this.jstime,this.kstime);
 | 
			
		||||
							this.price = this.tclist[0].deposit //订单金额
 | 
			
		||||
							this.hourstime = Math.ceil(this.tclist[0].deposit / this.tclist[0].price) //订单时间
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 押金计算结束时间
 | 
			
		||||
			addOneHourToTimess(timeString, date = new Date()) {
 | 
			
		||||
				let [hours, minutes] = timeString.split(':').map(Number)
 | 
			
		||||
				let timeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours, minutes, 0, 0)
 | 
			
		||||
				timeDate.setHours(timeDate.getHours() + Math.ceil(this.tclist[0].deposit / this.tclist[0].price)) //加上套餐中的小时
 | 
			
		||||
				let newHours = timeDate.getHours()
 | 
			
		||||
				let newMinutes = String(timeDate.getMinutes()).padStart(2, '0') // 格式化分钟为两位数
 | 
			
		||||
				return `${String(newHours).padStart(2, '0')}:${newMinutes}`
 | 
			
		||||
			},
 | 
			
		||||
			// 查询个人信息
 | 
			
		||||
			getinfo() {
 | 
			
		||||
				this.$u.get(`/getAppInfo`).then(res => {
 | 
			
		||||
| 
						 | 
				
			
			@ -562,10 +509,10 @@
 | 
			
		|||
				// let formattedDateString = time.replace(/\//g, "-")
 | 
			
		||||
				let data = {
 | 
			
		||||
					payType: this.zfssid,
 | 
			
		||||
					ruleId: this.tcobj.ruleId,
 | 
			
		||||
					ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].mode,
 | 
			
		||||
					viewType:this.viewType,
 | 
			
		||||
					type: 2,
 | 
			
		||||
					mode: 2, 
 | 
			
		||||
					mode: this.tclist[0].mode, 
 | 
			
		||||
					hours: this.hourstime,
 | 
			
		||||
					price: this.price,
 | 
			
		||||
					originalOrderNo:this.orderNo
 | 
			
		||||
| 
						 | 
				
			
			@ -765,6 +712,7 @@
 | 
			
		|||
				this.$u.get(`/appVerify/orderInfo?orderNo=${this.orderNo}`).then(res => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
						this.kstime = res.data.reserveEndTime
 | 
			
		||||
						this.gettaocan()
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			@ -1325,6 +1273,7 @@
 | 
			
		|||
							font-size: 26rpx;
 | 
			
		||||
							color: #48893B;
 | 
			
		||||
							line-height: 46rpx;
 | 
			
		||||
							margin-top: 10rpx;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			@ -1418,7 +1367,7 @@
 | 
			
		|||
		.shichangxz {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			margin-top: 50rpx;
 | 
			
		||||
			margin-top: 30rpx;
 | 
			
		||||
			// width: 3000rpx;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,15 @@
 | 
			
		|||
				"navigationBarTextStyle": "#FFFFFF",
 | 
			
		||||
				"navigationStyle": "custom"
 | 
			
		||||
			}
 | 
			
		||||
		},{
 | 
			
		||||
			"path": "pages/myorder/orderxd",
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "首页",
 | 
			
		||||
				"enablePullDownRefresh": false,
 | 
			
		||||
				"navigationBarBackgroundColor": "#3996FD",
 | 
			
		||||
				"navigationBarTextStyle": "#FFFFFF",
 | 
			
		||||
				"navigationStyle": "custom"
 | 
			
		||||
			}
 | 
			
		||||
		},{
 | 
			
		||||
			"path": "pages/login/login",
 | 
			
		||||
			"style": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,8 +29,8 @@
 | 
			
		|||
			{{shopobj.address == undefined ? '--' : shopobj.address}}
 | 
			
		||||
		</view>
 | 
			
		||||
 | 
			
		||||
		<view class="tongji" v-if="tabarr.length > 1">
 | 
			
		||||
			<view class="one" @click="btngundong('section1',index)" v-for="(item,index) in tabarr" :key="index">
 | 
			
		||||
		<view class="tongji" v-if="tabarr!=''">
 | 
			
		||||
			<view class="one" @click="btngundong(item.type,index)" v-for="(item,index) in tabarr" :key="index">
 | 
			
		||||
				<view class="kg">空闲 <text>{{item.idleNum}}</text></view>
 | 
			
		||||
				<view class="gn">{{item.tag}}</view>
 | 
			
		||||
				<image v-if="tabindex == index" src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg"
 | 
			
		||||
| 
						 | 
				
			
			@ -51,10 +51,10 @@
 | 
			
		|||
			@touchcancel="onTouchCancel">
 | 
			
		||||
			<view class="zhuozi">
 | 
			
		||||
				<view class="tqlist">
 | 
			
		||||
					<view class="tqlist_item" v-for="(item,index) in 5" :key="index" @click="btntq">
 | 
			
		||||
					<view class="tqlist_item" v-for="(item,index) in shopobj.roomList" :key="index" @click="btndetail(item)"> <!-- btntq -->
 | 
			
		||||
						<image src="https://api.ccttiot.com/smartmeter/img/static/uqv5RPXXtMydaBdU7sqG" mode=""></image>
 | 
			
		||||
						<view class="name">
 | 
			
		||||
							一号桌
 | 
			
		||||
							{{item.roomName}}
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="kaitai">
 | 
			
		||||
							开台
 | 
			
		||||
| 
						 | 
				
			
			@ -207,7 +207,7 @@
 | 
			
		|||
				{{jinxintxt}}
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<image v-if="jinxinflag" @click="jinxinflag = false" class="jinxinx"
 | 
			
		||||
		<image v-if="jinxinflag" @click="btnyc" class="jinxinx"
 | 
			
		||||
			src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
 | 
			
		||||
		<view class="mask" v-if="jinxinflag"></view>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -240,12 +240,13 @@
 | 
			
		|||
				biaostoreqianlist: [],
 | 
			
		||||
				mdindex:-1,
 | 
			
		||||
				viewType:'',
 | 
			
		||||
				tit:''
 | 
			
		||||
				tit:'',
 | 
			
		||||
				tabarr:[],
 | 
			
		||||
				type:''
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		onLoad(option) {
 | 
			
		||||
			this.tit = option.tit
 | 
			
		||||
			this.getroombq()
 | 
			
		||||
			if (option.storeId) {
 | 
			
		||||
				this.storeId = option.storeId
 | 
			
		||||
				uni.setStorageSync('storeId', this.storeId)
 | 
			
		||||
| 
						 | 
				
			
			@ -254,6 +255,8 @@
 | 
			
		|||
			}
 | 
			
		||||
		},
 | 
			
		||||
		onShow() {
 | 
			
		||||
			this.tabindex = 0
 | 
			
		||||
			this.getroombq()
 | 
			
		||||
			this.jinxinflag = false //如果进行了tab切换 则隐藏
 | 
			
		||||
			this.getbiaoqian()
 | 
			
		||||
			this.getstorebiaoqian()
 | 
			
		||||
| 
						 | 
				
			
			@ -276,7 +279,10 @@
 | 
			
		|||
				this.viewType = item.viewType
 | 
			
		||||
				this.mdindex = index
 | 
			
		||||
			},
 | 
			
		||||
			
 | 
			
		||||
			// 点击隐藏进行中订单
 | 
			
		||||
			btnyc(){
 | 
			
		||||
				this.jinxinflag = false
 | 
			
		||||
			},
 | 
			
		||||
			// 拿到房间标签进行对比
 | 
			
		||||
			getMatchingLabel(val) {
 | 
			
		||||
				const matchingItem = this.biaoqianlist.find(item => item.dictValue === val)
 | 
			
		||||
| 
						 | 
				
			
			@ -300,7 +306,6 @@
 | 
			
		|||
				this.$u.get(`/appVerify/getDictData?dictType=ss_room_tags`).then((res) => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
						this.biaoqianlist = res.data
 | 
			
		||||
						this.getstoredetail()
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			@ -309,6 +314,13 @@
 | 
			
		|||
				this.$u.get(`/app/room/getTagListByStoreId?storeId=${this.storeId}`).then(res => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
						this.tabarr = res.data
 | 
			
		||||
						if(this.tabarr[0].type){
 | 
			
		||||
							this.type = this.tabarr[0].type
 | 
			
		||||
						}else{
 | 
			
		||||
							this.type = ''
 | 
			
		||||
						}
 | 
			
		||||
						this.getstoredetail()
 | 
			
		||||
						console.log(this.tabarr);
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			@ -320,8 +332,10 @@
 | 
			
		|||
			},
 | 
			
		||||
 | 
			
		||||
			// 点击切换tab类型
 | 
			
		||||
			btngundong(section, index) {
 | 
			
		||||
			btngundong(type, index) {
 | 
			
		||||
				this.tabindex = index
 | 
			
		||||
				this.type = type
 | 
			
		||||
				this.getstoredetail()
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -592,7 +606,7 @@
 | 
			
		|||
			getstoredetail() {
 | 
			
		||||
				this.reservationStatus = {}
 | 
			
		||||
				let data = {
 | 
			
		||||
					type: this.biaoqianlist[0].type == null ? '' : this.biaoqianlist[0].type
 | 
			
		||||
					type: this.type
 | 
			
		||||
				}
 | 
			
		||||
				this.$u.get(`/app/store/${this.storeId}`, data).then(res => {
 | 
			
		||||
					if (res.code == 200) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,7 +41,7 @@
 | 
			
		|||
        				</view>
 | 
			
		||||
        			</view>
 | 
			
		||||
        		</view>
 | 
			
		||||
        		<view class="tcxz">
 | 
			
		||||
        		<view class="tcxz" v-if="tclist[0].mode == 2">
 | 
			
		||||
        			<view class="tcxzname">
 | 
			
		||||
        				套餐选择:
 | 
			
		||||
        			</view>
 | 
			
		||||
| 
						 | 
				
			
			@ -53,6 +53,17 @@
 | 
			
		|||
        				</view>
 | 
			
		||||
        			</view>
 | 
			
		||||
        		</view>
 | 
			
		||||
				<view class="tcxz" v-else>
 | 
			
		||||
					<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">
 | 
			
		||||
        				时长选择:
 | 
			
		||||
| 
						 | 
				
			
			@ -190,8 +201,9 @@
 | 
			
		|||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<u-select v-model="show" mode="mutil-column" title="选择时长" confirm-color="#48893B" :list="list"
 | 
			
		||||
			@confirm="confirm"></u-select>
 | 
			
		||||
		<!-- <u-select v-model="show" mode="mutil-column" title="选择时长" confirm-color="#48893B" :list="list"
 | 
			
		||||
			@confirm="confirm"></u-select> -->
 | 
			
		||||
		<u-picker v-model="show" title="选择时长" confirm-color="#48893B" :params="params" @confirm="confirm" mode="time"></u-picker>
 | 
			
		||||
		<u-select v-model="shows" title="选择扣款方式" confirm-color="#48893B" :list="lists" @confirm="confirms"></u-select>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
| 
						 | 
				
			
			@ -203,7 +215,7 @@
 | 
			
		|||
				bgc: {
 | 
			
		||||
					backgroundColor: "",
 | 
			
		||||
				},
 | 
			
		||||
				indexone: -1,
 | 
			
		||||
				indexone: 0,
 | 
			
		||||
				indextwo: -1,
 | 
			
		||||
				yudingflag: false,
 | 
			
		||||
				show: false,
 | 
			
		||||
| 
						 | 
				
			
			@ -215,92 +227,14 @@
 | 
			
		|||
					value: 'wx',
 | 
			
		||||
					label: '微信支付'
 | 
			
		||||
				}],
 | 
			
		||||
				list: [
 | 
			
		||||
					[{
 | 
			
		||||
							value: '1',
 | 
			
		||||
							label: '00'
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							value: '2',
 | 
			
		||||
							label: '01'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '3',
 | 
			
		||||
							label: '02'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '4',
 | 
			
		||||
							label: '03'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '5',
 | 
			
		||||
							label: '04'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '6',
 | 
			
		||||
							label: '05'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '7',
 | 
			
		||||
							label: '06'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '8',
 | 
			
		||||
							label: '07'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '9',
 | 
			
		||||
							label: '08'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '10',
 | 
			
		||||
							label: '09'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '11',
 | 
			
		||||
							label: '10'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '12',
 | 
			
		||||
							label: '11'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '13',
 | 
			
		||||
							label: '12'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '14',
 | 
			
		||||
							label: '13'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '15',
 | 
			
		||||
							label: '14'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '16',
 | 
			
		||||
							label: '15'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '17',
 | 
			
		||||
							label: '16'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '18',
 | 
			
		||||
							label: '17'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '19',
 | 
			
		||||
							label: '18'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '20',
 | 
			
		||||
							label: '19'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '21',
 | 
			
		||||
							label: '20'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '22',
 | 
			
		||||
							label: '21'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '23',
 | 
			
		||||
							label: '22'
 | 
			
		||||
						}, {
 | 
			
		||||
							value: '24',
 | 
			
		||||
							label: '23'
 | 
			
		||||
						},
 | 
			
		||||
					],
 | 
			
		||||
					[{
 | 
			
		||||
							value: '3',
 | 
			
		||||
							label: '00'
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							value: '4',
 | 
			
		||||
							label: '30'
 | 
			
		||||
						}
 | 
			
		||||
					],
 | 
			
		||||
				],
 | 
			
		||||
				params: {
 | 
			
		||||
					year: false,
 | 
			
		||||
					month: false,
 | 
			
		||||
					day: false,
 | 
			
		||||
					hour: true,
 | 
			
		||||
					minute: true,
 | 
			
		||||
					second: false
 | 
			
		||||
				},
 | 
			
		||||
				kstime: '',
 | 
			
		||||
				jstime: '',
 | 
			
		||||
				timetype: '',
 | 
			
		||||
| 
						 | 
				
			
			@ -341,6 +275,41 @@
 | 
			
		|||
			let arr = this.getCurrentWeekdayAndNextFiveDays();
 | 
			
		||||
			this.weekdayAndDateSequence = this.convertDates(arr)
 | 
			
		||||
			console.log(this.weekdayAndDateSequence);
 | 
			
		||||
			// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期
 | 
			
		||||
			this.ksriqi = this.weekdayAndDateSequence[0].date
 | 
			
		||||
			let shijian = '20' + this.ksriqi + ' ' + this.kstime
 | 
			
		||||
			if(shijian.slice(2,5) == 'Wed'){ 
 | 
			
		||||
				this.timeshijian = this.formatDate(shijian)
 | 
			
		||||
			}else{
 | 
			
		||||
				this.timeshijian = this.parseTime(shijian)
 | 
			
		||||
			}
 | 
			
		||||
			if (this.tcobj.hours && this.kstime != '') {
 | 
			
		||||
				this.jstime = this.addOneHourToTime(this.kstime)
 | 
			
		||||
			}
 | 
			
		||||
			this.indexone = 0
 | 
			
		||||
			if(this.indexone != 0){
 | 
			
		||||
				this.$u.get(`/app/order/getReservedTimePeriods?roomId=${this.roomId}&startTime=${'20' + this.ksriqi}`).then(res => {
 | 
			
		||||
				  if (res.code == 200) {
 | 
			
		||||
					  if(res.data == ''){
 | 
			
		||||
					  	this.roomList = []
 | 
			
		||||
						for(let i = 0;i < 24;i++){
 | 
			
		||||
							this.roomList.push(false)
 | 
			
		||||
						}
 | 
			
		||||
						this.hourPointsArray = this.getDangtiantime()
 | 
			
		||||
					  }else{
 | 
			
		||||
					  	this.roomList = res.data
 | 
			
		||||
					  	this.hourPointsArray = this.getDangtiantime()
 | 
			
		||||
					  	this.arr = this.getDangtiantimes()
 | 
			
		||||
					  	this.getgengxinriqiday()
 | 
			
		||||
					  }
 | 
			
		||||
				  }
 | 
			
		||||
			   })
 | 
			
		||||
			}else{
 | 
			
		||||
				this.getstoredetail()
 | 
			
		||||
				this.gettaocan()
 | 
			
		||||
				this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
 | 
			
		||||
			}
 | 
			
		||||
			// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			// 拿到标签进行对比
 | 
			
		||||
| 
						 | 
				
			
			@ -373,23 +342,23 @@
 | 
			
		|||
			      Jan: '01', Feb: '02', Mar: '03', Apr: '04',
 | 
			
		||||
			      May: '05', Jun: '06', Jul: '07', Aug: '08',
 | 
			
		||||
			      Sep: '09', Oct: '10', Nov: '11', Dec: '12'
 | 
			
		||||
			    };
 | 
			
		||||
			    }
 | 
			
		||||
			    
 | 
			
		||||
			    let month = monthMap[monthName];
 | 
			
		||||
			    if (!month) {
 | 
			
		||||
			      console.error('无法识别的月份:', monthName);
 | 
			
		||||
			      console.error('无法识别的月份:', monthName)
 | 
			
		||||
			      return item; // 或者处理错误
 | 
			
		||||
			    }
 | 
			
		||||
			    
 | 
			
		||||
			    // 构建新的日期字符串
 | 
			
		||||
			    let newDateStr = `${year.slice(2,4)}-${month}-${day.padStart(2, '0')}`;
 | 
			
		||||
			    
 | 
			
		||||
			
 | 
			
		||||
			    // 返回一个新的对象,或者你可以直接修改原始对象(但通常不推荐这样做,因为它会改变原始数据)
 | 
			
		||||
			    return {
 | 
			
		||||
			      ...item,
 | 
			
		||||
			      date: newDateStr
 | 
			
		||||
			    };
 | 
			
		||||
			  });
 | 
			
		||||
			    }
 | 
			
		||||
			  })
 | 
			
		||||
			},
 | 
			
		||||
			// 拿到当前时间后24小时格式成两位数
 | 
			
		||||
			initializeData() {
 | 
			
		||||
| 
						 | 
				
			
			@ -398,7 +367,7 @@
 | 
			
		|||
				// 获取当前时间的小时部分(0-23)
 | 
			
		||||
				const currentHour = now.getHours()
 | 
			
		||||
				// 初始化小时数组
 | 
			
		||||
				this.hours = [];
 | 
			
		||||
				this.hours = []
 | 
			
		||||
				this.arr = []
 | 
			
		||||
				// 遍历从当前小时开始的24个小时
 | 
			
		||||
				for (let i = 0; i < 24; i++) {
 | 
			
		||||
| 
						 | 
				
			
			@ -503,15 +472,15 @@
 | 
			
		|||
					const formattedDateString = `${hours}:${minutes}:${seconds}`;
 | 
			
		||||
					hourPoints.push(formattedDateString);
 | 
			
		||||
				}
 | 
			
		||||
				return hourPoints;
 | 
			
		||||
				return hourPoints
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			// 获取当前时间和日期+后面五天时间
 | 
			
		||||
			getCurrentWeekdayAndNextFiveDays() {
 | 
			
		||||
				// 获取当前日期和时间
 | 
			
		||||
				const now = new Date();
 | 
			
		||||
				const now = new Date()
 | 
			
		||||
				// 获取当前是星期几(0代表周日,1代表周一,...,6代表周六)
 | 
			
		||||
				const currentWeekday = now.getDay();
 | 
			
		||||
				const currentWeekday = now.getDay()
 | 
			
		||||
				const result = [];
 | 
			
		||||
				result.push({
 | 
			
		||||
					date: now.toLocaleDateString('zh-CN', {
 | 
			
		||||
| 
						 | 
				
			
			@ -523,8 +492,8 @@
 | 
			
		|||
				});
 | 
			
		||||
				// 往后推五天,并添加到数组中
 | 
			
		||||
				for (let i = 1; i < 5; i++) {
 | 
			
		||||
					const newDate = new Date(now);
 | 
			
		||||
					newDate.setDate(now.getDate() + i);
 | 
			
		||||
					const newDate = new Date(now)
 | 
			
		||||
					newDate.setDate(now.getDate() + i)
 | 
			
		||||
					result.push({
 | 
			
		||||
						date: newDate.toLocaleDateString('zh-CN', {
 | 
			
		||||
							year: '2-digit',
 | 
			
		||||
| 
						 | 
				
			
			@ -575,10 +544,10 @@
 | 
			
		|||
					roomId: this.roomId,
 | 
			
		||||
					viewType:this.viewType,
 | 
			
		||||
					payType: this.zfssid,
 | 
			
		||||
					ruleId: this.tcobj.ruleId,
 | 
			
		||||
					ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].ruleId,
 | 
			
		||||
					type: 1,
 | 
			
		||||
					reserveStartTime: this.timeshijian,
 | 
			
		||||
					mode: 2,
 | 
			
		||||
					mode: this.tclist[0].mode,
 | 
			
		||||
					hours: this.hourstime,
 | 
			
		||||
					price: this.price
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			@ -642,7 +611,7 @@
 | 
			
		|||
						icon: 'none',
 | 
			
		||||
						duration: 2000
 | 
			
		||||
					})
 | 
			
		||||
				} else if (!this.tcobj.hours) {
 | 
			
		||||
				} else if (!this.tcobj.hours && this.tclist[0].mode == 2) {
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: '请先选择套餐',
 | 
			
		||||
						icon: 'none',
 | 
			
		||||
| 
						 | 
				
			
			@ -760,16 +729,31 @@
 | 
			
		|||
			},
 | 
			
		||||
			// 确认选择时间
 | 
			
		||||
			confirm(e) {
 | 
			
		||||
				this.kstime = e[0].label + ':' + e[1].label
 | 
			
		||||
				let shijian = '20' + this.ksriqi + ' ' + this.kstime
 | 
			
		||||
				console.log(shijian,shijian.slice(2,5)); 
 | 
			
		||||
				if(shijian.slice(2,5) == 'Wed'){ 
 | 
			
		||||
					this.timeshijian = this.formatDate(shijian)
 | 
			
		||||
				if(this.tclist[0].mode == 2){
 | 
			
		||||
					this.kstime = e.hour + ':' + e.minute
 | 
			
		||||
					let shijian = '20' + this.ksriqi + ' ' + this.kstime
 | 
			
		||||
					console.log(shijian,shijian.slice(2,5)); 
 | 
			
		||||
					if(shijian.slice(2,5) == 'Wed'){ 
 | 
			
		||||
						this.timeshijian = this.formatDate(shijian)
 | 
			
		||||
					}else{
 | 
			
		||||
						this.timeshijian = this.parseTime(shijian)
 | 
			
		||||
					}
 | 
			
		||||
					if (this.tcobj.hours) {
 | 
			
		||||
						this.jstime = this.addOneHourToTime(this.kstime)
 | 
			
		||||
					}
 | 
			
		||||
				}else{
 | 
			
		||||
					this.timeshijian = this.parseTime(shijian)
 | 
			
		||||
				}
 | 
			
		||||
				if (this.tcobj.hours) {
 | 
			
		||||
					this.jstime = this.addOneHourToTime(this.kstime)
 | 
			
		||||
					this.kstime = e.hour + ':' + e.minute
 | 
			
		||||
					let shijian = '20' + this.ksriqi + ' ' + this.kstime
 | 
			
		||||
					console.log(shijian,shijian.slice(2,5)); 
 | 
			
		||||
					if(shijian.slice(2,5) == 'Wed'){ 
 | 
			
		||||
						this.timeshijian = this.formatDate(shijian)
 | 
			
		||||
					}else{
 | 
			
		||||
						this.timeshijian = this.parseTime(shijian)
 | 
			
		||||
					}
 | 
			
		||||
					this.jstime = this.addOneHourToTimess(this.kstime)
 | 
			
		||||
					this.price = this.tclist[0].deposit //订单金额
 | 
			
		||||
					this.hourstime = Math.ceil(this.tclist[0].deposit / this.tclist[0].price) //订单时间
 | 
			
		||||
					console.log(Math.ceil(this.tclist[0].deposit / this.tclist[0].price),'0000');
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			// 判断是否需要格式化
 | 
			
		||||
| 
						 | 
				
			
			@ -791,6 +775,15 @@
 | 
			
		|||
				let newMinutes = String(timeDate.getMinutes()).padStart(2, '0') // 格式化分钟为两位数
 | 
			
		||||
				return `${String(newHours).padStart(2, '0')}:${newMinutes}`
 | 
			
		||||
			},
 | 
			
		||||
			// 计算结束时间
 | 
			
		||||
			addOneHourToTimess(timeString, date = new Date()) {
 | 
			
		||||
				let [hours, minutes] = timeString.split(':').map(Number)
 | 
			
		||||
				let timeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours, minutes, 0, 0)
 | 
			
		||||
				timeDate.setHours(timeDate.getHours() + Math.ceil(this.tclist[0].deposit / this.tclist[0].price)) //加上套餐中的小时
 | 
			
		||||
				let newHours = timeDate.getHours()
 | 
			
		||||
				let newMinutes = String(timeDate.getMinutes()).padStart(2, '0') // 格式化分钟为两位数
 | 
			
		||||
				return `${String(newHours).padStart(2, '0')}:${newMinutes}`
 | 
			
		||||
			},
 | 
			
		||||
			// 请求门店详细信息
 | 
			
		||||
			getstoredetail() {
 | 
			
		||||
				this.$u.get(`/app/room/${this.roomId}`).then(res => {
 | 
			
		||||
| 
						 | 
				
			
			@ -860,10 +853,10 @@
 | 
			
		|||
					let endHour = room.endTime.slice(room.endTime.length - 8, room.endTime.length - 6) //取预定结束时间小时
 | 
			
		||||
					let timefen = room.startTime.slice(room.endTime.length - 5, room.endTime.length - 3) //取预定结束时间分钟
 | 
			
		||||
					// 获取当前日期
 | 
			
		||||
					const now = new Date();
 | 
			
		||||
					const year = now.getFullYear();
 | 
			
		||||
					const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要加1,并用padStart确保是两位数
 | 
			
		||||
					const day = String(now.getDate()).padStart(2, '0'); // 用padStart确保是两位数
 | 
			
		||||
					const now = new Date()
 | 
			
		||||
					const year = now.getFullYear()
 | 
			
		||||
					const month = String(now.getMonth() + 1).padStart(2, '0')// 月份从0开始,所以要加1,并用padStart确保是两位数
 | 
			
		||||
					const day = String(now.getDate()).padStart(2, '0')// 用padStart确保是两位数
 | 
			
		||||
                    if(endHour < startHour){
 | 
			
		||||
						startHour = '00'
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			@ -889,23 +882,23 @@
 | 
			
		|||
			  for (let hour = 0; hour < 24; hour++) {
 | 
			
		||||
			    let formattedHour = String(hour).padStart(2, '0')
 | 
			
		||||
				if(formattedHour == '00'){
 | 
			
		||||
					 timeString = `00:00:01`;
 | 
			
		||||
					 timeString = `00:00:01`
 | 
			
		||||
				}else{
 | 
			
		||||
					 timeString = `${formattedHour}:00:00`
 | 
			
		||||
				}
 | 
			
		||||
			    hourPoints.push(timeString);
 | 
			
		||||
			    hourPoints.push(timeString)
 | 
			
		||||
			  }
 | 
			
		||||
			  return hourPoints;
 | 
			
		||||
			  return hourPoints
 | 
			
		||||
			},
 | 
			
		||||
			// this.arr使用方法 00:00 - 23:00
 | 
			
		||||
			getDangtiantimes() {
 | 
			
		||||
			  const hourPoints = [];
 | 
			
		||||
			  for (let hour = 0; hour < 24; hour++) {
 | 
			
		||||
			    const formattedHour = String(hour).padStart(2, '0');
 | 
			
		||||
			    const timeString = `${formattedHour}:00:00`;
 | 
			
		||||
			    hourPoints.push(timeString);
 | 
			
		||||
			    const formattedHour = String(hour).padStart(2, '0')
 | 
			
		||||
			    const timeString = `${formattedHour}:00:00`
 | 
			
		||||
			    hourPoints.push(timeString)
 | 
			
		||||
			  }
 | 
			
		||||
			  return hourPoints;
 | 
			
		||||
			  return hourPoints
 | 
			
		||||
			},
 | 
			
		||||
			// 选择套餐
 | 
			
		||||
			btntc(index, item) {
 | 
			
		||||
| 
						 | 
				
			
			@ -959,9 +952,9 @@
 | 
			
		|||
			  return time_str
 | 
			
		||||
			},
 | 
			
		||||
			formatDate(inputDate) {
 | 
			
		||||
			  const parts = inputDate.match(/(\d+)\D+(\w+)\s+(\w+)\s+(\d+)\s+(\d+)\s+(\d+):(\d+)/);
 | 
			
		||||
			  const parts = inputDate.match(/(\d+)\D+(\w+)\s+(\w+)\s+(\d+)\s+(\d+)\s+(\d+):(\d+)/)
 | 
			
		||||
			  if (!parts) {
 | 
			
		||||
			    throw new Error('Invalid date format');
 | 
			
		||||
			    throw new Error('Invalid date format')
 | 
			
		||||
			  }
 | 
			
		||||
			  const [, dayOfMonth, , month, , year, hour, minute] = parts;
 | 
			
		||||
			  const monthMap = {
 | 
			
		||||
| 
						 | 
				
			
			@ -971,10 +964,10 @@
 | 
			
		|||
			  };
 | 
			
		||||
			  const monthNum = monthMap[month];
 | 
			
		||||
			  let formattedHour = (parseInt(hour, 10) + 1).toString().padStart(2, '0');
 | 
			
		||||
			  let formattedMinute = minute.padStart(2, '0');
 | 
			
		||||
			  let formattedMinute = minute.padStart(2, '0')
 | 
			
		||||
			  let formattedSecond = '00'; // 原始字符串中没有秒,所以默认为00
 | 
			
		||||
			  const formattedDate = `${year}-${monthNum}-${dayOfMonth.padStart(2, '0')} ${formattedHour}:${formattedMinute}:${formattedSecond}`;
 | 
			
		||||
			  return formattedDate;
 | 
			
		||||
			  const formattedDate = `${year}-${monthNum}-${dayOfMonth.padStart(2, '0')} ${formattedHour}:${formattedMinute}:${formattedSecond}`
 | 
			
		||||
			  return formattedDate
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -1446,7 +1439,7 @@
 | 
			
		|||
		.shichangxz {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			margin-top: 50rpx;
 | 
			
		||||
			margin-top: 30rpx;
 | 
			
		||||
			// width: 3000rpx;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1553
									
								
								pages/myorder/orderxd.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1553
									
								
								pages/myorder/orderxd.vue
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -352,7 +352,10 @@
 | 
			
		|||
						onlyFromCamera: true,
 | 
			
		||||
						scanType: ['qrCode'],
 | 
			
		||||
						success: res => {
 | 
			
		||||
					         console.log(res);
 | 
			
		||||
					         console.log(res)
 | 
			
		||||
							 uni.navigateTo({
 | 
			
		||||
							 	url:'/pages/myorder/orderxd?roomId=' + 65 
 | 
			
		||||
							 })
 | 
			
		||||
						},
 | 
			
		||||
						fail: err => {
 | 
			
		||||
							console.error('扫描失败:', err)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user