2912631854@qq.com преди 10 месеца
родител
ревизия
92ac6479be
променени са 3 файла, в които са добавени 264 реда и са изтрити 67 реда
  1. 18 18
      pages/my/houseList.vue
  2. 162 32
      pages/my/roomType.vue
  3. 84 17
      pages/statistics/index.vue

+ 18 - 18
pages/my/houseList.vue

@@ -19,14 +19,14 @@
 						style="width: 210rpx;height: 42rpx; font-size: 30rpx;flex:1" />
 				</view>
 			</view>
-			<!-- 	<view class="shelves">
+			<view class="shelves">
 				<view style="margin-left: 30rpx;">
 					<text style="font-size: 30rpx; ">是否上架</text>
 				</view>
 				<view style="margin-right: 30rpx;">
 					<u-switch v-model="checked" size="50" active-color="#07C160"> </u-switch>
 				</view>
-			</view> -->
+			</view>
 			<!-- 图片上传
 			 -->
 			<view class="uploadPic">
@@ -47,13 +47,13 @@
 
 			</view>
 			<!-- 价格信息 -->
-			<view class="priceInfo">
-				<!-- 标题 -->
-				<!-- <view class="titleInfo">
+			<!-- <view class="priceInfo"> -->
+			<!-- 标题 -->
+			<!-- <view class="titleInfo">
 					<text style="font-size: 32rpx; font-weight: 700; margin-left: 10rpx;">价格信息</text>
 				</view> -->
-				<!-- 周末周日区分 -->
-				<!-- <view class="week">
+			<!-- 周末周日区分 -->
+			<!-- <view class="week">
 					<view class="weekend">
 						<view>
 							<text style="font-size: 30rpx; ">区分平日周末</text>
@@ -63,8 +63,8 @@
 						</view>
 					</view>
 				</view> -->
-				<!-- 平日价格 -->
-				<!-- <view class="priceBoxWeek" v-if="!weekedChecked">
+			<!-- 平日价格 -->
+			<!-- <view class="priceBoxWeek" v-if="!weekedChecked">
 					<view class="weekendBox" @scroll="scroll">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">固定房价</text>
@@ -77,8 +77,8 @@
 					</view>
 				</view> -->
 
-				<!-- 每日价格 -->
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- 每日价格 -->
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周一</text>
@@ -90,7 +90,7 @@
 					</view>
 				</view> -->
 
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周二</text>
@@ -102,7 +102,7 @@
 					</view>
 				</view> -->
 
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周三</text>
@@ -114,7 +114,7 @@
 					</view>
 				</view> -->
 
-				<!-- 	<view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- 	<view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周四</text>
@@ -126,7 +126,7 @@
 					</view>
 				</view> -->
 
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周五</text>
@@ -138,7 +138,7 @@
 					</view>
 				</view> -->
 
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox">
 						<view>
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周六</text>
@@ -150,7 +150,7 @@
 					</view>
 				</view> -->
 
-				<!-- <view class="priceBoxWeek" v-if="weekedChecked">
+			<!-- <view class="priceBoxWeek" v-if="weekedChecked">
 					<view class="weekendBox" style=" border-bottom: 1rpx solid #fff;">
 						<view style="margin-top: 10rpx;">
 							<text style="font-size: 30rpx; margin-right: 90rpx; ">周日</text>
@@ -162,7 +162,7 @@
 						</view>
 					</view>
 				</view> -->
-			</view>
+			<!-- </view> -->
 			<!-- 房间列表 -->
 			<view class="everyHouseList" style="padding-top: 20rpx;">
 				<view class="HouseListTitleInfo">

+ 162 - 32
pages/my/roomType.vue

@@ -18,11 +18,11 @@
 			</view>
 		</view>
 		<!-- 房型选择 -->
