Bläddra i källkod

feat: 订单bug

2912631854@qq.com 11 månader sedan
förälder
incheckning
3e143dc2ef

+ 20 - 3
pages/home/index.vue

@@ -221,10 +221,19 @@
 					onlyFromCamera: true,
 					success: (res) => {
 						console.log('扫描二维码成功,结果:' + res.result);
-						let orderId = res.result
+						let obj = {
+							orderId: res.result,
+							isDel: 1
+						}
 						uni.navigateTo({
-							url: '/pages/house/orderDetails?orderId=' + orderId
+							url: '/pages/house/orderDetails?obj=' + JSON.stringify(obj)
 						})
+
+						// uni.navigateTo({
+						// 	url: '/pages/house/orderDetails?orderId=' + orderId
+						// })
+
+
 						// this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
 						// 	.then(res => {
 						// 		console.log('0000', res);
@@ -320,9 +329,17 @@
 						url: '/pages/house/orderInfo?orderId=' + item.id
 					})
 				} else {
+					let obj = {
+						orderId: item.id,
+						isDel: 0
+					}
 					uni.navigateTo({
-						url: '/pages/house/orderDetails?orderId=' + item.id
+						url: '/pages/house/orderDetails?obj=' + JSON.stringify(obj)
 					})
+
+					// uni.navigateTo({
+					// 	url: '/pages/house/orderDetails?orderId=' + item.id
+					// })
 				}
 			},
 			toAll() {

+ 10 - 5
pages/house/orderDetails.vue

@@ -107,18 +107,18 @@
 
 		</view>
 		<view class="btns">
-			<template v-if="list.orderStatus==1">
+			<template v-if="list.orderStatus==1&&isDel!=0">
 				<view class="" @click="toStatus0(list)"
 					style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;">
 					确定核销
 				</view>
 			</template>
-			<template v-if="list.orderStatus==-2||list.orderStatus==2||list.orderStatus==5||list.orderStatus==4">
+			<!-- 		<template v-if="list.orderStatus==-2||list.orderStatus==5||list.orderStatus==4">
 				<view class="" style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;"
 					@click="applyAfterSales(list)">
 					删除订单
 				</view>
-			</template>
+			</template> -->
 		</view>
 		<u-toast ref="uToast"></u-toast>
 
@@ -155,11 +155,16 @@
 				checkInTimeStart: '',
 				checkOutTime: '',
 				checkInRooms: 0,
-
+				isDel: null,
 			}
 		},
 		onLoad(option) {
-			this.id = option.orderId
+
+			console.log('+++++++++++', JSON.parse(option.obj));
+			let obj = JSON.parse(option.obj)
+			this.id = obj.orderId
+			this.isDel = obj.isDel
+
 			this.getList()
 		},
 		methods: {

+ 11 - 10
pagesHouse/HotelMerchandise/index.vue

@@ -35,7 +35,7 @@
 			<view class="contented" :style="{'height':(h-mt)+'px'}" v-show="areaShow">
 				<view class="custom_popup">
 					<view class="types">
-						<view class="pricequjian" >
+						<view class="pricequjian">
 							<view class="jiage" v-for="(item, index) in list1" :key="index"
 								@click="clickareaShow(item, index)">
 								<view class="contentpeice">
@@ -104,12 +104,12 @@
 
 					</view>
 					<view class="type-btn-right">
-						<view class="" @click="shanchu(item,index)">
+						<!-- <view class="" @click="shanchu(item,index)">
 							删除
-						</view>
-						<view class="" @click="gaijia(item,index)" v-if='item.goodsType == 2'>
+						</view> -->
+						<!-- <view class="" @click="gaijia(item,index)" v-if='item.goodsType == 2'>
 							改价格
-						</view>
+						</view> -->
 						<view v-if="canyinmeishi" class="" @click="xiajia(item,index)">
 							{{fromData.status==0?'下架':'上架'}}
 						</view>
@@ -128,9 +128,9 @@
 						<view class="" @click="shanchu(item,index)">
 							删除
 						</view>
-						<view class="" @click="gaijia(item,index)">
+						<!-- <view class="" @click="gaijia(item,index)">
 							改价格
-						</view>
+						</view> -->
 						<view v-if="canyinmeishi" class="" @click="xiajia(item,index)">
 							{{fromData.status==0?'下架':'上架'}}
 						</view>
@@ -164,9 +164,9 @@
 					<view v-if="!canyinmeishi" class="right-btn" @click="piliangxiajia">
 						{{fromData.status==0?'批量上架':'批量下架'}}
 					</view>
-					<view class="right-btn" @click="piliangshanchu">
+					<!-- <view class="right-btn" @click="piliangshanchu">
 						批量删除
-					</view>
+					</view> -->
 				</view>
 			</view>
 		</view>
@@ -799,7 +799,8 @@
 
 			.pricequjian {
 				width: 100%;
-min-height: 240rpx;
+				min-height: 240rpx;
+
 				.contentpeice {
 					width: 100%;
 					display: flex;

+ 6 - 1
pagesMy/orderList/orderList.vue

@@ -193,8 +193,13 @@
 						url: '/pages/house/orderInfo?orderId=' + item.id
 					})
 				} else {
+
+					let obj = {
+						orderId: item.id,
+						isDel: 0
+					}
 					uni.navigateTo({
-						url: '/pages/house/orderDetails?orderId=' + item.id
+						url: '/pages/house/orderDetails?obj=' + JSON.stringify(obj)
 					})
 				}