achao 2 anos atrás
pai
commit
40984d3720

+ 8 - 2
pinche/pages/index/index.vue

@@ -29,13 +29,19 @@
 							<view class="">
 								{{item.explain?item.explain:'无备注'}}
 							</view>
+							<view class="" v-if="item.carpoolingType=='车找人'">
+								剩余座位:{{item.remark1}}
+							</view>
 						</view>
 						<view class="">
 							{{item.departureTime}}
 						</view>
 					</view>
-					<view class="">
-
+					<view class="" v-if="item.carpoolingType=='人找车'">
+						人数:{{item.numberPeople}}
+					</view>
+					<view class="" v-if="item.carpoolingType=='人找车'">
+						价格:{{item.remark1}}
 					</view>
 					<view class="btn-row">
 						<view class="btn-yd" @tap="ydOrder(item)" v-if="item.carpoolingType=='车找人'">

+ 1 - 1
pinche/pages/index/yuding.vue

@@ -24,7 +24,7 @@
 					<u--input v-model="pincheMakeAppointment.phone" border="none" disabled></u--input>
 				</u-form-item> -->
 				<u-form-item label="拼车费用" prop="remark1" borderBottom ref="item1" v-if='showInfo!=1'>
-					<u--input v-model="pincheMakeAppointment.remark1" border="none" disabled disabledColor="#ffffff"
+					<u--input v-model="pincheMakeAppointment.price" border="none" disabled disabledColor="#ffffff"
 						placeholder="根据出发,到达地点计算价格"></u--input>
 				</u-form-item>
 				<u-form-item label="座位数量" prop="remark1" borderBottom ref="item1" v-if='showInfo==1'>

+ 41 - 1
pinche/pages/info/add.vue

@@ -64,7 +64,7 @@
 				</u-form-item>
 				<u-form-item v-if='showInfo!=1'>
 					<text
-						style="color: #fff;background:#19be6b;border-radius: 20rpx;padding:10rpx 20rpx;width: 100rpx;text-align: center;"
+						style="color: #fff;background:#19be6b;border-radius: 20rpx;padding:10rpx 20rpx;width: 120rpx;text-align: center;"
 						@click="jsPrcie()">计算价格</text>
 				</u-form-item>
 