-		<view class="type" v-for="item in roomType" :key="item.houseBaseId">
+		<view class="type" v-for="item,index in roomType" :key="item.houseBaseId">
 			<view class="left" v-if="Selected==true">
 				<view class="image">
 					<image @tap="selectPerson(item,index)"
-						:src="selectedTags.includes(item)?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
+						:src="selectedTags.includes(item)?'https://i.ringzle.com/file/20240605/5251702f12aa4ff0a4ddadc1669901b0.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
 					</image>
 				</view>
 			</view>
@@ -48,7 +48,7 @@
 						:src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
 					</image> -->
 						<image
-							:src="selectedTags.length>0?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
+							:src="selectedTags.length>0?'https://i.ringzle.com/file/20240605/5251702f12aa4ff0a4ddadc1669901b0.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
 						</image>
 					</view>
 					<view class="text">
@@ -56,9 +56,12 @@
 					</view>
 				</view>
 				<view class="right">
-					<!-- 	<view class="right-btn" @click="piliangxiajia()">
+					<view class="right-btn" @click="piliangshangjia()">
+						批量上架
+					</view>
+					<view class="right-btn" @click="piliangxiajia()">
 						批量下架
-					</view> -->
+					</view>
 					<view class="right-btn" @click="Pricing()">
 						批量定价
 					</view>
@@ -99,9 +102,21 @@
 					<view class="hander-three-text">
 						起始日期
 					</view>
-					<view class="hander-three-input" @click="show=true">
-						<u--input placeholder="请选择" border="none" disabledColor='#fff' fontSize='26' v-model="valueTime"
-							disabled='false'></u--input>
+					<view class="hander-three-input" @click="showTimeOne">
+						<u--input placeholder="请选择" border="none" disabledColor='#fff' fontSize='26'
+							v-model="valueTimeOne" disabled='false'></u--input>
+					</view>
+					<view class="hander-three-icon">
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+				<view class="hander-three" style="margin-top:30rpx ;">
+					<view class="hander-three-text">
+						结束日期
+					</view>
+					<view class="hander-three-input" @click="showTimeTwo">
+						<u--input placeholder="请选择" border="none" disabledColor='#fff' fontSize='26'
+							v-model="valueTimeTwo" disabled='false'></u--input>
 					</view>
 					<view class="hander-three-icon">
 						<u-icon name="arrow-right"></u-icon>
@@ -120,7 +135,7 @@
 						<u--input placeholder="请输入价格" fontSize='26' border="none" v-model="fromData.price"
 							@change="change"></u--input>
 					</view>
-					<view class="hander-three-icon">
+					<view class="hander-three-icon" @click="delPrice">
 						<u-icon name="close-circle-fill"></u-icon>
 					</view>
 				</view>
@@ -170,8 +185,11 @@
 
 		<!-- <u-calendar :show="show" :mode="mode" @confirm="confirm"></u-calendar> -->
 		<!-- 选择入驻时间 -->
-		<u-calendar class="u-time" confirmDisabledText="确定" :show="show" :mode="mode" @confirm="confirm"
-			@close="closeDate" :closeOnClickOverlay="true" color="#007A69"></u-calendar>
+		<u-calendar class="u-time" confirmDisabledText="确定" :show="showOne" :mode="mode" @confirm="confirmOne"
+			@close="closeDate" :closeOnClickOverlay="true"></u-calendar>
+
+		<u-calendar class="u-time" confirmDisabledText="确定" :show="showTwo" :mode="mode" @confirm="confirmTwo"
+			@close="closeDate" :closeOnClickOverlay="true"></u-calendar>
 
 	</view>
 </template>
@@ -185,16 +203,19 @@
 				isSelect: false,
 				Selected: false,
 				showPricing: false,
-				show: false,
+				showOne: false,
+				showTwo: false,
 				selectedTags: [],
 				ids: [],
 				from: {},
 				tabIndex: 0,
 				typeIndex: 1,
