gcz 3 éve
szülő
commit
15b99cdf3d

+ 1 - 3
README.md

@@ -1,7 +1,5 @@
 ## 城市智慧停车PDA
-#### H5调试,因为没有app方法,需要如下操作调试
-- `login.vue中` 找到到 `handleLogin()` 设置设配编号为固定值
-- `App.vue`中 禁用安卓相关函数
+#### H5调试,因为没有app方法,有些数据是写死的
 
 #### 安卓打包
 1. 确认安卓环境是最新的(git拉取)

+ 7 - 0
pages.json

@@ -89,6 +89,13 @@
 				"navigationStyle":"custom",// 隐藏系统导航栏
 				"navigationBarTitleText": "我的业绩"
 			}
+		},
+		{
+			"path": "pages/owelist/owelist",
+			"style": {
+				"navigationStyle":"custom",// 隐藏系统导航栏
+				"navigationBarTitleText": "历史欠费"
+			}
 		}
 	],
 	"globalStyle": {

+ 73 - 8
pages/getout/getoutpage/getoutpage.scss

@@ -64,24 +64,89 @@
 .bottom-btn-box{
 	bottom: 60rpx;
 }
-
+.popup{
+	/deep/ .uni-scroll-view-content{
+		padding: 39rpx 34rpx 77rpx;
+		box-sizing: border-box;
+	}
+	.popup-title{
+		font-size: 46rpx;
+		color: #404040;
+		line-height: 65rpx;
+		text-align: center;
+		border-bottom: 1px solid #D5D5D5;
+		padding-bottom: 23rpx;
+		margin-bottom: 33rpx;
+	}
+}
 .orderDetails{
-	/deep/ dl{
+	dl{
 		display: flex;
 		font-size: 36rpx;
 		line-height: 60rpx;
 		padding-left: 30rpx;
 		padding-right: 30rpx;
-		dt{
-			color: #5F5F5F;
-		}
-		
+		color: #5F5F5F;
 	}
-	/deep/ .tip{
-		margin: 20rpx 30rpx 47rpx;
+	.tip{
+		margin: 49rpx 30rpx 47rpx;
 		font-size: 36rpx;
 		font-weight: 400;
 		color: #5F5F5F;
 		line-height: 51rpx;
 	}
+	.details-footer-btn{
+		flex: 1;
+		height: 85rpx;
+		line-height: 85rpx;
+		text-align: center;
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #fff;
+		border-radius: 10rpx;
+		background-color: #EBF1FF;
+		color: #3698FA;
+		border-radius: 10rpx;
+		&--blue{
+			background-color: #3397FA;
+			color: #fff;
+		}
+		&--yellow{
+			background-color: #FF9A57;
+			color: #fff;
+		}
+	}
+	.details-footer-btn + .details-footer-btn{
+		margin-left: 15rpx;
+	}
+}
+
+.payway-popup{
+	.payway-item{
+		text-align: center;
+		font-size: 30rpx;
+		font-weight: 400;
+		color: #5F5F5F;
+		line-height: 51rpx;
+		// .icon-wrap{
+		// 	width: 143rpx;
+		// 	height: 143rpx;
+		// 	line-height: 143rpx;
+		// 	border-radius: 50%;
+		// 	border: 18rpx solid;
+		// 	margin-bottom: 9rpx;
+		// }
+	}
+	.payway-popup-btn{
+		margin-top: 42rpx;
+		height: 85rpx;
+		line-height: 85rpx;
+		background: #3397FA;
+		box-shadow: 0px 9rpx 9rpx 0px rgba(0, 0, 0, 0.03);
+		text-align: center;
+		border-radius: 10rpx;
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+	}
 }

+ 101 - 36
pages/getout/getoutpage/getoutpage.vue

@@ -2,29 +2,34 @@
 	<view class="">
 		<view class="car-info u-flex">
 			<view class="car-info-img">
-				<u-image :src="vehicleImage" mode="aspectFit" width="100%" height="100%"></u-image>
+				<u-image :src="leaveDetail.vehicleImage||vehicleImage" mode="aspectFit" width="100%" height="100%"></u-image>
 			</view>
 			<view class="car-info-text u-flex-1">
 				<view class="text-item">
-					<view class="car">{{ orderVehicleNo }}</view>
-					<view class="position">车位:{{orderSpaceName}}</view>
+					<view class="car">{{ leaveDetail.vehicleNo }}</view>
+					<view class="position">车位:{{leaveDetail.spaceName}}</view>
 				</view>
 				<!-- <view class="text-item" style="color: #3192FB;">临时卡</view> -->
 				<!-- <view class="text-item u-flex u-flex u-row-between">
 					<view class="">余额:<span class="balance">暂无</span></view>
 					<view class="recharge" @click="$refs.uToast.show({title: '建设中'})">充值</view>
 				</view> -->
-				<view class="text-item">类型:{{vehicleType|filterCarType}}</view>
+				<view class="text-item">类型:{{leaveDetail.vehicleType|filterCarType}}</view>
 			</view>
 		</view>
 		<view class="parking-info">
-			<view class="parking-info-item">进场时间:{{orderInTime}}</view>
-			<view class="parking-info-item">出场时间:{{orderOutTime}}</view>
-			<view class="parking-info-item">停车时长:{{frontDuration}}</view>
-			<view class="parking-info-item">本次应收:<span class="u-type-primary">{{totalAmount}}元</span></view>
-			<view class="parking-info-item">历史欠费:<span class="u-type-warning">{{totalAmount}}元</span></view>
+			<view class="parking-info-item">进场时间:{{leaveDetail.inTime}}</view>
+			<view class="parking-info-item">出场时间:{{leaveDetail.outTime}}</view>
+			<view class="parking-info-item">停车时长:{{leaveDetail.duration}}</view>
+			<view class="parking-info-item">本次应收:<span class="u-type-primary">{{leaveDetail.totalAmount}}元</span></view>
+			<view class="parking-info-item u-flex u-row-between"  @click="goOwelist">
+				<view class="">
+					历史欠费:<span class="u-type-warning">{{leaveDetail.oweAmount}}元</span>
+				</view>
+				<u-icon name="arrow-right" color="#7B7B7B" size="28"></u-icon>
+			</view>
 		</view>
-		<view class="bottom-btn-wrap" v-if="payStatus==0">
+		<view class="bottom-btn-wrap" v-if="leaveDetail.payStatus==0">
 			<view class="bottom-btn-box u-flex">
 				<view class="bottom-btn bg-blue" @click="handleOut">出场</view>
 				<view class="bottom-btn bg-gray" @click="openPage('pages/getout/getout')">取消</view>
@@ -32,36 +37,78 @@
 		</view>
 		
 		<!-- 订单细节 -->
-		<u-modal v-model="showOrderDetails"
-		 title="温馨提示" 
-		 cancel-text="取消" 
-		 confirm-text="确认" 
-		 :show-cancel-button="true"
-		 @confirm="confirmOut"
-		 :title-style="{color: '#404040',fontSize: '46rpx',borderBottom:'1px solid #D5D5D5',margin:'0 30rpx 30rpx',paddingBottom:'30rpx'}">
-			<view class="slot-content">
-				<rich-text class="orderDetails" :nodes="content"></rich-text>
+		<u-popup class="popup orderDetails" v-model="showOrderDetails" mode="center" border-radius="20" width="90%">
+			<view class="popup-title">温馨提示</view>
+			<view class="details-body">
+				<dl><dt>停车时长:</dt> <dd>{{leaveDetail.duration}}</dd></dl>
+				<dl><dt>车辆类型:</dt> <dd>{{leaveDetail.vehicleType|filterCarType}}</dd></dl>
+				<dl><dt>本次应收:</dt> <dd class="u-type-primary">{{leaveDetail.totalAmount}}元</dd></dl>
+				<dl><dt>历史欠费:</dt> <dd class="u-type-warning">{{leaveDetail.oweAmount}}元</dd></dl>
+				<view class="tip">
+					你是否将该车辆出场,如果是请点击确认,否则点击取消!
+				</view>
+			</view>
+			<view class="details-footer u-flex u-row-between">
+				<view class="details-footer-btn details-footer-btn--blue" @click="payAll">全部缴费</view>
+				<view class="details-footer-btn details-footer-btn--yellow" @click="payThis">本次缴费</view>
+				<view class="details-footer-btn bg-gray" @click="openPage('pages/getout/getout')">取消</view>
+			</view>
+		</u-popup>
+		<!-- 支付方式 -->
+		<u-popup class="popup payway-popup" v-model="showPayway" mode="center" border-radius="20" width="90%">
+			<view class="popup-title">支付方式</view>
+			<view class="popup-body u-flex u-row-between">
+				<view class="payway-item"  @click="$refs.uToast.show({title: '暂不支持'})">
+					<u-image src="/static/img/payway-xj.png" width="143" height="143"></u-image>
+					<!-- <view class="icon-wrap">
+						<u-icon name="rmb-circle-fill" color="#FFC02D" size="66"></u-icon>
+					</view> -->
+					现金支付
+				</view>
+				<view class="payway-item" @click="scanPay">
+					<u-image src="/static/img/payway-scan.png" width="143" height="143"></u-image>
+					<!-- <view class="icon-wrap">
+						<u-icon name="scan" color="#FFC02D" size="66"></u-icon>
+					</view> -->
+					扫码收费
+				</view>
+				<view class="payway-item" @click="qrPay">
+					<u-image src="/static/img/payway-qr.png" width="143" height="143"></u-image>
+					<!-- <view class="icon-wrap">
+						<u-icon name="rmb-circle-fill" color="#FFC02D" size="66"></u-icon>
+					</view> -->
+					收款码
+				</view>
 			</view>
-		</u-modal>
+			<view class="popup-footer payway-popup-footer">
+				<view class="payway-popup-btn" @click="closePayway">关闭</view>
+			</view>
+		</u-popup>
 		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
+	//#ifdef APP-PLUS
+	let speak = uni.requireNativePlugin("SpeechPlug");
+	//#endif
 	export default {
 		data() {
 			return {
 				vehicleImage:'/static/img/default-car.png',
 				showOrderDetails:false,//是否线上订单细节
-				content:'',
+				leaveDetail:[],
 				orderID:'',
 				orderInTime:'',
 				orderOutTime:'',
 				orderSpaceName:'',
 				orderVehicleNo:'',
 				totalAmount:'',
+				oweAmount:'',
+				duration:'',
 				vehicleType:0,
 				payStatus:null,
+				showPayway:false,
 				
 			}
 		},
@@ -71,6 +118,9 @@
 			this.orderOutTime = page.orderOutTime;
 			this.orderSpaceName = page.orderSpaceName;
 			this.orderVehicleNo = page.orderVehicleNo;
+			//#ifdef APP-PLUS
+			this.speaks(this.orderVehicleNo);
+			//#endif
 			// this.handleEntranceOutDetail();
 			
 		},
@@ -84,6 +134,9 @@
 					url: path
 				})
 			},
