|  | @@ -14,35 +14,43 @@
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  			<view class="b_items">
 | 
	
		
			
				|  |  |  				<view @tap="toTurn">
 | 
	
		
			
				|  |  | -					<text>{{item.stayedInRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.stayedInRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>已入住</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view @tap="toTurn">
 | 
	
		
			
				|  |  | -					<text>{{item.toCheckinRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.toCheckinRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>待入住</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view @tap="toConfirm">
 | 
	
		
			
				|  |  | -					<text>{{item.undeterminedOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.undeterminedOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>待确认</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  | -					<text>{{item.pendingOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.pendingOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>待处理</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  | -					<text>{{item.yestOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.yestOrders||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>昨日订单</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view @tap="toTurn">
 | 
	
		
			
				|  |  | -					<text>{{item.yestSaleRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.yestSaleRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>昨日售出</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view @tap="toTurn">
 | 
	
		
			
				|  |  | -					<text>{{item.yestVacantRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.yestVacantRooms||0}}</text>
 | 
	
		
			
				|  |  | +					<text v-else>0</text>
 | 
	
		
			
				|  |  |  					<text>昨日空房</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  | -					<text>{{item.yestCheckinRatio||0}}%</text>
 | 
	
		
			
				|  |  | +					<text v-if="item">{{item.yestCheckinRatio||0}}%</text>
 | 
	
		
			
				|  |  | +					<text v-else>0%</text>
 | 
	
		
			
				|  |  |  					<text>入住率</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
	
		
			
				|  | @@ -98,7 +106,7 @@
 | 
	
		
			
				|  |  |  		</block>
 | 
	
		
			
				|  |  |  		<Tabbar :tabbarIndex="0"></Tabbar>
 | 
	
		
			
				|  |  |  		<u-picker :show="shShow" :columns="nameList" @close="shShow=false" @cancel="shShow=false"
 | 
	
		
			
				|  |  | -			@confirm="confirm" itemHeight="88"></u-picker>
 | 
	
		
			
				|  |  | +			@confirm="confirm" :immediateChange="true" itemHeight="88"></u-picker>
 | 
	
		
			
				|  |  |  		<!-- 取消订单 -->
 | 
	
		
			
				|  |  |  		<u-modal :show="show" @confirm="confirmCheck" :show-cancel-button="true" @cancel="show=false">
 | 
	
		
			
				|  |  |  			<view class="slot-content">
 | 
	
	
		
			
				|  | @@ -120,7 +128,6 @@
 | 
	
		
			
				|  |  |  	export default {
 | 
	
		
			
				|  |  |  		data() {
 | 
	
		
			
				|  |  |  			return {
 | 
	
		
			
				|  |  | -				homestayId: this.$store.state.moduleHouse.homestayId,
 | 
	
		
			
				|  |  |  				name: '',
 | 
	
		
			
				|  |  |  				shList: [],
 | 
	
		
			
				|  |  |  				nameList: [],
 | 
	
	
		
			
				|  | @@ -171,7 +178,9 @@
 | 
	
		
			
				|  |  |  						let shs = [];
 | 
	
		
			
				|  |  |  						this.shList.forEach(d => shs.push(d.merchantName));
 | 
	
		
			
				|  |  |  						this.nameList = [shs];
 | 
	
		
			
				|  |  | -						let t = this.shList.find(d => d.merchantId == uni.getStorageSync('homestayId'));
 | 
	
		
			
				|  |  | +						let id = uni.getStorageSync('homestayId');
 | 
	
		
			
				|  |  | +						if(!uni.getStorageSync('homestayId')) id = uni.getStorageSync('merchantId');
 | 
	
		
			
				|  |  | +						let t = this.shList.find(d => d.merchantId == id);
 | 
	
		
			
				|  |  |  						this.name = t ? t.merchantName : ''
 | 
	
		
			
				|  |  |  					} else this.$showToast(res.data.msg);
 | 
	
		
			
				|  |  |  				})
 | 
	
	
		
			
				|  | @@ -179,10 +188,12 @@
 | 
	
		
			
				|  |  |  			confirm(e) {
 | 
	
		
			
				|  |  |  				this.name = e.value[0];
 | 
	
		
			
				|  |  |  				this.shShow = false;
 | 
	
		
			
				|  |  | +				
 | 
	
		
			
				|  |  |  				let t = this.shList.find(d => d.merchantName == this.name);
 | 
	
		
			
				|  |  |  				if (t) {
 | 
	
		
			
				|  |  |  					if (t.merchantType == 2) { //酒店民宿
 | 
	
		
			
				|  |  |  						uni.setStorageSync('homestayId', t.merchantId);
 | 
	
		
			
				|  |  | +						uni.setStorageSync('merchantId', '');
 | 
	
		
			
				|  |  |  						this.getDetails();
 | 
	
		
			
				|  |  |  						this.page = 1;
 | 
	
		
			
				|  |  |  						this.finished = false;
 | 
	
	
		
			
				|  | @@ -191,12 +202,13 @@
 | 
	
		
			
				|  |  |  					} else {
 | 
	
		
			
				|  |  |  						this.item = null;
 | 
	
		
			
				|  |  |  						this.list = [];
 | 
	
		
			
				|  |  | +						uni.setStorageSync('homestayId', '');
 | 
	
		
			
				|  |  |  						uni.setStorageSync('merchantId', t.merchantId);
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			getDetails() {
 | 
	
		
			
				|  |  | -				this.$api.get('/merchant/hotel/home/getHotelHomeInfo/' + this.homestayId).then(res => {
 | 
	
		
			
				|  |  | +				this.$api.get('/merchant/hotel/home/getHotelHomeInfo/' + (uni.getStorageSync('homestayId')||0)).then(res => {
 | 
	
		
			
				|  |  |  					if (res.data.code === 0) {
 | 
	
		
			
				|  |  |  						this.item = res.data.data;
 | 
	
		
			
				|  |  |  					} else this.$showToast(res.data.msg);
 | 
	
	
		
			
				|  | @@ -204,11 +216,11 @@
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			getList() {
 | 
	
		
			
				|  |  |  				this.$api.get('/merchant/hotel/order/getMerchantOrderPageList', {
 | 
	
		
			
				|  |  | -					homestayId: uni.getStorageSync('homestayId'),
 | 
	
		
			
				|  |  | +					homestayId: (uni.getStorageSync('homestayId')||0),
 | 
	
		
			
				|  |  |  					limit: this.limit,
 | 
	
		
			
				|  |  |  					page: this.page,
 | 
	
		
			
				|  |  |  					orderStatus: '',
 | 
	
		
			
				|  |  | -					// orderTime:new Date().Format('yyyy-MM-dd')
 | 
	
		
			
				|  |  | +					orderTime:new Date().Format('yyyy-MM-dd')
 | 
	
		
			
				|  |  |  				}).then(res => {
 | 
	
		
			
				|  |  |  					if (res.data.code === 0) {
 | 
	
		
			
				|  |  |  						this.list = [...this.list, ...res.data.data.list];
 |