-				mode: 'range',
-				valueTime: '',
+				mode: '',
+				valueTimeOne: '',
+				valueTimeTwo: '',
+				labelName: 0,
 				fromData: {
-					homestayId: uni.getStorageSync('homestayId'),
+					homestayId: '',
 					houseBaseIdList: [],
 					friToSatdayPrice: '',
 					sunToThursdayPrice: '',
@@ -210,8 +231,39 @@
 			this.getHomestayId()
 		},
 		methods: {
+			delPrice() {
+				this.fromData.price = ''
+			},
+			showTimeOne() {
+				this.showOne = true
+
+				// if (this.typeIndex == 1) {
+				this.mode = 'single'
+				// this.valueTimeOne = ''
+				// this.valueTimeTwo = ''
+				// this.fromData.price = ''
+				// } else if (this.typeIndex == 2) {
+				// 	this.mode = 'single'
+				// 	this.valueTimeOne = ''
+				// 	this.valueTimeTwo = ''
+				// }
+			},
+			showTimeTwo() {
+				this.showTwo = true
+
+				// if (this.typeIndex == 1) {
+				this.mode = 'single'
+				// this.valueTimeOne = ''
+				// this.valueTimeTwo = ''
+				// this.fromData.price = ''
+				// } else if (this.typeIndex == 2) {
+				// 	this.mode = 'range'
+				// 	this.valueTimeOne = ''
+				// 	this.valueTimeTwo = ''
+				// }
+			},
 			addTime() {
-
+				this.fromData.homestayId = uni.getStorageSync('homestayId')
 				this.$api.post('/merchant/hotel/room/state/batchDefineRoomPrice', this.fromData).then(res => {
 					console.log(res.data);
 					if (res.data.code == 0) {
@@ -220,35 +272,97 @@
 							this.showPricing = false
 							this.fromData = {}
 							this.getHomestayId()
+							this.valueTimeOne = ''
+							this.valueTimeTwo = ''
+							this.labelName = '0'
+							this.Selected = false
+							this.selectedTags = []
 						}, 1000)
 
 					} else this.$showToast(res.data.msg)
 				})
 			},
