4 Commitit 0ef247325f ... 20dd475ad3

Tekijä SHA1 Viesti Päivämäärä
  mym 20dd475ad3 车辆服务 1 vuosi sitten
  mym e8cd220213 Merge branch 'master' of http://git.aseanbusiness.cn/qzyReal/market-app-ui 1 vuosi sitten
  mym a53ca953fb Merge branch 'master' of http://git.aseanbusiness.cn/qzyReal/market-app-ui 1 vuosi sitten
  mym f134d078a3 车辆绑定 1 vuosi sitten

+ 9 - 0
pages.json

@@ -320,6 +320,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/market/one/car/car",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "叫车服务",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		"color": "#7A7E83",

+ 1 - 1
pages/index/index.vue

@@ -89,7 +89,7 @@ export default {
 					});
 				}
 			});
-			console.log(this.menuList);
+			// console.log(this.menuList);
 		},
 		getNewsList() {
 			this.http.request({

+ 1 - 1
pages/market/one/leader/order.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="goodsList">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">{{ item.enterpriseName }}]</view>
+				<view class="title">{{ item.enterpriseName }}</view>
 				<view class="state" v-if="item.enterpriseConfirm == 0">
 					<text class="icon">&#xe830;</text>
 					<text>商家未确认</text>

+ 178 - 87
pages/market/one/merchant/order/list.vue

@@ -20,9 +20,9 @@
 				</view>
 				<image src="../../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
 				<view class="con">
-					<view class="productName omit">{{item.goodsNames}}</view>
+					<view class="productName omit">{{ item.goodsNames }}</view>
 					<view class="desc omit">
-						<text>{{item.totalWeight}}吨</text>
+						<text>{{ item.totalWeight }}{{ item.goodsUnit }}</text>
 						<text>{{ item.tradeAreaName }}</text>
 					</view>
 					<view class="price">¥ {{ item.totalPrice }}</view>
@@ -31,106 +31,197 @@
 				<view class="op">
 					<view class="date">2022-12-12:12:12</view>
 					<template v-if="item.enterpriseConfirm == 0">
-						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, item.goodsId, 2, '确认拒绝?')">取消订单</view>
+						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, item.goodsId, 2, '确认拒绝?')">拒绝订单</view>
 						<view class="an" style="color: #4581fb" @click.stop="confirm(item.id, item.goodsId, 1, '确认接单?')">确认订单</view>
 					</template>
+					<template v-if="item.enterpriseConfirm == 1">
+						<view class="an" style="color: #13ce66" @click.stop="showPop(item)">物流车辆</view>
+					</template>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
 			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+			<view>
+				<u-popup :show="show" @close="close">
+					<view class="pop">
+						<view class="search">
+							<u-search placeholder="输入车辆名称" v-model="param.vehiclePlate" bgColor="white"
+								@search="getByVehiclePlate()" :showAction="true"
+								@clear="getByVehiclePlate()"></u-search>
+							<view class="clear"></view>
+						</view>
+						<scroll-view class="goodsList" scroll-y="true" style="height: 450rpx; width: 97%;"
+							:show-scrollbar="true">
+							<view class="item" v-for="(item, index) in vehiceList" :key="index" style="height: 80rpx;">
+								<view class="con">
+									<view class="productName omit">{{ item.vehiclePlate }}</view>
+									<view class="desc omit">{{item.vehicleModel}}</view>
+								</view>
+								<view><button class="btn" @click="vehicleClick(item)">确认绑定</button> </view>
+								<view class="clear"></view>
+							</view>
+							<view class="loading" v-if="loadMore"><u-loadmore
+									:status="loadMore ? 'loading' : 'nomore'" /></view>
+							<u-empty v-if="!loadMore && vehiceList.length == 0"></u-empty>
+						</scroll-view>
+					</view>
+				</u-popup>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			tab: [
-				{ name: '全部', enterpriseConfirm: '', isOrders: ''},
-				{ name: '待确认', enterpriseConfirm: 0, isOrders: 1},
-				{ name: '已确认', enterpriseConfirm: 1, isOrders: 1},
-				{ name: '已拒绝', enterpriseConfirm: 2 ,isOrders: 0}
-			],
-			param: { pageNo: 1, pageSize: 10},
-			list: [],
-			loadMore: true
-		};
-	},
-	onLoad() {
-		this.getData();
-	},
-	methods: {
-		getData() {
-			this.http.request({
-				url: '/level-one-server/app/TbOrder/getList',
-				loading: 'false',
-				data: this.param,
-				success: res => {
-					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
-					if(res.data.data){
-						this.list.push(...res.data.data);
-					}
-				}
-			});
-		},
-		//点击tab切换
-		click(e) {
-			this.param.enterpriseConfirm = e.enterpriseConfirm;
-			this.param.isOrders = e.isOrders;
-			this.refresh();
+	export default {
+		data() {
+			return {
+				tab: [
+					{ name: '全部', enterpriseConfirm: '', isOrders: ''},
+					{ name: '待确认', enterpriseConfirm: 0, isOrders: 1},
+					{ name: '已确认', enterpriseConfirm: 1, isOrders: 1},
+					{ name: '已拒绝', enterpriseConfirm: 2 ,isOrders: 0}
+				],
+				param: { pageNo: 1, pageSize: 10},
+				list: [],
+				loadMore: true,
+				show: false,
+				vehiceList: [],
+				vehice: {},
+			};
 		},
-		detail(item) {
-			uni.navigateTo({ url: '/pages/market/one/merchant/order/detail?id=' + item.id });
-		},
-		//刷新数据
-		refresh() {
-			this.loadMore = true;
-			this.param.pageNo = 1;
-			this.list = [];
+		onLoad() {
 			this.getData();
-		}, 
-		// 商家确认
-		confirm(id, goodsId, status, content) {
-			//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
-			uni.showModal({
-				title: '提示',
-				content: content,
-				success: res => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/level-one-server/app/TbOrder/updateEnterpriseConfirm',
-							data: { id: id, goodsId: goodsId, enterpriseConfirm: status },
-							method: 'POST',
-							success: resp => {
-								uni.showToast({ title: '操作成功' });
-								this.refresh();
-							}
-						});
+			this.getByVehiclePlate()
+		},
+		methods: {
+			getData() {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/getList',
+					loading: 'false',
+					data: this.param,
+					success: res => {
+						this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+						if (res.data.data) {
+							this.list.push(...res.data.data);
+						}
 					}
-				}
-			});
-		}
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		setTimeout(() => {
-			this.refresh();
-			uni.stopPullDownRefresh();
-		}, 1000);
-	},
-	//上拉加载
-	onReachBottom() {
-		if (this.loadMore) {
-			this.param.pageNo++;
-			this.getData();
+				});
+			},
+			// 商家确认
+			confirm(id, goodsId, status, content) {
+				//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
+				uni.showModal({
+					title: '提示',
+					content: content,
+					success: res => {
+						if (res.confirm) {
+							this.http.request({
+								url: '/level-one-server/app/TbOrder/updateEnterpriseConfirm',
+								data: { id: id, goodsId: goodsId, enterpriseConfirm: status },
+								method: 'POST',
+								success: resp => {
+									uni.showToast({ title: '操作成功' });
+									this.refresh();
+								}
+							});
+						}
+					}
+				});
+			},
+			//点击tab切换
+			click(e) {
+				this.param.enterpriseConfirm = e.enterpriseConfirm;
+				this.param.isOrders = e.isOrders;
+				this.refresh();
+			},
+			detail(item) {
+				uni.navigateTo({ url: '/pages/market/one/merchant/order/detail?id=' + item.id });
+			},
+			//刷新数据
+			refresh() {
+				this.loadMore = true;
+				this.param.pageNo = 1;
+				this.list = [];
+				this.getData();
+			},
+			// 车牌查询 
+			getByVehiclePlate() {
+				this.vehiceList = []
+				this.param.vehiclePlate = ''
+				this.http.request({
+					url: '/transport-server/app/TbVehicle/getByVehiclePlate',
+					loading: 'false',
+					data: this.param,
+					success: res => {
+						if (res.data.data) {
+							this.vehiceList.push(...res.data.data);
+						}
+					}
+				});
+			},
+			// 弹窗显示司机信息
+			showPop(item) {
+				this.vehice.tradeAreaId = item.tradeAreaId
+				this.vehice.tradeAreaName = item.tradeAreaName
+				this.vehice.enterpriseId = item.enterpriseId
+				this.vehice.orderId = item.id
+				this.getByVehiclePlate()
+				this.show = !this.show
+			},
+			close() {
+			        this.show = false
+			        // console.log('close');
+			},
+			// 车辆绑定,通知司机
+			vehicleClick(item) {
+				this.vehice.driverId = item.driverId
+				this.vehice.vehicleId = item.id
+				this.http.request({
+					url: '/transport-server/app/TbVehicle/informDriver',
+					loading: 'false',
+					method: 'POST',
+					contentType: 'application/json;charset=UTF-8',
+					data: this.vehice,
+					success: res => {
+							uni.showToast({ title: '稍等片刻,司机马上就来' })
+					}
+				});
+				this.show = false
+			},
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			setTimeout(() => {
+				this.refresh();
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		//上拉加载
+		onReachBottom() {
+			if (this.loadMore) {
+				this.param.pageNo++;
+				this.getData();
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background-color: $pg;
-}
-</style>
+	page {
+		background-color: $pg;
+	}
+
+	.pop {
+		padding: 30px;
+		height: 300px;
+		background-color: $pg;
+	}
+
+	.btn {
+		height: 30px;
+		margin: 8px 0px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 4 - 4
pages/personal/personal.vue

@@ -99,12 +99,12 @@
 					<text class="title">常见问题</text>
 					<text class="icon arrow">&#xe8f2;</text>
 				</view>
-				<view class="s_item" @click="show = true">
+				<view class="s_item" @click="go('/pages/login/userAgreement?id=1')">
 					<text class="icon ic">&#xe662;</text>
 					<text class="title">用户协议</text>
 					<text class="icon arrow">&#xe8f2;</text>
 				</view>
-				<view class="s_item" @click="show = true">
+				<view class="s_item" @click="go('/pages/login/userAgreement?id=2')">
 					<text class="icon ic">&#xe643;</text>
 					<text class="title">隐私协议</text>
 					<text class="icon arrow">&#xe8f2;</text>
@@ -141,11 +141,11 @@ export default {
 				uni.navigateTo({ url: 'user' });
 			}
 			//外籍商户
-			if (this.user.userType == 3) {
+			if (this.user.userType == 5) {
 				uni.navigateTo({ url: '/pages/market/one/merchant/order/list' });
 			}
 			//收购商
-			if (this.user.userType == 5) {
+			if (this.user.userType == 3) {
 				uni.navigateTo({ url: '/pages/market/two/purchaser/order/list' });
 			}
 		},