@@ -325,6 +325,46 @@
 				this.showAlert = true
 			},
 			submit() {
+				if (!this.pincheCarSharing.route) {
+					uni.showToast({
+						mask: true,
+						title: '请选择路线',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.pincheCarSharing.carpoolingType) {
+					uni.showToast({
+						mask: true,
+						title: '请选择拼车类型',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.pincheCarSharing.departureTime) {
+					uni.showToast({
+						mask: true,
+						title: '请请选择出发时间',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.pincheCarSharing.startPlace) {
+					uni.showToast({
+						mask: true,
+						title: '请选择出发地点',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.pincheCarSharing.endPlace) {
+					uni.showToast({
+						mask: true,
+						title: '请选择到达地点',
+						icon: 'none'
+					})
+					return
+				}
 				this.$request.baseRequest('pincheCarSharingApp', 'add', {
 						pincheCarSharing: JSON.stringify(this.pincheCarSharing)
 					},

+ 9 - 3
pinche/pages/info/info.vue

@@ -29,7 +29,7 @@
 					</view>
 				</view>
 				<view class="row3" v-if="item.carpoolingType=='车找人'">
-					已预定座位:0 【剩余座位{{item.remark1}}】
+					剩余座位:【{{item.remark1}}】
 				</view>
 				<view class="row4" v-if="item.carpoolingType=='车找人'">
 					<view class="btn" @click="changeSit(item)">
@@ -54,7 +54,7 @@
 				<u-cell title="到达:" :value="selectItem.endPlace"></u-cell>
 				<u-cell title="手机:" :value="selectItem.phone"></u-cell>
 				<u-cell title="人数:" :value="selectItem.numberPeople"></u-cell>
-				<!-- <u-cell title="说明:" :value="selectItem.explain"></u-cell> -->
+				<u-cell title="说明:" :value="selectItem.explain"></u-cell>
 			</u-cell-group>
 		</u-popup>
 		<u-popup :show="showSit" @close="close1" @open="open1" mode="center" customStyle="width:80%;padding:20rpx"
@@ -97,6 +97,11 @@
 			// this.$refs.form1.setRules(this.rules)
 		},
 		onShow() {
+			this.$nextTick(function() {
+				this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页  
+				this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题  
+				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
+			});
 			// if (this.hasLogin || uni.getStorageSync("userInfo").username) {
 			// 	this.userInfo = uni.getStorageSync("userInfo")
 			// } else {
@@ -110,6 +115,7 @@
 		},
 		data() {
 			return {
+				canReset: false,
 				mescroll: null,
 				value: '',
 				showSit: false,
@@ -310,7 +316,7 @@
 			},
 			lookOrder(val) {
 				uni.navigateTo({
-					url: "/pages/info/lookOrder?id=" + val.id
+					url: "/pages/info/lookOrder?obj=" + JSON.stringify(val)
 				})
 			}
 		}

+ 73 - 16
pinche/pages/info/lookOrder.vue

@@ -1,56 +1,73 @@
 <template>
 	<view class="warp">
-		<view class="nav">
+		<!-- 	<view class="nav">
 			<view class="item" :class="index==1?'item-active':''" @click="clickNav(1)">
 				预定中
 			</view>
 			<view class="item" :class="index==2?'item-active':''" @click="clickNav(2)">
 				已取消
 			</view>
-		</view>
+		</view> -->
 		<view class="content1">
 			<view class="row1">
 				<view class="left">
-					路线:北京→定州,出发时间:2022-12-03 01:01
+					路线:{{dataObj.route}},出发时间:{{dataObj.departureTime}}
 				</view>
 				<view class="btn" @click="toMyFb">
 					查看我的发布
 				</view>
 			</view>
 			<view class="row2">
-				重要提示:请确认已经和预订乘客电话确认拼车,乘客预订列表只作为车主查看记录,方便出发前联系使用,具体以电话确认拼车为准,如电话确认不拼车就取消乘客的预订即可,确认拼车可要求乘客在线预付定金
+				重要提示:请确认已经和预订乘客电话确认拼车,乘客预订列表只作为车主查看记录,方便出发前联系使用,具体以电话确认拼车为准,如电话确认不拼车就取消乘客的预订即可。
 			</view>
 		</view>
 		<mescroll-body ref="mescrollRef" @up="upCallback">
 			<view class="content3 infoList" v-for="(item,index) in infoList">
 				<view class="row1">
 					<view class="left">
-						2022-12-03 01:01 (周六)
+						{{item.departureTime}}
+					</view>
+					<view class="right" v-if="item.status=='已接受'" style="color: #19be6b;">
+						{{item.status}}
+					</view>
+					<view class="right" v-if="item.status=='已拒绝'" style="color: red;">
+						{{item.status}}
+					</view>
+					<view class="right" v-if="item.status=='已预约'">
+						{{item.status}}
 					</view>
 				</view>
 				<view class="row2">
-					路线:北京→定州
+					路线:{{item.route}}
 				</view>
 				<view class="row3">
-					出发地
+					出发地:{{item.startPlace}}
 				</view>
 				<view class="row3">
-					到达地
+					到达地:{{item.endPlace}}
+				</view>
+				<view class="">
+					手机:{{item.phone}}
 				</view>
 				<view class="">
-					手机
+					人数:{{item.numberPeople}}
 				</view>
 				<view class="">
-					人数
+					价格:{{item.price}}
 				</view>
 				<view class="">
-					说明
+					<view class="">
+						说明:
+					</view>
+					<view class="">
+						{{item.explain?item.explain:'无说明'}}
+					</view>
 				</view>
 				<view class="row4">
-					<view class="btn">
+					<view class="btn" @click="submit(1,item.id)">
 						接受
 					</view>
-					<view class="btn">
+					<view class="btn" @click="submit(2,item.id)">
 						拒绝
 					</view>
 
@@ -58,6 +75,7 @@
 			</view>
 
 		</mescroll-body>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -93,16 +111,55 @@
 		data() {
 			return {
 				index: 1,
-				infoList: []
+				infoList: [],
+				dataObj: {}
 
 			}
 		},
-		onLoad() {},
+		onLoad(options) {
+			this.dataObj = JSON.parse(options.obj)
+			console.log(this.dataObj)
+		},
 		methods: {
+			submit(type, id) {
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				console.log(type)
+				let _status = ""
+				if (type == 1) {
+					_status = '已接受'
+				} else {
+					_status = '已拒绝'
+				}
+				this.$request.baseRequest('pincheMakeAppointmentApp', 'update', {
+					pincheMakeAppointment: JSON.stringify({
+						status: _status,
+						id: id
+					})
+				}, failres => {
+					console.log('res+++++', failres.errmsg)
+					this.$refs.uToast.show({
+						type: 'error',
+						message: failres.errmsg,
+					})
+					uni.hideLoading()
+				}).then(res => {
+					uni.hideLoading()
+					uni.showToast({
+						mask: true,
+						title: res.errmsg
+					})
+					this.mescroll.resetUpScroll();
+
+				})
+			},
 			upCallback(page) {
-				this.$request.baseRequest('admin.gubi.gubiTransaction', 'list', {
+				this.$request.baseRequest('pincheMakeAppointmentApp', 'list', {
 					pageNum: page.num,
 					pageSize: page.size,
+					remark2: this.dataObj.id
 				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({