Переглянути джерело

Merge branch 'master' of http://git.ringzle.com:3000/htcwl/hotelHomestayWx

liwei2496 8 місяців тому
батько
коміт
f8f7312df9

+ 8 - 0
pages.json

@@ -89,6 +89,14 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/house/WriteOffResults",
+			"style": {
+				"navigationBarTitleText": "核销结果",
+				"navigationStyle": "custom"
+			}
+		},
+
 
 		{
 			"path": "pages/house/stayCheck",

+ 13 - 12
pages/home/index.vue

@@ -222,18 +222,19 @@
 					success: (res) => {
 						console.log('扫描二维码成功,结果:' + res.result);
 						let orderId = res.result
-						this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
-							.then(res => {
-								console.log('0000', res);
-								if (res.data.code == 0) {
-									uni.setStorageSync('list', res.data.data);
-									uni.navigateTo({
-										url: '/pages/house/orderDetails?orderId=' + orderId
-									})
-								} else {
-									this.$showToast(res.data.msg)
-								}
-							})
+						uni.navigateTo({
+							url: '/pages/house/orderDetails?orderId=' + orderId
+						})
+						// this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
+						// 	.then(res => {
+						// 		console.log('0000', res);
+						// 		if (res.data.code == 0) {
+						// 			uni.setStorageSync('list', res.data.data);
+
+						// 		} else {
+						// 			this.$showToast(res.data.msg)
+						// 		}
+						// 	})
 					},
 					error: (res) => {
 						console.log('扫描二维码出现错误')

+ 114 - 0
pages/house/WriteOffResults.vue

@@ -0,0 +1,114 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
+		<c-nav-bar title="核销结果" showIcon="true" :titleStyle="titleStyle"></c-nav-bar>
+
+		<view class="result">
+			<image src="https://i.ringzle.com/file/20240319/331e202150fa4f328b8441db8dc0415e.png" mode="aspectFill">
+			</image>
+			<text>核销成功</text>
+			<view>¥<span>{{price}}</span></view>
+		</view>
+		<view class="btns">
+			<!-- <view @tap="toDetails">订单详情</view> -->
+			<view @tap="toReturnHome">返回首页</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'payResult',
+		data() {
+			return {
+				price: '',
+				orderId: '',
+				titles: '安全收银台',
+				h: uni.getSystemInfoSync().windowHeight,
+				mt: uni.getSystemInfoSync().statusBarHeight + 44,
+			}
+		},
+		onLoad(option) {
+			this.price = option.price;
+		},
+		methods: {
+			// toDetails() {
+			// 	console.log(this.orderId);
+			// 	uni.navigateTo({
+			// 		url: '/pagesTrip/hotel/orderDetails/index?orderId=' + this.orderId
+			// 	})
+			// },
+			toReturnHome() {
+				uni.reLaunch({
+					url: '/pagesMy/orderList/orderList'
+				})
+
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page {
+		padding: 64rpx 40rpx;
+
+		.result {
+			padding-top: 50rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			image {
+				width: 320rpx;
+				height: 200rpx;
+			}
+
+			&>text {
+				font-size: 32rpx;
+				font-family: PingFang-SC-Bold, PingFang-SC;
+				font-weight: bold;
+				color: #111111;
+				margin-top: 20rpx;
+			}
+
+			&>view {
+				font-size: 36rpx;
+				font-family: ArialMT;
+				color: #333333;
+				margin-top: 20rpx;
+
+				span {
+					font-size: 48rpx;
+					font-family: Arial-BoldMT, Arial;
+					font-weight: BoldMT;
+					color: #333333;
+				}
+			}
+		}
+
+		.btns {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 268rpx;
+
+			&>view {
+				width: 100%;
+				height: 88rpx;
+				border-radius: 46rpx;
+				// border: 2rpx solid #CCCCCC;
+				background-color: #1372FF;
+				line-height: 88rpx;
+				text-align: center;
+				font-size: 32rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #FFFFFF;
+
+				// &:last-child {
+				// 	border: 2rpx solid #007A69;
+				// 	color: #007A69;
+				// }
+			}
+		}
+	}
+</style>

+ 13 - 2
pages/house/orderDetails.vue

@@ -189,11 +189,22 @@
 				})
 			},
 			toStatus0(item) {
-				this.$api.get('/merchant/hotel/repast/writeOffOrder/orderCode' + item.orderCode)
+
+				// this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
+				// 	.then(res => {
+				// 		console.log('0000', res);
+				// 		if (res.data.code == 0) {
+				// 			uni.setStorageSync('list', res.data.data);
+
+				// 		} else {
+				// 			this.$showToast(res.data.msg)
+				// 		}
+				// 	})
+				this.$api.get('/merchant/hotel/repast/writeOffOrder/' + item.orderCode)
 					.then(res => {
 						if (res.data.code == 0) {
 							uni.navigateTo({
-								url: '/pagesMy/orderList/orderList'
+								url: '/pages/house/WriteOffResults?price=' + item.orderAmount
 							})
 						} else {
 							this.$showToast(res.data.msg)

+ 1 - 0
pagesHouse/home/bill.vue

@@ -41,6 +41,7 @@
 						<text>{{item.orderTime}}</text>
 					</view>
 					<view class="right">{{item.realityPay}}</text>
+
 					</view>
 				</view>
 			</template>