Parcourir la source

核销时间,餐饮核销bug 修改

17755135699 il y a 1 an
Parent
commit
2aa3750207

+ 5 - 1
components/uNavBar1/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<u-navbar class="nav" :title="title" :leftIconSize="36" bgColor="#007A69" leftIconColor="#fff"
+	<u-navbar class="nav" :title="title" :leftIconSize="36" :bgColor="bgColor" leftIconColor="#fff"
 		:titleStyle="titleStyle">
 		<view class="u-nav-slot" slot="left">
 			<u-icon name="arrow-left" size="44" color='#fff' @tap="toBack(backUrl)"></u-icon>
@@ -27,6 +27,10 @@
 			backUrl: {
 				typeof: String,
 				default: ''
+			},
+			bgColor: {
+				typeof: String,
+				default: '#007A69'
 			}
 		},
 		data() {

+ 2 - 1
pages.json

@@ -282,7 +282,8 @@
 				{
 					"path": "Verification/detailsewm",
 					"style": {
-						"navigationBarTitleText": "订单详情"
+						"navigationBarTitleText": "订单详情",
+						"navigationStyle": "custom"
 
 					}
 				},

+ 14 - 8
pages/house/orderDetails.vue

@@ -48,6 +48,14 @@
 			<!-- 订单信息 -->
 			<view class="orderInfo">
 				<view class="tit">订单信息</view>
+				<u-cell :border="false">
+					<text slot="icon" class="txt">订单编号</text>
+					>
+					<text slot="title" class="val">{{list.orderCode}}</text>
+					<text slot="right-icon" class="icon"
+						style="border: 1rpx solid #1372FF; border-radius: 50rpx; box-sizing: border-box; color: #1372FF;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
+						@tap="copyOrderNo(list)">复制</text>
+				</u-cell>
 				<u-cell :border="false">
 					<text slot="icon" class="txt">关联房间</text>
 					>
@@ -58,6 +66,11 @@
 					>
 					<text slot="title" class="val">{{list.repastTime}}</text>
 				</u-cell>
+				<u-cell :border="false" v-if="list.orderStatus==2">
+					<text slot="icon" class="txt">核销时间</text>
+					>
+					<text slot="title" class="val">{{list.repastTime}}</text>
+				</u-cell>
 				<u-cell :border="false">
 					<text slot="icon" class="txt">预约人姓名</text>
 					>
@@ -85,14 +98,7 @@
 					<text slot="title" class="val">{{list.repastNum}}</text>
 				</u-cell>
 
-				<u-cell :border="false">
-					<text slot="icon" class="txt">订单编号</text>
-					>
-					<text slot="title" class="val">{{list.orderCode}}</text>
-					<text slot="right-icon" class="icon"
-						style="border: 1rpx solid #1372FF; border-radius: 50rpx; box-sizing: border-box; color: #1372FF;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
-						@tap="copyOrderNo(list)">复制</text>
-				</u-cell>
+				
 				<u-cell :border="false">
 					<text slot="icon" class="txt">备注</text>
 					>

+ 8 - 13
pagesHouse/Mine/ordersList/details/details.vue

@@ -75,15 +75,12 @@
 				<block v-if="infoMation.orderType!=3">
 					<u-cell :border="false" v-for="(i,index) in infoMation.detailDto">
 						<text slot="icon" class="txt">{{i.touristName}}</text>
-						>
-						<text slot="title" class="val">{{i.touristCode}}</text>
 						<text slot="right-icon">航班号:{{infoMation.boatNo||''}}</text>
 					</u-cell>
 				</block>
 				<block v-else>
 					<u-cell :border="false" v-for="(i,index) in infoMation.detailJoinDto">
 						<text slot="icon" class="txt">{{i.touristName}}</text>
-						>
 						<text slot="title" class="val">{{i.touristCode}}</text>
 						<text slot="right-icon">航班号:{{infoMation.boatNo||''}}</text>
 					</u-cell>
@@ -94,7 +91,6 @@
 				<view class="tit">订单信息</view>
 				<u-cell :border="false">
 					<text slot="icon" class="txt">订单编号</text>
-					>
 					<text slot="title" class="val">{{infoMation.orderCode}}</text>
 					<text slot="right-icon" class="icon"
 						style="border: 1rpx solid #007A69; border-radius: 50rpx; box-sizing: border-box; color: #007A69;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
@@ -103,49 +99,48 @@
 				<template v-if="merchantType==4">
 					<u-cell :border="false">
 						<text slot="icon" class="txt">付款时间</text>
-						>
 						<text slot="title" class="val">{{infoMation.orderTime}}</text>
 					</u-cell>
+					<u-cell :border="false" v-if="infoMation.orderStatus==3">
+						<text slot="icon" class="txt">核销时间</text>
+						<text slot="title" class="val">{{infoMation.writeOffTime}}</text>
+					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">订单总价</text>
-						>
 						<text slot="title" class="val">{{infoMation.realityPay}}</text>
 					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">实际付款</text>
-						>
 						<text slot="title" class="val">{{infoMation.realityPay}}</text>
 					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">联系方式</text>
-						>
 						<text slot="title" class="val">{{infoMation.phone}}</text>
 					</u-cell>
 				</template>
 				<template v-if="merchantType==10">
 					<u-cell :border="false">
 						<text slot="icon" class="txt">下单时间</text>
-						>
 						<text slot="title" class="val">{{infoMation.orderTime}}</text>
 					</u-cell>
+					<u-cell :border="false" v-if="infoMation.status==7">
+						<text slot="icon" class="txt">核销时间</text>
+						<text slot="title" class="val">{{infoMation.updateDate}}</text>
+					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">联系人</text>
-						>
 						<text slot="title" class="val">{{infoMation.linkName}}</text>
 					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">联系方式</text>
-						>
 						<text slot="title" class="val">{{infoMation.linkPhone}}</text>
 					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">支付方式</text>
-						>
 						<text slot="title" class="val">{{infoMation.payType==1?'微信':'支付宝'}}</text>
 					</u-cell>
 					<u-cell :border="false">
 						<text slot="icon" class="txt">总计</text>
-						>
 						<text slot="title" class="val" style="color: #111">{{infoMation.totalPrice}}</text>
 					</u-cell>
 				</template>

+ 1 - 2
pagesHouse/Mine/ordersList/outcome.vue

@@ -31,8 +31,7 @@
 		},
 		methods: {
 			toDetails() {
-				console.log(this.orderId);
-				uni.navigateTo({
+				uni.redirectTo({
 					url: '/pagesHouse/home/bill'
 				})
 			},

+ 63 - 269
pagesHouse/Verification/detailsewm.vue

@@ -1,8 +1,8 @@
 <template>
-	<view class="page" :style="{'min-height':h+'px','padding-top':'0px'}">
-		<!-- <c-nav-bar1 :title="titles"></c-nav-bar1> -->
+	<view class="page">
+		<c-nav-bar1 title="订单详情" bgColor="transparent"></c-nav-bar1>
 		<view class="bg"></view>
-		<view class="content">
+		<view class="content" :style="{'height':(h-mt)+'px','top':(mt+20)+'px'}">
 			<view class="head">
 				<text class="status disabled" v-if="getalllist.orderStatus=='0'">待支付</text>
 				<text class="status disabled" v-if="getalllist.orderStatus=='-1'">已取消</text>
@@ -10,12 +10,9 @@
 				<text class="status s3" v-if="getalllist.orderStatus=='-3'">已退款</text>
 				<text class="status s3" v-if="getalllist.orderStatus=='3'">已使用</text>
 			</view>
-			<view class="hand-title">
-				请在{{getalllist.activityEndTime.substring(0,10)}}日(含)前到店消费
-			</view>
 			<view class="ticketInfonmb">
 				<view class="taocan">
-					<view class="taocan1">
+					<view class="taocan1" v-if="getalllist.productImg">
 						<u--image :src="getalllist.productImg.split(',')[0]" width="168rpx" height="168rpx"></u--image>
 					</view>
 					<view class="taocan2">
@@ -34,15 +31,14 @@
 					</view>
 				</view>
 			</view>
-
-			
 			<!-- 订单信息 -->
 			<view class="basicInfo">
 				<view class="chaoji">
 					套餐明细
 				</view>
 				<view class="taocanmx">
-					<view class="taocanlistmx" v-for="(item,index) in JSON.parse(getalllist.productsDetail)" :key="index">
+					<view class="taocanlistmx" v-for="(item,index) in JSON.parse(getalllist.productsDetail)"
+						:key="index">
 						<view class="taocanlistmx1">
 							*{{item.name}}
 						</view>
@@ -53,11 +49,10 @@
 							¥{{item.price}}
 						</view>
 					</view>
-					
+
 				</view>
 			</view>
-	
-			<view class="basicInfo">
+			<view class="basicInfo" style="margin-bottom: 50rpx;">
 				<view class="chaoji" style="margin: 0 0 40rpx 0;">
 					订单信息
 				</view>
@@ -78,6 +73,14 @@
 							{{getalllist.paymentTime}}
 						</view>
 					</view>
+					<view class="dingdanxinxi1" v-if="getalllist.orderStatus==3">
+						<view class="dingdanxinxi2">
+							核销时间
+						</view>
+						<view class="dingdanxinxi3">
+							{{getalllist.writeOffTime}}
+						</view>
+					</view>
 					<view class="dingdanxinxi1">
 						<view class="dingdanxinxi2">
 							订单总价
@@ -104,16 +107,11 @@
 					</view>
 				</view>
 			</view>
-
 		</view>
-		<view class="btns">
-			<view class="hexiao" @click="hexiaonima">
-						确认核销		
-							</view>
-			
+		<view class="btns" v-if="getalllist.orderStatus==4">
+			<view class="hexiao" @click="hexiaonima">确认核销 </view>
 		</view>
 		<u-toast ref="uToast"></u-toast>
-
 		<!-- 取消弹框 -->
 		<u-modal :show="showAgree" :title="title" :content='content' showCancelButton="true" confirmText='确定'
 			confirmColor='#007A69' @confirm="confirm" @cancel='cancel'></u-modal>
@@ -166,265 +164,58 @@
 				departWeeks: '',
 				weeks: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
 				checkInRooms: 0,
-				hexiaodata:{},
+				hexiaodata: {},
 
 			}
 		},
 		onLoad(option) {
-
-			//this.id = option.orderId;
-			//console.log('111111111111111111', this.id)
-			//this.getList()
-console.log('++++++', JSON.parse(option.list));
-this.hexiaodata=JSON.parse(option.list);
-
-			let postdata={
-				merchantCategory:4,
-				orderCode:JSON.parse(option.list).orderCode,
-			};
-			
-			this.$api.get('/api/merchant/food/queryOrderDetail', postdata).then(res => {
-				  console.log('111111111111111111',res.data)
-				if(res.data.code==500){
+			this.hexiaodata = JSON.parse(option.list);
+			let postdata = {
+				merchantCategory: 4,
+				orderCode: JSON.parse(option.list).orderCode,
+			};
+			this.$api.get('/api/merchant/food/queryOrderDetail', postdata).then(res => {
+				if (res.data.code == 500) {
 					uni.showToast({
-					title:res.data.msg,
-					icon:'none',
-					duration:1500
+						title: res.data.msg,
+						icon: 'none',
+						duration: 1500
 					})
-					setTimeout(()=>{
+					setTimeout(() => {
 						uni.navigateBack({
 							delta: 1
 						});
-					},1500)
-				}else{
-					this.getalllist=res.data.data;
-				}
-				
+					}, 1500)
+				} else {
+					this.getalllist = res.data.data;
+				}
+
 			})
 
 
 		},
 		methods: {
-			hexiaonima(){
-				  console.log('this.getalllist',this.hexiaodata)
-				this.$api.post('/api/merchant/food/scenic/merchant/order/verifyOrderQrCode?writeOffCode',this.hexiaodata)
+			hexiaonima() {
+				this.$api.post('/api/merchant/food/scenic/merchant/order/verifyOrderQrCode?writeOffCode', this.hexiaodata)
 					.then(res => {
 						if (res.data.code == 0) {
 							this.$showToast('核销成功');
-							uni.setStorageSync('list',{totalPrice:this.getalllist.realityPay});
-							setTimeout(()=>{
+							uni.setStorageSync('list', {
+								totalPrice: this.getalllist.realityPay
+							});
+							setTimeout(() => {
 								uni.navigateTo({
 									url: '/pagesHouse/Mine/ordersList/outcome'
 								})
-							},1500)
+							}, 1500)
 							// uni.navigateBack({
 							// 	delta: 1
 							// });
 						} else {
 							this.$showToast(res.data.msg)
 						}
-					})		
-			},
-			copyOrderNo(item) {
-				let that = this;
-				// #ifdef H5
-				this.$copyText(item.orderCode).then(res => {
-					this.$showToast('复制成功');
-				})
-				// #endif
-				// #ifdef MP-WEIXIN
-				uni.setClipboardData({
-					data: item.orderCode,
-					success(res) {
-						that.$showToast('复制成功');
-					},
-					fail(err) {
-						that.$showToast('复制失败');
-					}
-				})
-				// #endif
-			},
-			toEvaluate(item) {
-				item.guideId = item.id;
-				item.sourceType = 2;
-				uni.navigateTo({
-					url: '/pagesMy/appraise/appraise?obj=' + JSON.stringify(item)
-				})
-			},
-			// 导航
-			navigation(item) {
-				// let lat = item.lat
-				// let lon = item.lon
-				uni.openLocation({
-					latitude: Number(item.lat),
-					longitude: Number(item.lon),
-					name: item.homestayName,
-				});
-			},
-			// 去酒店详情
-			cardBtn(item) {
-				// 初始化
-				let arriveDate = new Date().Format('yyyy-MM-dd')
-				let mt = new Date().setDate(new Date().getDate() + 1);
-				let leaveDate = new Date(mt).Format('yyyy-MM-dd')
-
-				console.log(arriveDate, leaveDate);
-
-				uni.navigateTo({
-					url: "/pagesTrip/hotel/details/index?list=" +
-						JSON.stringify([{
-							homestayId: item.homestayId,
-							name: '',
-							arriveDate: arriveDate, //	到达时间(yyyy-MM-dd)
-							leaveDate: leaveDate, //离开时间(yyyy-MM-dd)
-						}, ]),
-				});
-			},
-			// 立即支付	
-
-			pay() {
-
-				var list = JSON.stringify({
-					price: this.list.orderAmount,
-					orderId: this.orderId
-				})
-				this.$api.post('/order/app/pay/createOrder', {
-					orderCode: this.orderCode,
-					tradeType: 'JSAPI',
-					openId: JSON.parse(uni.getStorageSync('userInfo')).openId
-				}, false).then(res => {
-
-					// uni.navigateTo({
-					// 	url: '/pagesTrip/hotel/paymentSuccess/index?list=' + list
-					// })
-
-					if (res.statusCode == 200 && res.data != null) {
-						this.payShow = false;
-						// var obj = { name: 'John', age: 25 };
-						// wx.setStorageSync('wxPay', res.data);
-
-						this.$wxPay(res.data).then(result => {
-							uni.redirectTo({
-								url: '/pagesTrip/hotel/paymentSuccess/index?list=' + list
-							})
-
-						})
-					}
-
-				})
-			},
-			// 拨打电话。
-			phone() {
-				uni.makePhoneCall({
-					phoneNumber: this.getalllist.phone //仅为示例
-				});
-			},
-			// 取消订单
-			toStatus0() {
-				this.showAgree = true
-			},
-			//确定取消
-			confirm() {
-				this.agree = true
-				this.showAgree = false
-				this.$api.post('/api/hotel/cancelOrder', this.form).then(res => {
-					// uni.navigateBack(1)
-
-					uni.navigateTo({
-						url: '/pagesMy/order/index'
 					})
-
-					this.getList()
-				})
-			},
-			// 取消
-			cancel() {
-				this.showAgree = false
-			},
-			// 删除订单
-			toStatus1() {
-				this.$refs.uToast.show({
-					type: 'success',
-					title: '',
-					message: "正在开发",
-					iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
-				})
-			},
-			// 申请退款
-			GoRefund() {
-				
-				uni.redirectTo({
-					url: "/pagesTrip/fineFood/fineFood/reformoney?list=" + JSON.stringify(this.getalllist)
-				})
 			},
-			// 再次预定
-			applyAfterSales(item) {
-
-				// 初始化
-				let arriveDate = new Date().Format('yyyy-MM-dd')
-				let mt = new Date().setDate(new Date().getDate() + 1);
-				let leaveDate = new Date(mt).Format('yyyy-MM-dd')
-
-				console.log(arriveDate, leaveDate);
-
-				uni.navigateTo({
-					url: "/pagesTrip/hotel/details/index?list=" +
-						JSON.stringify([{
-							homestayId: item.homestayId,
-							name: '',
-							arriveDate: arriveDate, //	到达时间(yyyy-MM-dd)
-							leaveDate: leaveDate, //离开时间(yyyy-MM-dd)
-						}, ]),
-				});
-
-
-
-				// this.$refs.uToast.show({
-				// 	type: 'success',
-				// 	title: '',
-				// 	message: "正在开发",
-				// 	iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
-				// })
-			},
-
-			getList() {
-
-				this.$api.get('/api/merchant/food/queryOrderDetail', {
-						merchantCategory: 4,
-						orderCode: this.id
-					})
-					.then(res => {
-						console.log('res.data.data', res.data.data)
-						this.getalllist = res.data.data;
-
-						//this.qrFun(this.object.orderCode)
-
-						// this.list = res.data.data
-						// this.orderCode = res.data.data.orderCode
-						// this.num = res.data.data.num
-						// this.price = res.data.data.realityPay
-						// this.orderId = res.data.data.id
-						// this.checkInRooms = res.data.data.checkInRooms
-						// this.bedData = res.data.data.bedData[0]
-						// this.arriveTime = res.data.data.arriveDate.slice(5, 7); // 截取第一个字符
-						// this.arriveTimes = res.data.data.arriveDate.slice(8, 10); // 截取第一个字符
-						// this.leaveTime = res.data.data.leaveDate.slice(5, 7); // 截取第一个字符
-						// this.leaveTimes = res.data.data.leaveDate.slice(8, 10); // 截取第一个字符
-						// this.count = Math.abs(this.leaveTimes - this.arriveTimes);
-						// this.checkInTimeStart = res.data.data.arriveDate.slice(11, 16)
-						// this.checkOutTime = res.data.data.leaveDate.slice(11, 16)
-						// this.landlinePhone = res.data.data.landlinePhone
-						// this.form.orderCode = res.data.data.orderCode
-						// this.form.status = res.data.data.orderStatus
-						// this.FormData.arriveDate = res.data.data.arriveDate.slice(0, 10)
-						// this.FormData.leaveDate = res.data.data.leaveDate.slice(0, 10)
-						// this.departWeek = this.weeks[new Date(res.data.data.arriveDate).getDay()];
-						// this.departWeeks = this.weeks[new Date(res.data.data.leaveDate).getDay()];
-						// console.log('1111111', this.departWeek);
-						// console.log('222222', this.departWeeks);
-						// this.FormData.arriveDate=res.data.data.arriveDate
-					})
-			}
 		}
 	}
 </script>
@@ -804,7 +595,7 @@ this.hexiaodata=JSON.parse(option.list);
 
 	.basicInfo {
 		width: 678rpx;
-		margin: 0 auto;
+		margin: 0 auto 20rpx;
 		background: #fff;
 		border-radius: 20rpx;
 		padding: 20rpx;
@@ -1049,15 +840,17 @@ this.hexiaodata=JSON.parse(option.list);
 		text-align: center;
 	}
 
-	page {
+	.page {
 		box-sizing: border-box;
 		background-color: #F5F8FA;
+		overflow: hidden;
 
 
 		.content {
 			position: relative;
 			z-index: 3;
 			padding-bottom: 160rpx;
+			overflow-y: auto;
 
 			.hand-title {
 				position: absolute;
@@ -1386,7 +1179,7 @@ this.hexiaodata=JSON.parse(option.list);
 
 	.head {
 		box-sizing: border-box;
-		padding: 34rpx 24rpx 60rpx;
+		padding: 34rpx 24rpx 30rpx;
 		display: flex;
 		position: relative;
 		z-index: 2;
@@ -1421,20 +1214,21 @@ this.hexiaodata=JSON.parse(option.list);
 		background-color: #fff;
 		gap: 0 20rpx;
 		box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
-.hexiao{
-	width: 690rpx;
-	height: 88rpx;
-	background: #007A69;
-	border-radius: 44rpx;
-	font-family: PingFang-SC, PingFang-SC;
-	font-weight: bold;
-	font-size: 32rpx;
-	color: #FFFFFF;
-	line-height:  88rpx;
-	text-align: center;
-	font-style: normal;
-}
-
-	
+
+		.hexiao {
+			width: 690rpx;
+			height: 88rpx;
+			background: #007A69;
+			border-radius: 44rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			line-height: 88rpx;
+			text-align: center;
+			font-style: normal;
+		}
+
+
 	}
 </style>

+ 0 - 2
pagesHouse/Verification/ems.vue

@@ -26,8 +26,6 @@
 					onlyFromCamera: true,
 					success: (res) => {
 						//
-						console.log('扫描二维码成功,结果:' + JSON.parse(res.result).merchantId,);
-						console.log(uni.getStorageSync('merchantId'))
 						if(JSON.parse(res.result).merchantId!=uni.getStorageSync('merchantId')){
 							uni.showToast({
 							title:'您的核销码不是该商家的核销码',

+ 1 - 1
pagesMy/orderList/orderList.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- <view class="pages"> -->
 	<view class="pages" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
-		<c-nav-bar title="核销结果" showIcon="true" :titleStyle="titleStyle"></c-nav-bar>
+		<c-nav-bar title="我的订单" showIcon="true" :titleStyle="titleStyle"></c-nav-bar>
 		<!-- <TopTabs :list="tabList" @changeTab="changeTab">
 		</TopTabs> -->
 		<view class="tb">