zhongtianhaoyuan 2 years ago
parent
commit
f3a12f2b79
2 changed files with 36 additions and 7 deletions
  1. 31 5
      pages/order/confirmLoading.vue
  2. 5 2
      pages/order/orderDetails.vue

+ 31 - 5
pages/order/confirmLoading.vue

@@ -85,6 +85,13 @@
 					<view class="sx-style" @click.stop="getLngLat()">刷新</view>
 				</view>
 			</view>
+			<view class='row-between'>
+				<view class="">运输时长(小时)</view>
+				<view class="flex align-center">
+					<u--input placeholder="请输入运输时长" border="none" type="digit" v-model="detailData.transportationDuration" inputAlign='right'
+						clearable></u--input>
+				</view>
+			</view>
 			<view class='s-flex'>
 				<view class="" style="margin:20rpx 0;">上传装车照片</view>
 				<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
@@ -352,6 +359,9 @@
 					if (res.code == 200) {
 
 						this.detailData = res.data
+						if(res.data.hyCarrierInfo && res.data.hyCarrierInfo.transportationDuration){
+							this.detailData.transportationDuration = res.data.hyCarrierInfo.transportationDuration
+						}
 						// #ifdef APP-PLUS
 						this.getLngLat();
 						// #endif
@@ -373,6 +383,7 @@
 								console.log(this.fileList1)
 								this.detailData.carNo = res.data.carNo
 								this.detailData.loadingDate = res.data.loadingDate
+							
 								if (res.data.loadingDate) {
 									this.detailData.loadingDate1 = res.data.loadingDate.split(' ')[0]
 								}
@@ -687,17 +698,31 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.detailData.loadingCity)) {
+				// if (uni.$u.test.isEmpty(this.detailData.loadingCity)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "定位不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.detailData.loadingArea)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "定位不能为空!",
+				// 	})
+				// 	return true
+				// }
+				if (uni.$u.test.isEmpty(this.detailData.transportationDuration)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "定位不能为空!",
+						message: "运输时长不能为空!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.detailData.loadingArea)) {
+				if (this.detailData.transportationDuration < 0 || this.detailData.transportationDuration >1000) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "定位不能为空!",
+						message: "运输时长输入错误!",
 					})
 					return true
 				}
@@ -744,7 +769,8 @@
 					loadingCity: this.detailData.loadingCity,
 					loadingLongitude: this.detailData.loadingLongitude,
 					loadingLatitude: this.detailData.loadingLatitude,
-					id: this.detailData.hyCarrierInfo.id
+					id: this.detailData.hyCarrierInfo.id,
+					transportationDuration:this.detailData.transportationDuration
 				}
 
 				// console.log("查看id--------",this.detailData.hyCarrierInfo.id)

+ 5 - 2
pages/order/orderDetails.vue

@@ -156,6 +156,10 @@
 				<view class=" gray">装车时间</view>
 				<view class="">{{carrierInfo.loadingDate}}</view>
 			</view>
+			<view class='row-between'>
+				<view class=" gray">运输时长</view>
+				<view class="">{{carrierInfo.transportationDuration }} 小时</view>
+			</view>
 			<view class='row-between'>
 				<view class=" gray">装车照片</view>
 				<view class="flex">
@@ -553,9 +557,8 @@
 						if(res.code==200){
 							this.dataObj = res.data
 							if(res.data.hyCarrierInfo){
-								
+								this.carrierInfo = res.data.hyCarrierInfo
 							}
-							this.carrierInfo = res.data.hyCarrierInfo
 							this.freightInfo =  res.data.freightInfo
 							if(this.carrierInfo.loadingImg&&this.carrierInfo.loadingImg.length>0){
 								this.zcPhoneList = this.carrierInfo.loadingImg.split(',')