mym 1 anno fa
parent
commit
e73b4cd482

+ 1 - 1
pages/index/index.vue

@@ -91,7 +91,7 @@ export default {
 		getMenu() {
 			let menu = uni.getStorageSync('menu');
 			this.http.request({
-				url: '/sp-admin/AppMenu/getList',
+				url: '/sp-admin/app/AppMenu/getList',
 				success: res => {
 					let data = res.data.data;
 					menu.map((item2, index1) => {

+ 2 - 2
pages/market/one/car/car.vue

@@ -104,7 +104,7 @@
 								  carRecordId: item.id,
 								  levelOneOrderId: item.orderId,
 								  orderNo: 0,
-								  loadingAddress: "",
+								  loadingAddress: item.loadingAddress,
 								  unloadingAddress: "",
 								  comment: "",
 								  tradeAreaId: item.tradeAreaId,
@@ -113,7 +113,7 @@
 								  driverName: user.name,
 								  driverPhone: user.phone,
 								  vehicleId: item.vehicleId,
-								  vehicleName: 0,
+								  vehicleName: item.vehicleModel,
 								  vehicleType: item.vehicleType
 								}
 								this.http.request({

+ 9 - 15
pages/market/one/merchant/order/list.vue

@@ -43,6 +43,9 @@
 					<template v-if="item.enterpriseConfirm == 1">
 						<view class="an" style="color: #13ce66" @click.stop="showPop(item)">物流车辆</view>
 					</template>
+					<template v-if="item.enterpriseConfirm == 4">
+						<view class="an" style="color: #4581fb">物流信息</view>
+					</template>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -72,6 +75,10 @@
 		},
 		onLoad() {
 			this.getData();
+			uni.$on("refreshPage", res => {
+				console.log("zzzzz");
+				this.refresh();
+			})
 		},
 		methods: {
 			getData() {
@@ -87,6 +94,8 @@
 						this.list.map(item => {
 							if(item.callCarStatus == 1){
 								item.enterpriseConfirm = 3
+							} else if(item.callCarStatus == 2){
+								item.enterpriseConfirm = 4
 							}
 						})
 					}
@@ -148,21 +157,6 @@
 				this.show = false
 				this.refresh()
 			},
-			// 通知司机
-			informDriver() {
-				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: '稍等片刻,司机马上就来'
-						})
-					}
-				});
-			},
 		},
 		//下拉刷新
 		onPullDownRefresh() {

+ 32 - 8
pages/market/one/merchant/order/vehice.vue

@@ -38,17 +38,24 @@
 		},
 		onLoad(e) {
 			this.getByVehiclePlate()
-			console.log(e)
 			if(e){
-				this.vehice.tradeAreaId = item.tradeAreaId
-				this.vehice.tradeAreaName = item.tradeAreaName
-				this.vehice.enterpriseId = item.enterpriseId
-				this.vehice.orderId = item.id
+				let v = JSON.parse(decodeURIComponent(e.item)) 
+				this.vehice.tradeAreaId = v.tradeAreaId
+				this.vehice.tradeAreaName = v.tradeAreaName
+				this.vehice.enterpriseId = v.enterpriseId
+				this.vehice.orderId = v.id
 			}
-			uni.$on('one-address', function(res) {
-				this.address = res
+			uni.$on('one-address', res => {
+				this.vehice.loadingAddress = res.address;
+				this.informDriver()
 			})
-			this.informDriver()
+			console.log(this.vehice)
+			// console.log(e)
+			// console.log(this.address)
+			// if(this.address.address) {
+			// 	this.vehice.address = this.address.address
+			// 	this.informDriver()
+			// }
 		},
 		methods: {
 			// 车牌查询 
@@ -76,6 +83,23 @@
 					url: '/pages/market/one/merchant/address/address'
 				})
 			},
+			// 通知司机
+			informDriver() {
+				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: '稍等片刻,司机马上就来'
+						})
+						uni.$emit("refreshPage")
+						uni.navigateBack();
+					}
+				});
+			},
 		}
 	}
 </script>