Przeglądaj źródła

feat: 订单bug

2912631854@qq.com 1 rok temu
rodzic
commit
8a868b079c

+ 1 - 3
pages/HotelMerchandise/index.vue

@@ -62,9 +62,6 @@
 			<view class="type" v-for="item,index in roomType" :key="index" style="">
 				<view class="left" v-if="Selected==true">
 					<view class="image">
-						<!-- 	<image @tap="selectPerson(item,index)"
-							:src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
-						</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'">
 						</image>
@@ -345,6 +342,7 @@
 				this.id = e.id
 			},
 			selectPerson(e, i) {
+
 				if (this.selectedTags.includes(e)) {
 					this.selectedTags = this.selectedTags.filter(t => t !== e);
 					this.ids.splice(i, 1)

+ 46 - 31
pages/my/roomType.vue

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

+ 7 - 3
pagesHouse/Mine/ordersList/details/details.vue

@@ -34,7 +34,7 @@
 					</view>
 					<view class="right">
 						<view class="name">
-							{{infoMation.merchantName}}
+							{{infoMation.productName}}
 						</view>
 						<view class="tip">
 							<text v-if='infoMation.orderType==3'>价格:¥{{infoMation.avePrice}}/人</text>
@@ -45,7 +45,11 @@
 							<view class="" v-if="merchantType==10">
 								<text>数量:</text>X<text>{{infoMation.detailDto.length}}</text>
 							</view>
-							<text>{{infoMation.notice}}</text>
+							<view v-else>
+								<text>{{infoMation.notice}}</text>
+								<view style="font-size: 30rpx ;color: #111111; font-weight: bold;margin-top: 10rpx;">
+									¥{{infoMation.orderAmount}}</view>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -100,7 +104,7 @@
 					<u-cell :border="false">
 						<text slot="icon" class="txt">联系方式</text>
 						>
-						<text slot="title" class="val">{{infoMation.phone}}</text>
+						<text slot="title" class="val">{{infoMation.guestPhone}}</text>
 					</u-cell>
 				</template>
 				<template v-if="merchantType==10">

+ 20 - 19
pagesHouse/home/bill.vue

@@ -26,24 +26,25 @@
 			<template v-if="merchantType==10">
 				<view class="li" v-for="(item,index) in info.pageData.list" :key="index" @click="detail(item)">
 					<view class="left">
-						<text>{{item.playDate}} {{item.playTime}}出发/{{item.orderType==2?'包船':'拼船'}}/{{item.boatNo}}</text>
+						<text>{{item.playDate}}
+							{{item.playTime}}出发/{{item.orderType==2?'包船':'拼船'}}/{{item.boatNo}}</text>
 						<text>{{item.payTime}}</text>
 					</view>
-					<view class="right">+{{item.realPrice}}</text>
+					<view class="right">{{item.realPrice}}</text>
 					</view>
 				</view>
 			</template>
 			<template v-if="merchantType==4">
-			<view class="li" v-for="(item,index) in info.merchantOrderDTOS" :key="index" @click="detail(item)">
-				<view class="left">
-					<text>{{item.productName}}</text>
-					<text>{{item.orderTime}}</text>
-				</view>
-				<view class="right">+{{item.realityPay}}</text>
+				<view class="li" v-for="(item,index) in info.merchantOrderDTOS" :key="index" @click="detail(item)">
+					<view class="left">
+						<text>{{item.productName}}</text>
+						<text>{{item.orderTime}}</text>
+					</view>
+					<view class="right">+{{item.realityPay}}</text>
+					</view>
 				</view>
-			</view>
 			</template>
-			
+
 		</view>
 		<u-datetime-picker @confirm="confirmDate" @cancel="show=false" :show="show" v-model="value1"
 			mode="date"></u-datetime-picker>
@@ -72,9 +73,9 @@
 			}
 		},
 		onLoad() {
-			if(this.merchantType==10){
+			if (this.merchantType == 10) {
 				this.getList()
-			}else{
+			} else {
 				this.getList2()
 			}
 		},
@@ -90,9 +91,9 @@
 				const formattedTime = `${year}-${month}-${day}`;
 
 				this.date = formattedTime;
-				if(this.merchantType==10){
+				if (this.merchantType == 10) {
 					this.getList()
-				}else{
+				} else {
 					this.getList2()
 				}
 				this.show = false;
@@ -101,7 +102,7 @@
 			getList() {
 				this.$api.get('/scenic/order/tradeBills', {
 					startDate: this.date,
-					endDate:'',
+					endDate: '',
 					dateType: '1',
 					merchantId: uni.getStorageSync('merchantId')
 				}).then(res => {
@@ -110,8 +111,8 @@
 						this.info = res.data.data;
 					} else {
 						this.info = {
-							pageData:{
-								list:[]
+							pageData: {
+								list: []
 							},
 							paymentAmount: 0,
 							paymentCount: 0,
@@ -143,9 +144,9 @@
 				})
 			},
 			detail(item) {
-				let info=encodeURIComponent(JSON.stringify(item));
+				let info = encodeURIComponent(JSON.stringify(item));
 				uni.navigateTo({
-					url: "/pagesHouse/home/orderBillDetail?info="+info
+					url: "/pagesHouse/home/orderBillDetail?info=" + info
 				})
 			}
 		},