Forráskód Böngészése

房态bug修复,加刷新按钮

17755135699 4 hónapja
szülő
commit
64b43a4281
1 módosított fájl, 37 hozzáadás és 27 törlés
  1. 37 27
      pages/house/index.vue

+ 37 - 27
pages/house/index.vue

@@ -81,27 +81,34 @@
 										:class="'s'+delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status',item2.floor)">
 										<!-- 空置房-->
 										<template
-											v-if="delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status',item2.floor) == 1">
-											<view v-if="disTabCli(roomData) == 1" class="cellBox disT">
-												¥{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'price',item2.floor)}}
-											</view>
-											<view v-else
-												@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind,item2.floor)"
-												class="cellBox">
-												¥{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'price',item2.floor)}}
-											</view>
+											v-if="!delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status',item2.floor) == 1">
 										</template>
 										<template v-else>
-											<view
-												@click="tabCli(item2.roomNumber,item2.houseBaseId,roomData.roomDataList)"
-												class="tdP">
-												<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'guestName',item2.floor)}}</text>
-												<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'status',item2.floor)}}</text>
-											</view>
+
+
+											<template
+												v-if="delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status',item2.floor) == 1">
+												<view v-if="disTabCli(roomData) == 1" class="cellBox disT">
+													¥{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'price',item2.floor)}}
+												</view>
+												<view v-else
+													@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind,item2.floor)"
+													class="cellBox">
+													¥{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'price',item2.floor)}}
+												</view>
+											</template>
+											<template v-else>
+												<view
+													@click="tabCli(item2.roomNumber,item2.houseBaseId,roomData.roomDataList)"
+													class="tdP">
+													<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'guestName',item2.floor)}}</text>
+													<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'status',item2.floor)}}</text>
+												</view>
+											</template>
 										</template>
 										<!-- 点击时状态 -->
 										<view class="cover" v-if="checkPosition.indexOf(i + '-'+index2+ '-'+ ind) > -1"
-											@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind,item2.item2.floor)">
+											@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind,item2.floor)">
 											<u-icon name="checkbox-mark" size="36" color="#fff"></u-icon>
 										</view>
 									</view>
@@ -113,8 +120,8 @@
 			</view>
 			<view class="opration" v-if="checkDataRoomId.length!=0">
 				<text @click="areaShow=true">关房</text>
-				<text @click="createOrder()">预订</text>
 				<text @click="priceShow=true">修改价格</text>
+				<text @click="createOrder()">预订</text>
 			</view>
 		</view>
 		<Tabbar :tabbarIndex="1"></Tabbar>
@@ -127,12 +134,14 @@
 			<view class="changePrice">
 				<u--input placeholder="请设置新价格" type="number" border="surround" v-model="newPrice"></u--input>
 				<view class="btns">
-					<u-button text="取消" type="info" size="mini" @click="priceShow=false;clearData()"></u-button>
-					<u-button text="确定" type="primary" size="mini" @click="changePrice()"></u-button>
+					<u-button text="取消" type="info" @click="priceShow=false;clearData()"></u-button>
+					<u-button text="确定" type="primary"  @click="changePrice()"></u-button>
 				</view>
 			</view>
 
 		</u-popup>
+		<!-- 刷新 -->
+		<u-icon name="reload" @tap="init()" customStyle="position: fixed;z-index: 99;right: 280rpx;top: 68rpx;padding-left: 100rpx;" size="42"></u-icon>
 	</view>
 </template>
 
@@ -201,9 +210,9 @@
 			this.getTj();
 		},
 		filters: {
-			delDataStatus(roomNumber, id, roomId, name,floor) {
+			delDataStatus(roomNumber, id, roomId, name, floor) {
 				for (let i = 0; i < roomId.length; i++) {
-					if (floor==roomId[i].floor&&id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
+					if (floor == roomId[i].floor && id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
 						if (name == "status") {
 							return that.statusTxt[roomId[i][name]]
 						} else {
@@ -312,9 +321,9 @@
 				}
 				this.$forceUpdate();
 			},
-			delDataStatus(roomNumber, id, roomId, name,floor) {
+			delDataStatus(roomNumber, id, roomId, name, floor) {
 				for (let i = 0; i < roomId.length; i++) {
-					if (floor == roomId[i].floor &&id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
+					if (floor == roomId[i].floor && id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
 						return roomId[i][name] + 1;
 					}
 				}
@@ -326,7 +335,7 @@
 			},
 			clearData() {
 				setTimeout(() => {
-					this.newPrice='';
+					this.newPrice = '';
 					this.checkDataDate = [];
 					this.checkPrice = [];
 					this.checkDataRoomId = [];
@@ -421,18 +430,19 @@
 
 <style scoped lang="less">
 	.changePrice {
-		padding: 40rpx;
+		padding:50rpx;
+		width: 600rpx;
 		border-radius: 20rpx;
 
 		.btns {
-			margin-top: 40rpx;
+			margin-top: 60rpx;
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
 
 			text {
 				display: inline-block;
-				width: 130rpx;
+				width: 180rpx;
 				height: 50rpx;
 				line-height: 50rpx;
 				text-align: center;