gjy 2 年 前
コミット
2bb145876d

+ 51 - 0
pages/goodSource/fk.vue

@@ -8,6 +8,13 @@
 			</view>
 		</view>
 		<u-line class="line"></u-line>
+		<view class="row1 flex flex-space-between">
+			<view>关联订单(选填)</view>
+			<view style='align-items: center;' class='flex'>
+				<view @click='selectorder'>{{dataDetails.orderNo?dataDetails.orderNo:'选择订单'}}></view>
+			</view>
+		</view>
+		<u-line class="line"></u-line>
 		<view class="row2">
 			<view class="title">投诉信息</view>
 			<u--textarea v-model="value1" placeholder="输入要反馈的内容,10-300字" count maxlength='300'></u--textarea>
@@ -15,6 +22,9 @@
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="submit">提交</view>
+		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
+		</u-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -32,17 +42,54 @@
 				value1: '',
 				fileList1: [],
 				dataDetails: {},
+				orderList:[],
+				isShow:false,
+				type:0
 			};
 		},
 		onLoad(options) {
 			this.get_camera_permission()
 			this.dataDetails = JSON.parse(options.val)
+			this.type=options.type
+			console.log(this.dataDetails)
 			this.imgList = []
 		},
+		onShow(){
+			uni.showLoading({
+				title: '加载中'
+			})
+			var commonId=''
+			if(this.type==1){
+				commonId=this.dataDetails.cargoCommonId
+			}else{
+				commonId=this.dataDetails.commonId
+			}
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
+				cargoCommonId: commonId,
+				commonId:this.userInfo.id
+			}).then(res => {
+				let that = this
+				uni.hideLoading()
+				this.orderList=[res.data]
+				// console.log(this.orderList)
+			})
+			.catch(res => {
+				uni.$u.toast(res.message);
+			});
+		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
 		methods: {
+			confirmorder(e){
+				console.log(e)
+				this.dataDetails.orderId=e.value[0].id
+				this.dataDetails.orderNo=e.value[0].orderNo
+				this.isShow=false
+			},
+			selectorder(){
+				this.isShow=true
+			},
 			async get_camera_permission() {
 				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
 				if(photol == false){
@@ -64,6 +111,7 @@
 				uni.showLoading({
 					title: '加载中'
 				})
+				console.log()
 				this.$request.baseRequest('post', '/feedbackReport/api/addInfo', {
 						initiator:this.firstAuthentication.driverName,
 						initiatorNumber:this.firstAuthentication.driverPhone,
@@ -71,12 +119,15 @@
 						passive: this.dataDetails.cargoOwnerName,
 						passiveNumber: this.dataDetails.cargoOwnerPhone,
 						passiveCommonId:this.dataDetails.commonId,
+						orderId:this.dataDetails.orderId,
+						orderNo:this.dataDetails.orderNo,
 						content: this.value1,
 						url: this.imgList.toString(),
 						flag: 1,
 						objectFlag:2
 					}).then(res => {
 						let that = this
+						this.type=0
 						uni.hideLoading()
 						this.$refs.uToast.show({
 							type: 'success',

+ 3 - 2
pages/goodSource/index.vue

@@ -701,11 +701,12 @@
 					that.firstAuthentication=uni.getStorageSync('firstAuthentication')
 					// console.log(that.firstAuthentication)
 					//司机是否认证身份
-					if (that.firstAuthentication.authenticationStatus == '已认证') {
+					// 保留uni.getStorageSync('firstAuthentication'),thisfirstAuthentication有缓存问题
+					if (uni.getStorageSync('firstAuthentication').authenticationStatus == '已认证') {
 						uni.$u.route('/pages/goodSource/shippingDetails', {
 							id: id,
 						});
-					} else if (that.firstAuthentication.authenticationStatus == '已过期') {
+					} else if (uni.getStorageSync('firstAuthentication').authenticationStatus == '已过期') {
 						that.$refs.uToast.show({
 							type: 'error',
 							message: "证件已过期,请上传新证件!",

+ 49 - 0
pages/goodSource/jb.vue

@@ -8,6 +8,13 @@
 			</view>
 		</view>
 		<u-line class="line"></u-line>
+		<view class="row1 flex flex-space-between">
+			<view>关联订单(选填)</view>
+			<view style='align-items: center;' class='flex'>
+				<view @click='selectorder'>{{dataDetails.orderNo?dataDetails.orderNo:'选择订单'}}></view>
+			</view>
+		</view>
+		<u-line class="line"></u-line>
 		<view class="row2">
 			<view class="title">举报信息</view>
 			<u--textarea v-model="value1" placeholder="输入要举报的内容,10-300字" count maxlength='300'></u--textarea>
@@ -15,6 +22,9 @@
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="submit">提交</view>
+		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
+		</u-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -32,6 +42,9 @@
 				value1: '',
 				fileList1: [],
 				dataDetails: {},
+				orderList:[],
+				isShow:false,
+				type:0
 			};
 		},
 		computed: {
@@ -40,10 +53,43 @@
 		onLoad(options) {
 			this.get_camera_permission()
 			this.dataDetails = JSON.parse(options.val)
+			this.type=options.type
 			console.log(this.dataDetails)
 			this.imgList = []
 		},
+		onShow(){
+			uni.showLoading({
+				title: '加载中'
+			})
+			var commonId=''
+			if(this.type==1){
+				commonId=this.dataDetails.cargoCommonId
+			}else{
+				commonId=this.dataDetails.commonId
+			}
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
+				cargoCommonId: commonId,
+				commonId:this.userInfo.id
+			}).then(res => {
+				let that = this
+				uni.hideLoading()
+				this.orderList=[res.data]
+				// console.log(this.orderList)
+			})
+			.catch(res => {
+				uni.$u.toast(res.message);
+			});
+		},
 		methods: {
+			confirmorder(e){
+				console.log(e)
+				this.dataDetails.orderId=e.value[0].id
+				this.dataDetails.orderNo=e.value[0].orderNo
+				this.isShow=false
+			},
+			selectorder(){
+				this.isShow=true
+			},
 			async get_camera_permission() {
 				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
 				if(photol == false){
@@ -72,12 +118,15 @@
 						passive: this.dataDetails.cargoOwnerName,
 						passiveNumber: this.dataDetails.cargoOwnerPhone,
 						passiveCommonId:this.dataDetails.commonId,
+						orderId:this.dataDetails.orderId,
+						orderNo:this.dataDetails.orderNo,
 						content: this.value1,
 						url: this.imgList.toString(),
 						flag: 2,
 						objectFlag:2
 					}).then(res => {
 						let that = this
+						this.type=0
 						uni.hideLoading()
 						this.$refs.uToast.show({
 							type: 'success',

+ 20 - 8
pages/mine/driverCertificationNext.vue

@@ -27,9 +27,9 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传驾驶证副页</view>
 				</view>
-				<view v-if="dataDetails.driverLicenseBackPage" @click.stop="uploadImg(1)"
+				<view v-if="dataDetails.driverLicenseBackPage" @click.stop="uploadImg(2)"
 					class="preview-card-img picture">
-					<view @click.stop="delCard(1)">
+					<view @click.stop="delCard(2)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
 					</view>
@@ -149,9 +149,9 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传从业资格证</view>
 				</view>
-				<view v-if="dataDetails.qualificationCertificate" @click.stop="uploadImg(1)"
+				<view v-if="dataDetails.qualificationCertificate" @click.stop="uploadImg(7)"
 					class="preview-card-img picture">
-					<view @click.stop="delCard(1)">
+					<view @click.stop="delCard(7)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
 					</view>
@@ -242,7 +242,7 @@
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
-			<u-button type="primary" @click="submit">提交</u-button>
+			<u-button type="primary" @click="btnBClick">提交</u-button>
 			<u-toast ref="uToast"></u-toast>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
@@ -408,10 +408,10 @@
 					var text=''
 					switch (this.ValidityPeriodType) {
 						case 3:
-							text='驾驶证已过期!'
+							text='从业资格证已过期!'
 							break
 						case 9:
-							text='从业资格证已过期!'
+							text='驾驶证已过期!'
 							break
 					}
 					if(this.ValidityPeriodType==3||this.ValidityPeriodType==9){
@@ -697,7 +697,7 @@
 					})
 					return true
 				}
-				if (!uni.$u.test.rangeLength(this.dataDetails.qualificationCertificateNumber,[12,19])) {
+				if (this.dataDetails.qualificationCertificateNumber.length!=19) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "从业资格证号输入错误!",
@@ -757,7 +757,12 @@
 				}
 				return false
 			},
+			btnBClick() {
+							// 此处用法为在js中调用,需要写uni.$u.throttle()
+				uni.$u.throttle(this.submit(), 500)
+			},
 			submit() {
+	
 				// 校验
 				if (this.validate()) return
 				// if(this.dataDetails.driverSex=='男'){
@@ -772,8 +777,13 @@
 					})
 					return
 				}
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
 				this.$request.baseRequest('post', '/driverInfo/api/addInfo', this.dataDetails).then(res => {
 						if(res.code==200){
+							uni.hideLoading()
 							this.$refs.uToast.show({
 								type: 'success',
 								message: "提交成功,待平台审核!",
@@ -785,10 +795,12 @@
 							})
 							// uni.$u.route('/pages/mine/index');
 						}else{
+							uni.hideLoading()
 							uni.$u.toast(res.message);
 						}
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},

+ 15 - 4
pages/mine/editDriverCertificationNext.vue

@@ -245,7 +245,7 @@
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
-			<u-button class="btn-color" @click="submit">提交</u-button>
+			<u-button class="btn-color" @click="btnBClick">提交</u-button>
 			<u-toast ref="uToast"></u-toast>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
@@ -413,10 +413,10 @@
 					var text=''
 					switch (this.ValidityPeriodType) {
 						case 3:
-							text='驾驶证已过期!'
+							text='从业资格证已过期!'
 							break
 						case 9:
-							text='从业资格证已过期!'
+							text='驾驶证已过期!'
 							break
 					}
 					if(this.ValidityPeriodType==3||this.ValidityPeriodType==9){
@@ -652,7 +652,7 @@
 					})
 					return true
 				}
-				if (uni.$u.test.rangeLength(this.dataDetails.qualificationCertificateNumber,[12,19])) {
+				if (this.dataDetails.qualificationCertificateNumber.length!=19) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "从业资格证号输入错误!",
@@ -748,6 +748,10 @@
 				delete this.dataDetails.updateDate
 
 			},
+			btnBClick() {
+							// 此处用法为在js中调用,需要写uni.$u.throttle()
+				uni.$u.throttle(this.submit(), 500)
+			},
 			submit() {
 				if (!this.consentStatus) {
 					uni.showToast({
@@ -760,8 +764,13 @@
 				// 校验
 				if (this.validate()) return
 				this.delSubmitObj()
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
 				this.$request.baseRequest('post', '/driverInfo/api/editInfo', this.dataDetails).then(res => {
 						if (res.code == 200) {
+							uni.hideLoading()
 							this.$refs.uToast.show({
 								type: 'success',
 								message: "提交成功,待平台审核!",
@@ -772,10 +781,12 @@
 								}
 							})
 						} else {
+							uni.hideLoading()
 							uni.$u.toast(res.message);
 						}
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},

+ 3 - 1
pages/mine/index.vue

@@ -236,6 +236,8 @@
 								this.statusVal = '身份认证审核中'
 							} else if (this.firstAuthentication.authenticationStatus == '未通过') {
 								this.statusVal = '身份认证未通过'
+							}  else if (this.firstAuthentication.authenticationStatus == '已驳回') {
+								this.statusVal = '已驳回'
 							} else if (this.firstAuthentication.authenticationStatus == '已过期') {
 								this.statusVal = '证件已过期'
 							}  else if (this.firstAuthentication.authenticationStatus == '未认证') {
@@ -288,7 +290,7 @@
 				if (!this.hasLogin) {
 					this.isShowAlert = true;
 				} else {
-					if (type == 1 && this.statusVal == '已认证' || type == 1 &&this.statusVal == '证件已过期' || type == 1 &&this.statusVal == '身份认证未通过') {
+					if (type == 1 && this.statusVal == '已认证' || type == 1 &&this.statusVal == '证件已过期' || type == 1 &&this.statusVal == '身份认证未通过'|| type == 1 &&this.statusVal == '已驳回') {
 						src = '/pages/mine/editDriverCertification'
 					}
 					if ((type == 2 || type == 3) && this.isFirstSH) {

+ 1 - 1
pages/mine/manageVehicles/addVehicle.vue

@@ -1032,7 +1032,7 @@
 					})
 					return true
 				}
-				if (!uni.$u.test.rangeLength(this.dataDetails.operationCertificateNumber,[0,12])) {
+				if (this.dataDetails.operationCertificateNumber.length!=12) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "道路运输证号输入错误!",

+ 7 - 0
pages/mine/manageVehicles/editVehicle.vue

@@ -1086,6 +1086,13 @@
 					})
 					return true
 				}
+				if (this.dataDetails.operationCertificateNumber.length!=12) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输证号输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 5 - 2
pages/order/cargoOwnerSee.vue

@@ -156,6 +156,7 @@
 			that = this
 			this.commonId=options.cargoCommonId
 			this.objectInfo = options
+			this.objectInfo.orderId=this.objectInfo.id
 			console.log(options)
 
 			this.getList()
@@ -258,11 +259,13 @@
 				console.log(e.value)
 				if (e.value == '投诉') {
 					uni.$u.route('/pages/goodSource/fk', {
-						val: JSON.stringify(this.objectInfo)
+						val: JSON.stringify(this.objectInfo),
+						type:1
 					});
 				} else {
 					uni.$u.route('/pages/goodSource/jb', {
-						val: JSON.stringify(this.objectInfo)
+						val: JSON.stringify(this.objectInfo),
+						type:1
 					});
 				}
 				this.show = false

+ 1 - 1
pages/order/index.vue

@@ -673,7 +673,7 @@
 	}
 	/deep/.u-popup__content{
 		border-radius: 10px;
-		padding:20px;
+		// padding:20px;
 	}
 	.fixed {
 		.title {

+ 1 - 1
pages/order/orderDetails.vue

@@ -763,7 +763,7 @@
 	}
 	/deep/.u-popup__content{
 		border-radius: 10px;
-		padding:20px;
+		// padding:20px;
 	}
 	/deep/.u-radio{
 		margin:40rpx 0;