|
@@ -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;
|