-			confirm(e) {
-				console.log(e);
-				this.show = false
-				this.valueTime = e[0] + '~' + e[e.length - 1]
-				console.log(this.valueTime);
+			confirmOne(e) {
+				console.log('1111', e);
+				this.showOne = false
+				if (this.typeIndex == 1) {
+					this.valueTimeOne = e[0]
+					console.log(this.valueTimeOne);
+				} else if (this.typeIndex == 2) {
+					this.valueTimeOne = e[0]
+					console.log(this.valueTimeOne);
+				}
 				this.fromData.rentDateStart = e[0]
-				this.fromData.rentDateEnd = e[e.length - 1]
-
+			},
+			confirmTwo(e) {
+				console.log('22222', e);
+				this.showTwo = false
+				if (this.typeIndex == 1) {
+					this.valueTimeTwo = e[0]
+					console.log(this.valueTimeTwo);
+				} else if (this.typeIndex == 2) {
+					this.valueTimeTwo = e[0]
+					console.log(this.valueTimeTwo);
+				}
+				this.fromData.rentDateEnd = e[0]
 			},
 			closeDate() {
-				this.show = false
+				this.showOne = false
 			},
 			selectType(type) {
 				console.log(type);
 				this.typeIndex = type;
-				// this.fromData.comboType = type
 			},
+
+			// 上架
 			piliangxiajia() {
-				this.$api.post('/merchant/hotel/repast/batchPutAway', this.from).then(res => {
-					this.selectedTags = [];
-					this.Selected = false;
-					this.getHomestayId(); //获取商品列表
+				let obj = {
+					isPutaway: 0,
+					idList: this.fromData.houseBaseIdList
+				}
+				console.log(this.selectedTags);
+				this.$api.post('/merchant/hotel/room/state/updPutawayState', obj).then(res => {
+					if (res.data.code == 0) {
+						this.$showToast('下架成功')
+						setTimeout(() => {
+							this.showPricing = false
+							this.getHomestayId()
+							this.Selected = false
+							this.selectedTags = []
+						}, 1000)
+					} else this.$showToast(res.data.msg)
+
+				})
+			},
+
+			// 下架
+			piliangshangjia() {
+
+				let obj = {
+					isPutaway: 1,
+					idList: this.fromData.houseBaseIdList
+				}
+				this.$api.post('/merchant/hotel/room/state/updPutawayState', obj).then(res => {
+					console.log(res);
+					if (res.data.code == 0) {
+
+						this.$showToast('下架成功')
+						setTimeout(() => {
+							this.showPricing = false
+							this.getHomestayId()
+							this.Selected = false
+							this.selectedTags = []
+						}, 1000)
+					} else this.$showToast(res.data.msg)
 				})
+
 			},
+
+
+
+
+
+
 			selectPerson(e, i) {
 				console.log(e, i);
 				if (this.selectedTags.includes(e)) {
@@ -277,6 +391,7 @@
 			// 批量显示
 			showList() {
 				this.Selected = !this.Selected
+				// this.selectedTags = []
 			},
 			// 获取房型列表信息
 			getHomestayId() {
@@ -309,6 +424,14 @@
 </script>
 
 <style lang="scss">
+	.uicon-close {
+		font-size: 35rpx !important;
+	}
+
+	.u-radio__text {
+		margin-right: 35rpx !important;
+	}
+
 	.u-reset-button,
 	.u-button--active {
 		width: 100% !important;
@@ -319,7 +442,7 @@
 	}
 
 	.u-slide-up-enter-active {
-		height: 75vh !important;
+		height: 55vh !important;
 	}
 
 	.u-time {
@@ -346,9 +469,10 @@
 
 	.pop-pop {
 		height: 65vh;
-		padding: 46rpx 20rpx 0;
+
 
 		.hander-one {
+			padding: 46rpx 20rpx 0;
 			display: flex;
 			justify-content: space-between;
 
@@ -363,6 +487,7 @@
 		}
 
 		.hander-two {
+			padding: 0 20rpx;
 			display: flex;
 			align-items: center;
 			margin: 30rpx 0;
@@ -392,6 +517,8 @@
 		}
 
 		.hander-three {
+			padding: 0 20rpx;
+			margin: 0 20rpx;
 			display: flex;
 			border: 1rpx solid #CCCCCC;
 			border-radius: 16rpx;
@@ -419,7 +546,9 @@
 
 
 		.hander-four {
-			margin-top: 30rpx;
+			padding: 0 20rpx;
+			margin: 30rpx 20rpx 0;
+			// margin-top: 30rpx;
 			display: flex;
 			border-radius: 16rpx;
 			justify-content: space-between;
@@ -577,6 +706,7 @@
 				justify-content: space-evenly;
 
 				.right-btn {
+					margin: 0 20rpx;
 					// width: 148rpx;
 					width: 100%;
 					height: 80rpx;

+ 84 - 17
pages/statistics/index.vue

@@ -1,16 +1,18 @@
 <template>
 	<view class="page" :style="{'padding-top':mt+'px'}">
 		<c-nav-bar title="统计" :showIcon="false"></c-nav-bar>
-		<view class="hander">
+		<view class="hander" @click="show=true">
 			<!-- 2024年1月 -->
 			<view
 				class="tn-flex tn-flex-col-center  tn-margin-right tn-padding-xs tn-text-sm tn-bg-gray--light tn-radius tn-color-gray--dark"
-				style="border-radius: 12rpx; width: 160rpx;">
-				<picker @change="bindDateChange" mode="date" :value="date" :start="startDate" :end="endDate"
+				style="border-radius: 12rpx; width: 380rpx;">
+				<!-- 	<picker @change="bindDateChange" mode="date" :value="date" :start="startDate" :end="endDate"
 					fields="month">
-					<text class="tn-padding-left-xs tn-padding-right-xs">{{date}}
-					</text>
-				</picker>
+
+				</picker> -->
+				<text class="tn-padding-left-xs tn-padding-right-xs">{{dateTime}}
+				</text>
+
 			</view>
 			<view style="width: 60rpx; line-height: 48rpx; height: 48rpx; margin: 15rpx 0 ; ">
 				<u-icon name="arrow-down" color="#000000" size="20"></u-icon>
@@ -95,6 +97,13 @@
 			</view>
 		</view>
 		<Tabbar :tabbarIndex="2"></Tabbar>
+
+		<!-- 	<u-calendar :show="show" :mode="range" :closeOnClickOverlay="true" @close="closeDate"
+			@confirm="confirm"></u-calendar> -->
+
+		<u-calendar class="u-time" confirmDisabledText="确定" :show="show" mode="range" @confirm="confirm"
+			@close="closeDate" :closeOnClickOverlay="true"></u-calendar>
+
 	</view>
 </template>
 
@@ -115,8 +124,10 @@
 				mt: uni.getSystemInfoSync().statusBarHeight + 54,
 				date: '',
 				fromData: {
-					dateDay: '',
-					homestayId: ''
+					dateDayStart: '', //开始 
+					dateDayEnd: '', //结束 
+					homestayId: '',
+
 				},
 				// 营业概况
 				chartDataPied: {},
@@ -226,7 +237,9 @@
 				dataListTwo: [],
 
 
-				list: {}
+				list: {},
+				show: false,
+				dateTime: ''
 			}
 		},
 		onReady() {
@@ -239,9 +252,30 @@
 
 		},
 		onLoad() {
-			this.getDays(0)
+			// this.getDays(0)
+
+
+			this.dateTime = new Date().Format('yyyy-MM-dd');
+			this.fromData.dateDayStart = new Date().Format('yyyy-MM-dd');
+			this.fromData.dateDayEnd = new Date().Format('yyyy-MM-dd');
+
 		},
 		methods: {
+			confirm(e) {
+				console.log(e);
+				this.show = false
+				this.dateTime = e[0] + '~' + e[e.length - 1]
+
+				this.fromData.dateDayStart = e[0]
+				this.fromData.dateDayEnd = e[e.length - 1]
+				this.getList()
+
+
+			},
+			closeDate() {
+				this.show = false
+			},
+
 
 
 			getDays(day) {
@@ -267,12 +301,7 @@
 				return m;
 			},
 
-			// 重选时间
-			bindDateChange(e) {
-				this.date = e.detail.value.slice(0, 4) + "年" + e.detail.value.slice(5, 7) + "月"
-				this.fromData.dateDay = e.detail.value
-				this.getList()
-			},
+
 			// 时间
 			startDate() {
 				return this.getDate('start')
@@ -384,6 +413,44 @@
 		}
 	}
 </script>
+<style lang="scss">
+	.uicon-close {
+		font-size: 35rpx !important;
+	}
+
+	.data-v-b73440ae {
+		height: 500rpx !important;
+	}
+
+	.u-slide-up-enter-active {
+		height: 55vh !important;
+	}
+
+	.u-popup__content {
+		z-index: 999 !important;
+	}
+
+	.u-calendar-month__days__day {
+		height: 130rpx !important;
+	}
+
+	.u-reset-button,
+	.u-button--active {
+		width: 100% !important;
+	}
+
+	.chartsview {
+		z-index: 1 !important;
+	}
+
+	.u-calendar {
+		z-index: 999 !important;
+	}
+
+	.u-time {
+		height: 75vh !important;
+	}
+</style>
 
 <style scoped lang="less">
 	.charts-box {
@@ -402,7 +469,7 @@
 
 	.hander {
 		height: 48rpx;
-		width: 216rpx;
+		width: 380rpx;
 		border-radius: 8rpx;
 		background-color: #fff;
 		text-align: center;