+			speaks(msg){
+				speak?.speakAction(msg)
+			},
 			handleEntranceOutDetail(){
 				this.$u.api.entranceOutDetail({spaceId:this.orderID})
 				.then(res=>{
@@ -91,21 +144,8 @@
 					// 	title: res.msg,
 					// 	type: 'success',
 					// });
-					this.payAmount = res.data.payAmount;
-					this.payStatus = res.data.payStatus;
-					this.vehicleImage =res.data.vehicleImage;
-					this.totalAmount = res.data.totalAmount;
-					this.vehicleType = res.data.vehicleType;
-					this.content = `
-					   <dl><dt>停车时长:</dt> <dd>` + this.frontDuration + `</dd></dl>`
-					+ `<dl><dt>账户类型:</dt><dd>` + '暂无' + `</dd></dl>`
-					+ `<dl><dt>账户余额:</dt><dd>` + '暂无' + `</dd></dl>`
-					+ `<dl><dt>车辆类型:</dt><dd>` + '暂无' + `</dd></dl>`
-					+ `<dl><dt>押金:</dt><dd>` + '暂无' + `</dd></dl>`
-					+ `<dl><dt>应收:</dt><dd>` + res.data.payAmount + `</dd></dl>`
-					+ `<dl><dt>补交:</dt><dd><span class="u-type-warning">` + '暂无' + `<span></dd></dl>`
-					+ `<div class="tip">你是否将该车辆出场,如果是请点击确认,否则点击取消!</div>`;
-					
+					this.leaveDetail = res.data;
+				
 					console.log('entranceOutDetail',res)
 				}).catch(err=>{
 					this.$refs.uToast.show({
@@ -118,6 +158,23 @@
 			},
 			handleOut(res){
 				this.showOrderDetails = true;
+			},
+			payThis(){
+				this.showOrderDetails = false;
+				this.showPayway = true;
+			},
+			payAll(){
+				this.showOrderDetails = false;
+				this.showPayway = true;
+			},
+			closePayway(){
+				this.showPayway = false;
+			},
+			scanPay(){
+				
+			},
+			qrPay(){
+				
 			},
 			confirmOut(){
 				this.$u.api.getOut({spaceId:this.orderID})
@@ -136,6 +193,14 @@
 					console.log('getOut ',err)
 				});
 			},
+			goOwelist(){
+				this.$u.route({
+					url: 'pages/owelist/owelist',
+					params: {
+						orderID: this.orderID
+					}
+				});
+			},
 			timeago(inTime,outTime){
 				var time_start = new Date(inTime.replace(/-/g,'/'));
 				var time_end = new Date(outTime.replace(/-/g,'/'));

+ 43 - 0
pages/owelist/owelist.scss

@@ -0,0 +1,43 @@
+page{
+	background-color: #F4F4F4;
+}
+.owelist{
+	margin: 31rpx 40rpx;
+	padding-bottom: 40rpx;
+	.owelist-item{
+		background-color: #fff;
+		padding: 25rpx 31rpx;
+		border-radius: 10rpx;
+		margin-bottom: 19rpx;
+		.item-header{
+			margin-bottom: 11rpx;
+			.vehicle-no{
+				font-size: 40rpx;
+				font-weight: 500;
+				color: #3D3D3D;
+				line-height: 56rpx;
+			}
+			.space-name{
+				font-size: 34rpx;
+				font-weight: 500;
+				color: #8F8F8F;
+				line-height: 48rpx;
+			}
+		}
+		.road-name{
+			font-size: 26rpx;
+			font-weight: 400;
+			color: #A2A2A2;
+			line-height: 37rpx;
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #D5D5D5;
+			margin-bottom: 21rpx;
+		}
+		.info-item{
+			font-size: 30rpx;
+			color: #63717F;
+			line-height: 42rpx;
+			margin-bottom: 13rpx;
+		}
+	}
+}

+ 81 - 0
pages/owelist/owelist.vue

@@ -0,0 +1,81 @@
+<template>
+	<view>
+		<u-navbar
+		 title="历史欠费" 
+		 title-color="#fff" 
+		 :custom-back="customBack" 
+		 :border-bottom="false" 
+		 back-icon-color="#CCE8FF" 
+		 :background="{background: 'linear-gradient(145deg, #41AFF9 0%, #2D8CFB 100%)' }"></u-navbar>
+		 
+		 <view class="owelist">
+		 	<view class="owelist-item" v-for="(item,index) in owelist" :key="item.id">
+		 		<view class="item-header u-flex u-row-between">
+		 			<view class="vehicle-no">{{item.vehicleNo}}</view>
+					<view class="space-name">{{item.spaceName}}</view>
+		 		</view>
+				<view class="road-name u-flex">
+					<u-icon name="map-fill" color="#3397FA" size="36"></u-icon>
+					{{item.roadName}}
+				</view>
+				<view class="info-item">进场时间:{{item.inTime}}</view>
+				<view class="info-item">出场时间:{{item.outTime}}</view>
+				<view class="info-item">停车时长:{{item.duration}}</view>
+				<view class="info-item">欠费金额:<span class="u-type-warning">{{item.payAmount}}元</span></view>
+		 	</view>
+		 </view>
+		 <u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				orderID:'',
+				leaveDetail:[],
+				owelist:[],
+			}
+		},
+		onLoad(page){
+			this.orderID = page.orderID;
+			console.log('this.orderID',this.orderID)
+		},
+		onShow(){
+			this.handleEntranceOutDetail();
+		},
+		methods:{
+			customBack(){
+				this.$u.route({
+					// type:'switchTab',
+					url: 'pages/index/index'
+				});
+			},
+			handleEntranceOutDetail(){
+				this.$u.api.entranceOutDetail({spaceId:this.orderID})
+				.then(res=>{
+					// this.$refs.uToast.show({
+					// 	title: res.msg,
+					// 	type: 'success',
+					// });
+					this.leaveDetail = res.data;
+					this.owelist = res.data.oweList;
+				
+					console.log('entranceOutDetail',res)
+				}).catch(err=>{
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'error',
+					});
+					console.log('entranceOutDetail ',err)
+				});
+				
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import  './owelist.scss'
+</style>

BIN
static/img/payway-qr.png


BIN
static/img/payway-scan.png


BIN
static/img/payway-xj.png