Quellcode durchsuchen

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

2912631854@qq.com vor 1 Jahr
Ursprung
Commit
d89fd14eea

+ 8 - 0
pages.json

@@ -248,6 +248,14 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "Verification/recordDetails",
+					"style": {
+						"navigationBarTitleText": "核销记录",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
+					}
+				},
 				{
 					"path": "Verification/success",
 					"style": {

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

@@ -40,7 +40,12 @@
 							<text v-if='infoMation.orderType==1'>价格:¥{{infoMation.discountPrice}}/艘</text>
 						</view>
 						<view class="price">
-							<text style="font-size: 30rpx;">数量:</text>X<text>{{infoMation.detailDto&&infoMation.detailDto.length}}</text>
+							<block v-if="infoMation.orderType!=3">
+								<text style="font-size: 30rpx;">数量:</text>X<text>{{infoMation.detailDto&&infoMation.detailDto.length}}</text>
+							</block>
+							<block v-else>
+								<text style="font-size: 30rpx;">数量:</text>X<text>{{infoMation.detailJoinDto&&infoMation.detailJoinDto.length}}</text>
+							</block>
 						</view>
 						</template>
 						<template v-if="merchantType==4">
@@ -67,12 +72,22 @@
 			<!-- 游客信息 -->
 			<view class="orderInfo yk" style="padding-bottom: 30rpx;" v-if="merchantType==10">
 				<view class="tit">游客信息</view>
-				<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 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>
+				</block>
 			</view>
 			<!-- 订单信息 -->
 			<view class="orderInfo " style="padding-bottom: 30rpx;">

+ 15 - 3
pagesHouse/Verification/detailsewm.vue

@@ -184,9 +184,21 @@ this.hexiaodata=JSON.parse(option.list);
 			};
 			
 			this.$api.get('/api/merchant/food/queryOrderDetail', postdata).then(res => {
-				  console.log('111111111111111111',res.data.data)
-				this.getalllist=res.data.data;
-				
+				  console.log('111111111111111111',res.data)
+				if(res.data.code==500){
+					uni.showToast({
+					title:res.data.msg,
+					icon:'none',
+					duration:1500
+					})
+					setTimeout(()=>{
+						uni.navigateBack({
+							delta: 1
+						});
+					},1500)
+				}else{
+					this.getalllist=res.data.data;
+				}
 				
 			})
 

+ 15 - 6
pagesHouse/Verification/ems.vue

@@ -25,12 +25,21 @@
 				uni.scanCode({
 					onlyFromCamera: true,
 					success: (res) => {
-						console.log('扫描二维码成功,结果:' + res.result);
-						
-						uni.navigateTo({
-							url: "/pagesHouse/Verification/detailsewm?list=" + res.result
-						})
-					
+						//
+						console.log('扫描二维码成功,结果:' + JSON.parse(res.result).merchantId,);
+						console.log(uni.getStorageSync('merchantId'))
+						if(JSON.parse(res.result).merchantId!=uni.getStorageSync('merchantId')){
+							uni.showToast({
+							title:'您的核销码不是该商家的核销码',
+							icon:'none',
+							duration:1500
+							})
+						}else{
+							uni.navigateTo({
+								url: "/pagesHouse/Verification/detailsewm?list=" + res.result
+							})
+						}
+											
 					},
 					error: (res) => {
 						console.log('扫描二维码出现错误')

+ 6 - 2
pagesHouse/Verification/record.vue

@@ -10,7 +10,7 @@
 			<view class="right">共{{totalNum}}单 收入¥{{totalAmount}}</view>
 		</view>
 		<view class="list">
-			<view class="item" v-for="(item,index) in data" :key="index">
+			<view class="item" v-for="(item,index) in data" :key="index" @tap="toDetails(item)">
 				<image :src="item.goodsType==2?'../../static/bao.png':'../../static/pin.png'"></image>
 				<view class="mid">
 					<text>{{item.playDate}} {{item.playTime}}出发/{{item.goodsType==2?'包船':'拼船'}}/{{item.boatNo}}</text>
@@ -74,7 +74,11 @@
 				this.show = false;
 				this.getdata()
 			},
-
+			toDetails(item){
+				uni.navigateTo({
+					url:'/pagesHouse/Verification/recordDetails?orderCode='+item.orderCode
+				})
+			}
 		}
 	}
 </script>

+ 185 - 0
pagesHouse/Verification/recordDetails.vue

@@ -0,0 +1,185 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="核销记录"></c-nav-bar>
+		<view class="box ship_time">
+			<view class="hx_title">
+				发船信息:{{item.orderEntity.playDate}} {{item.orderEntity.playTime}}/{{orderType[item.orderEntity.orderType]}}/{{item.orderEntity.boatNo}}
+			</view>
+			<view class="st_info">
+				<text>订单编号:{{item.orderEntity.orderCode}}</text>
+				<view class="sti_xq" @tap="toOrderDetails(item.orderEntity.orderCode)">详情</view>
+			</view>
+			<view class="st_info">
+				<text>出游时间:{{item.orderEntity.playLength}}小时</text>
+			</view>
+		</view>
+		<view class="box person_info">
+			<view class="hx_title">预约人员信息(<span v-if="item&&item.bookList">{{item.bookList.length}}</span>)</view>
+			<block v-if="item&&item.bookList.length>0">
+				<view class="hx_item" v-for="(book,index) in item.bookList" :key="index">
+					<view class="hi_name">{{book.touristName}}</view>
+					<view class="hi_idcard">身份证 {{book.touristCode}}</view>
+					<view class="hi_btn" :class="classCfg[book.remark]">{{typeCfg[book.remark]}}</view>
+				</view>
+			</block>
+		</view>
+		<view class="box person_info">
+			<view class="hx_title">实际上船人员信息(<span v-if="item&&item.boardingList">{{item.boardingList.length}}</span>)</view>
+			<block v-if="item&&item.boardingList.length>0">
+				<view class="hx_item" v-for="(board,index) in item.boardingList" :key="index">
+					<view class="hi_name">{{board.touristName}}</view>
+					<view class="hi_idcard">身份证 {{board.touristCode}}</view>
+					<view class="hi_btn" :class="classCfg[board.remark]">{{typeCfg[board.remark]}}</view>
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				classCfg:{'book':'yd_btn','scene':'xz_btn'},
+				typeCfg:{'book':'预订单','scene':'现场单'},
+				orderType:{
+					1:'特价',
+					2:'包船',
+					3:'拼船'
+				},
+				orderCode:'',
+				item:null
+			}
+		},
+		onLoad(option) {
+			this.orderCode = option.orderCode;
+			this.getDetails();
+		},
+		methods: {
+			getDetails(){
+				this.$api.get('/scenic/order/writeOffRecordInfo/'+this.orderCode).then(res=>{
+					if(res.data.code===0){
+						this.item = res.data.data;
+						this.item.bookList.forEach(l=>{
+							l.touristCode = l.touristCode.replace(/^(.{6})(?:\d+)(.{4})$/, '\$1******\$2');
+						})
+						this.item.boardingList.forEach(l=>{
+							l.touristCode = l.touristCode.replace(/^(.{6})(?:\d+)(.{4})$/, '\$1******\$2');
+						})
+					}else this.$showToast(res.data.msg);
+				})
+			},
+			toOrderDetails(id){
+				uni.navigateTo({
+					url:'/pagesHouse/Mine/ordersList/details/details?orderCode='+id
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		width: 100%;
+		padding: 0 24rpx 40rpx;
+		box-sizing: border-box;
+		background: #F5F8FA;
+		
+		.box{
+			width: 100%;
+			background: #ffffff;
+			padding: 30rpx 24rpx;
+			box-sizing: border-box;
+			margin-top: 20rpx;
+			border-radius: 16rpx;
+		}
+		
+		.hx_title{
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #111111;
+			line-height: 32rpx;
+		}
+		
+		.ship_time{
+			.st_info{
+				margin-top: 25rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				text{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 28rpx;
+					color: #777777;
+					line-height: 32rpx;
+				}
+				.sti_xq{
+					width: 64rpx;
+					height: 36rpx;
+					border-radius: 18rpx;
+					border: 1rpx solid #007A69;
+					text-align: center;
+					line-height: 36rpx;
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 22rpx;
+					color: #007A69;
+				}
+			}
+		}
+		
+		.person_info{
+			width: 100%;
+			padding: 36rpx 24rpx 0;
+			box-sizing: border-box;
+			.hx_title{
+				margin-bottom: 7rpx;
+			}
+			.hx_item{
+				width: 100%;
+				display: flex;
+				align-items: center;
+				padding: 45rpx 0;
+				box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
+				&:last-child{
+					box-shadow: none;
+				}
+				.hi_name{
+					width: calc(100% - 510rpx);
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 30rpx;
+					color: #111111;
+				}
+				.hi_idcard{
+					width: 400rpx;
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 28rpx;
+					color: #666666;
+					text-align: left;
+				}
+				.hi_btn{
+					width: 110rpx;
+					height: 48rpx;
+					border-radius: 11rpx;
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 26rpx;
+					text-align: center;
+					line-height: 48rpx;
+				}
+			}
+		}
+		.yd_btn{
+			background: #F0F8F6;
+			color: #007A69;
+		}
+		.xz_btn{
+			background: #E8EFFD;
+			color: #326EE0;
+		}
+	}
+</style>