|
@@ -21,8 +21,8 @@
|
|
|
<view class="type" v-for="item in roomType" :key="item.houseBaseId">
|
|
|
<view class="left" v-if="Selected==true">
|
|
|
<view class="image">
|
|
|
- <image @tap="selectPerson()"
|
|
|
- :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
+ <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'">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -44,16 +44,19 @@
|
|
|
<view class="bottom-btn">
|
|
|
<view class="left">
|
|
|
<view class="image">
|
|
|
- <image @tap="selectPerson()"
|
|
|
- :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
+ <!-- <image
|
|
|
+ :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'">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view class="text">
|
|
|
- 已选:1
|
|
|
+ 已选:{{selectedTags.length}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
- <view class="right-btn">
|
|
|
+ <view class="right-btn" @click="piliangxiajia()">
|
|
|
批量下架
|
|
|
</view>
|
|
|
<view class="right-btn" @click="Pricing()">
|
|
@@ -85,26 +88,11 @@
|
|
|
<view class="hander-two-text">
|
|
|
每天价格
|
|
|
</view>
|
|
|
- <view class="hander-two-image">
|
|
|
- <view class="image">
|
|
|
- <image @tap="selectPerson()"
|
|
|
- :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
- </image>
|
|
|
- </view>
|
|
|
- <view class="hander-two-text">
|
|
|
- 固定设置
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="hander-two-image">
|
|
|
- <view class="image">
|
|
|
- <image @tap="selectPerson()"
|
|
|
- :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
- </image>
|
|
|
- </view>
|
|
|
- <view class="hander-two-text">
|
|
|
- 按天设置
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <u-radio-group @change="selectType" size="32" iconSize="24" v-model="fromData.comboType"
|
|
|
+ placement="row" activeColor='#1372FF'>
|
|
|
+ <u-radio labelSize='30' label="固定设置" :name='1'></u-radio>
|
|
|
+ <u-radio labelSize='30' label="按天设置" :name='2' v-if="tabIndex==0"></u-radio>
|
|
|
+ </u-radio-group>
|
|
|
</view>
|
|
|
<view class="hander-three">
|
|
|
<view class="hander-three-text">
|
|
@@ -150,7 +138,10 @@
|
|
|
roomType: [],
|
|
|
isSelect: false,
|
|
|
Selected: false,
|
|
|
- showPricing: false
|
|
|
+ showPricing: false,
|
|
|
+ selectedTags: [],
|
|
|
+ ids: [],
|
|
|
+ from: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -158,6 +149,34 @@
|
|
|
this.getHomestayId()
|
|
|
},
|
|
|
methods: {
|
|
|
+ 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(); //获取商品列表
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectPerson(e, i) {
|
|
|
+ console.log(e, i);
|
|
|
+ if (this.selectedTags.includes(e)) {
|
|
|
+ this.selectedTags = this.selectedTags.filter(t => t !== e);
|
|
|
+ this.ids.splice(i, 1)
|
|
|
+ console.log('1111');
|
|
|
+ } else {
|
|
|
+ console.log('2222');
|
|
|
+ this.selectedTags.push(e);
|
|
|
+ this.ids.push(e.id)
|
|
|
+ this.from = {
|
|
|
+ ids: this.ids,
|
|
|
+ status: e.status == 1 ? 0 : 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
close() {
|
|
|
this.showPricing = false
|
|
@@ -167,10 +186,6 @@
|
|
|
console.log('11111111');
|
|
|
this.showPricing = true
|
|
|
},
|
|
|
- // 选中
|
|
|
- selectPerson() {
|
|
|
- this.isSelect = !this.isSelect
|
|
|
- },
|
|
|
// 批量显示
|
|
|
showList() {
|
|
|
this.Selected = !this.Selected
|