gjy 2 年之前
父节点
当前提交
73e5f4bc8a
共有 4 个文件被更改,包括 49 次插入9 次删除
  1. 4 2
      pages/carSource/driverSee.vue
  2. 6 2
      pages/order/driverDetail.vue
  3. 38 4
      pages/order/fk.vue
  4. 1 1
      util/request.js

+ 4 - 2
pages/carSource/driverSee.vue

@@ -184,7 +184,7 @@
 		},
 		onShow(){
 			var that=this
-			
+			// this.upCallback({num:1,size:10})
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
@@ -247,8 +247,10 @@
 								res.data.hyDriverCarInfoList[i].guaCarLong=res.data.hyDriverCarInfoList[i].guaCarLong/1000
 								res.data.hyDriverCarInfoList[i].carNumber = res.data.hyDriverCarInfoList[i].carNumber.replace(res.data.hyDriverCarInfoList[i].carNumber.substring(2, 6),
 									"****")
-								res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
+									if(res.data.hyDriverCarInfoList[i].guaCarNumber){
+										res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
 								"****")
+									}
 							}
 							that.hyDriverCarInfoList=res.data.hyDriverCarInfoList
 						}

+ 6 - 2
pages/order/driverDetail.vue

@@ -177,7 +177,7 @@
 		},
 		onLoad(options) {
 			this.dataObj =JSON.parse(options.driver) 
-			// console.log(this.dataObj)
+			console.log(this.dataObj)
 			that = this
 			// this.getList()
 		},
@@ -204,7 +204,7 @@
 				});
 			},
 			confirmBtn(e) {
-				console.log(e.value)
+				console.log(this.driverList)
 				if (e.value == '投诉') {
 					uni.$u.route('/pages/order/fk', {
 						val: JSON.stringify(this.driverList)
@@ -238,6 +238,10 @@
 					}).then(res => {
 						console.log(res.data)
 						that.driverList=res.data
+						if(that.dataObj){
+							that.driverList.orderId=that.dataObj.id
+							that.driverList.orderNo=that.dataObj.orderNo
+						}
 						if(res.data.hyDriverCarInfoList){
 							for (var i = 0; i < res.data.hyDriverCarInfoList.length; i++) {
 								res.data.hyDriverCarInfoList[i].carApprovedWeight=res.data.hyDriverCarInfoList[i].carApprovedWeight/1000

+ 38 - 4
pages/order/fk.vue

@@ -7,6 +7,12 @@
 				<view>{{dataDetails.driverName}}</view>
 			</view>
 		</view>
+		<view class="row1 flex flex-space-between">
+			<view>关联订单(选填)</view>
+			<view style='align-items: center;' class='flex'>
+				<view @click='selectorder'>{{dataDetails.orderNo}}></view>
+			</view>
+		</view>
 		<u-line class="line"></u-line>
 		<view class="row2">
 			<view class="title">投诉信息</view>
@@ -15,6 +21,9 @@
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="submit">提交</view>
+		<u-picker :show="isShow" ref="uPicker" keyName="label" :columns="orderList" @confirm="confirmorder"
+			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
+		</u-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -24,14 +33,16 @@
 		mapState
 	} from 'vuex';
 	import uploadImage from '@/components/ossutil/uploadFile.js';
-	import permision from "@/js_sdk/wa-permission/permission.js"
+	import permision from "@/js_sdk/wa-permission/permission.js";
 	export default {
 		data() {
 			return {
 				imgList: [],
 				value1: '',
 				fileList1: [],
+				orderList:[],
 				dataDetails: {},
+				isShow:false,
 			};
 		},
 		computed: {
@@ -39,9 +50,32 @@
 		},
 		onLoad(options) {
 			this.dataDetails = JSON.parse(options.val)
+		console.log(11111,this.dataDetails)
 			this.imgList = []
 		},
+		onShow(){
+			uni.showLoading({
+				title: '加载中'
+			})
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder', {
+					commonId: this.dataDetails.id,
+					cargoCommonId:this.userInfo.id
+				}).then(res => {
+					let that = this
+					uni.hideLoading()
+					this.orderList=res.data
+				})
+				.catch(res => {
+					uni.$u.toast(res.message);
+				});
+		},
 		methods: {
+			confirmorder(e){
+				
+			},
+			selectorder(){
+				this.isShow=true
+			},
 			submit() {
 				if (!this.value1) {
 					that.$refs.uToast.show({
@@ -78,9 +112,9 @@
 							type: 'success',
 							message: "反馈成功",
 							complete() {
-								uni.$u.route('/pages/order/driverDetail',{
-									driver:JSON.stringify(that.dataDetails)
-								});
+								uni.navigateBack({
+									delta:1
+								})
 								
 							}
 						})

+ 1 - 1
util/request.js

@@ -29,7 +29,7 @@ const baseRequest = (method, url, data, header) => {
 			} else {
 				uni.request(baseDefaultOpts).then(
 					(res) => {
-						console.log(JSON.stringify(res[1].data))
+						// console.log(JSON.stringify(res[1].data))
 						// if(res[1].data.code == '200' || res[1].data.code == 200){
 						// 	// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
 						// 	resolve(res[1].data)