浏览代码

Merge branch 'master' of http://47.100.3.209:3000/gongdecai/wangluohuoyun-huozhuapp

zhongtianhaoyuan 2 年之前
父节点
当前提交
95b125ac10
共有 4 个文件被更改,包括 194 次插入149 次删除
  1. 16 0
      pages/mine/company/addcompany.vue
  2. 173 147
      pages/mine/company/editcompany.vue
  3. 3 1
      pages/order/addEvaluation.vue
  4. 2 1
      pages/order/index.vue

+ 16 - 0
pages/mine/company/addcompany.vue

@@ -395,6 +395,22 @@
 			
 			
 				this.isShowBank = true
 				this.isShowBank = true
 			},
 			},
+			manualInput() {
+				if (this.isShowManualInput) {
+					if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请填写卡号!",
+						})
+						return true
+					}
+					this.isShowBank = true
+			
+				} else {
+					this.isShowBank = false
+				}
+				this.isShowManualInput = !this.isShowManualInput
+			},
 			confirmBank(e) {
 			confirmBank(e) {
 				console.log(e)
 				console.log(e)
 				this.dataDetails.bankDepositBranch = e.value[0]
 				this.dataDetails.bankDepositBranch = e.value[0]

+ 173 - 147
pages/mine/company/editcompany.vue

@@ -23,8 +23,7 @@
 			</view>
 			</view>
 			<view class="flex row">
 			<view class="flex row">
 				<view class="left-text">营业期限截止日期</view>
 				<view class="left-text">营业期限截止日期</view>
-				<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-					@click="selectData(0)">
+				<view style='font-size:14px;width:50%;' class='flex flex-space-between' @click="selectData(0)">
 					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
 					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
 						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
 					</view>
 					</view>
@@ -45,8 +44,8 @@
 			<view class="flex border-bottom mt20 align-center">
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">企业名称</view>
 				<view class="left">企业名称</view>
 				<view class="flex right">
 				<view class="flex right">
-					<u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='left' border="none" v-model="dataDetails.companyName"
-						@blur='companyNameBlur'>
+					<u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='left' border="none"
+						v-model="dataDetails.companyName" @blur='companyNameBlur'>
 					</u--input>
 					</u--input>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -67,41 +66,38 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="title">上传身份证人像面</view>
 			<view class="title">上传身份证人像面</view>
-				<view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传身份证人像面</view>
-				</view>
-				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)"
-					class="preview-card-img picture">
-					<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
-				</view>
-				<view class="title">上传身份证国徽面</view>
-				<view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传身份证国徽面</view>
-				</view>
-				<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)"
-					class="preview-card-img picture">
-					<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
-				</view>
-				<view class="flex border-bottom mt20 align-center">
-					<view class="left">身份证号</view>
-					<view class="flex right">
-						<u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='left' border="none"
-							v-model="dataDetails.cardNumber">
-						</u--input>
-					</view>
+			<view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传身份证人像面</view>
+			</view>
+			<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
+				<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
+			</view>
+			<view class="title">上传身份证国徽面</view>
+			<view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传身份证国徽面</view>
+			</view>
+			<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
+				<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">身份证号</view>
+				<view class="flex right">
+					<u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='left' border="none"
+						v-model="dataDetails.cardNumber">
+					</u--input>
 				</view>
 				</view>
+			</view>
 			<view class="flex row">
 			<view class="flex row">
-				<view class="left" >身份证有效期</view>
-				<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-					@click="selectData(1)">
+				<view class="left">身份证有效期</view>
+				<view style='font-size:14px;width:50%;' class='flex flex-space-between' @click="selectData(1)">
 					<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
 					<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
 					</view>
 					</view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
 					<view>
 					<view>
-					
+
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -116,7 +112,8 @@
 			<view class="flex row border-bottom mt20">
 			<view class="flex row border-bottom mt20">
 				<view class="left">对公账户</view>
 				<view class="left">对公账户</view>
 				<view class="flex">
 				<view class="flex">
-					<u--input disabled placeholder="户名与企业名称一致" inputAlign='left' border="none" v-model="dataDetails.corporateAccount">
+					<u--input disabled placeholder="户名与企业名称一致" inputAlign='left' border="none"
+						v-model="dataDetails.corporateAccount">
 					</u--input>
 					</u--input>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -127,7 +124,8 @@
 					</u--input>
 					</u--input>
 				</view>
 				</view>
 				<view class="" @click="uploadImg(5)">
 				<view class="" @click="uploadImg(5)">
-					<image src="../../../static/images/xiangji-2.png" mode="" style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
+					<image src="../../../static/images/xiangji-2.png" mode=""
+						style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="flex row border-bottom mt20">
 			<view class="flex row border-bottom mt20">
@@ -151,7 +149,7 @@
 					</view>
 					</view>
 					<view @click="manualInput" class="type">手动输入</view>
 					<view @click="manualInput" class="type">手动输入</view>
 				</view>
 				</view>
-			
+
 			</view>
 			</view>
 			<!-- 	<view class="flex mt20 align-center">
 			<!-- 	<view class="flex mt20 align-center">
 				<view class="left">注册实缴金额</view>
 				<view class="left">注册实缴金额</view>
@@ -288,11 +286,11 @@
 				consentStatus: false,
 				consentStatus: false,
 				ValidityPeriodType: '',
 				ValidityPeriodType: '',
 				value: false,
 				value: false,
-				columns:[],
+				columns: [],
 				radioCustomStyle: {
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 					margin: '0 0 0 20rpx'
 				},
 				},
-				isShowBank:false,
+				isShowBank: false,
 				radiolist1: [{
 				radiolist1: [{
 						name: '自有',
 						name: '自有',
 						disabled: false
 						disabled: false
@@ -320,7 +318,7 @@
 					legalPersonName: ''
 					legalPersonName: ''
 
 
 				},
 				},
-				dataType:""
+				dataType: ""
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
@@ -348,12 +346,12 @@
 		},
 		},
 		methods: {
 		methods: {
 			async get_camera_permission() {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 					uni.showModal({
 						title: '提示',
 						title: '提示',
 						content: '您已经关闭相机权限,去设置',
 						content: '您已经关闭相机权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
 								permision.gotoAppPermissionSetting()
 								// plus.runtime.openURL("app-settings:");
 								// plus.runtime.openURL("app-settings:");
@@ -361,8 +359,24 @@
 								console.log('用户点击取消');
 								console.log('用户点击取消');
 							}
 							}
 						}
 						}
-					});	
+					});
+				}
+			},
+			manualInput() {
+				if (this.isShowManualInput) {
+					if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请填写卡号!",
+						})
+						return true
+					}
+					this.isShowBank = true
+			
+				} else {
+					this.isShowBank = false
 				}
 				}
+				this.isShowManualInput = !this.isShowManualInput
 			},
 			},
 			selectData(num) {
 			selectData(num) {
 				this.dataType = num
 				this.dataType = num
@@ -380,7 +394,7 @@
 					})
 					})
 					return true
 					return true
 				}
 				}
-			
+
 				this.isShowBank = true
 				this.isShowBank = true
 			},
 			},
 			confirmBank(e) {
 			confirmBank(e) {
@@ -572,9 +586,9 @@
 				// 	return true
 				// 	return true
 				// }
 				// }
 			},
 			},
-			companyNamechange(e){
+			companyNamechange(e) {
 				console.log(e)
 				console.log(e)
-				this.dataDetails.corporateAccount=e
+				this.dataDetails.corporateAccount = e
 			},
 			},
 			submit() {
 			submit() {
 				if (this.validate()) return
 				if (this.validate()) return
@@ -594,7 +608,10 @@
 				this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
 				this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
 						uni.hideLoading()
 						uni.hideLoading()
 						uni.$u.toast('提交成功')
 						uni.$u.toast('提交成功')
-						this.goDetailPage('/pages/mine/company/index')
+						uni.navigateBack({
+							delta: 1
+						})
+						// this.goDetailPage('/pages/mine/company/index')
 					})
 					})
 					.catch(res => {
 					.catch(res => {
 						uni.hideLoading()
 						uni.hideLoading()
@@ -654,117 +671,120 @@
 			imgTypeSelect(val) {
 			imgTypeSelect(val) {
 				var _this = this
 				var _this = this
 				// if (val.name == '相册') {
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: ,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {debugger
-									// 上传成功回调函数
-									switch (_this.uploadType) {
-										
-										
-										// 身份正面
-										case 1:
-											_this.dataDetails.businessLicenseAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/cargoOwnerInfo/api/licenseShibie', {
-														licenseImg: result,
-													}).then(res => {
-													if (res.code == '200') {
-														if(res.data){
-															if (res.data.validPeriod == '29991231') {
-																_this.dataDetails.businessTermDate = '长期'
-															}
-															_this.dataDetails.unifiedSocialCreditCode = res
-																.data.regNum
-															_this.dataDetails.legalPersonName = res.data
-																.licensePerson
-															_this.dataDetails.companyName = res.data
-																.licenseName
-															_this.dataDetails.corporateAccount=_this.dataDetails.companyName
-															console.log(res)
-															_this.$forceUpdate()
-														}else{
-															uni.$u.toast('请上传营业执照');
+				uni.chooseImage({
+					count: 1,
+					// sourceType: ,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								debugger
+								// 上传成功回调函数
+								switch (_this.uploadType) {
+
+
+									// 身份正面
+									case 1:
+										_this.dataDetails.businessLicenseAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/cargoOwnerInfo/api/licenseShibie', {
+													licenseImg: result,
+												}).then(res => {
+												if (res.code == '200') {
+													if (res.data) {
+														if (res.data.validPeriod == '29991231') {
+															_this.dataDetails.businessTermDate = '长期'
 														}
 														}
+														_this.dataDetails.unifiedSocialCreditCode = res
+															.data.regNum
+														_this.dataDetails.legalPersonName = res.data
+															.licensePerson
+														_this.dataDetails.companyName = res.data
+															.licenseName
+														_this.dataDetails.corporateAccount = _this
+															.dataDetails.companyName
+														console.log(res)
+														_this.$forceUpdate()
+													} else {
+														uni.$u.toast('请上传营业执照');
 													}
 													}
-			
-												})
-												.catch(res => {
-													console.log(res)
-													uni.$u.toast(res.message);
-												});
-											console.log(_this.dataDetails.businessLicenseAddressUrl)
-											break
-											// 身份反面
-										case 2:
-											_this.dataDetails.cardAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get','/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
-													_this.dataDetails.cardNumber = res.data.recPersonNo
-													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											_this.$forceUpdate()
-											break
-										case 3:
+												}
+
+											})
+											.catch(res => {
+												console.log(res)
+												uni.$u.toast(res.message);
+											});
+										console.log(_this.dataDetails.businessLicenseAddressUrl)
+										break
+										// 身份反面
+									case 2:
+										_this.dataDetails.cardAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get', '/driverInfo/personShibie', {
+												personImg: result,
+												flag: 1
+											}).then(res => {
+												_this.dataDetails.cardNumber = res.data.recPersonNo
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										_this.$forceUpdate()
+										break
+									case 3:
 										_this.dataDetails.cardBackAddressUrl = result
 										_this.dataDetails.cardBackAddressUrl = result
 										// 识别
 										// 识别
 										_this.$request.baseRequest('get',
 										_this.$request.baseRequest('get',
 												'/driverInfo/personShibie', {
 												'/driverInfo/personShibie', {
 													personImg: result,
 													personImg: result,
-													flag:2
+													flag: 2
 												}).then(res => {
 												}).then(res => {
-													if(res.data.idCardValidity){
-														let date = res.data.idCardValidity.split("-")[1]
-													    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
-													}
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													_this.dataDetails.cardValidityDate = date.replace(
+														'.', '-').replace('.', '-')
+												}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										_this.$forceUpdate()
+										break;
+									case 5:
+										_this.$request.baseRequest('get',
+												'/driverInfo/bankShibie', {
+													bankImg: result,
+												}).then(res => {
+												console.log(res)
+												_this.dataDetails.payeeAddressUrl = result
+												if (res.data.bankNo) {
+													_this.dataDetails.bankCard = res.data.bankNo
+												}
+												if (res.data.bankName) {
+													_this.dataDetails.bankDeposit = res.data.bankName
+												}
+
+												// 开户支行LIst
+												if (res.data.bankNameZhihang) {
+													_this.columns.push(res.data
+														.bankNameZhihang)
+
+												}
 												_this.$forceUpdate()
 												_this.$forceUpdate()
 											})
 											})
 											.catch(res => {
 											.catch(res => {
 												uni.$u.toast(res.message);
 												uni.$u.toast(res.message);
 											});
 											});
-											_this.$forceUpdate()
-											break;
-											case 5:
-											  _this.$request.baseRequest('get',
-											  		'/driverInfo/bankShibie', {
-											  			bankImg: result,
-											  		}).then(res => {
-											  		console.log(res)
-											  		_this.dataDetails.payeeAddressUrl = result
-											  		if (res.data.bankNo) {
-											  			_this.dataDetails.bankCard = res.data.bankNo
-											  		}
-											  		if (res.data.bankName) {
-											  			_this.dataDetails.bankDeposit = res.data.bankName
-											  		}
-											  
-											  		// 开户支行LIst
-											  		if (res.data.bankNameZhihang) {
-											  			_this.columns.push(res.data
-											  				.bankNameZhihang)
-											  
-											  		}
-											  		_this.$forceUpdate()
-											  	})
-											  	.catch(res => {
-											  		uni.$u.toast(res.message);
-											  	});
-											break;
-									}
+										break;
 								}
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 				// } else {
 				// } else {
 				// 	uni.chooseImage({
 				// 	uni.chooseImage({
 				// 		count: 1,
 				// 		count: 1,
@@ -796,7 +816,7 @@
 				// 										console.log(res)
 				// 										console.log(res)
 				// 										_this.$forceUpdate()
 				// 										_this.$forceUpdate()
 				// 									}
 				// 									}
-			
+
 				// 								})
 				// 								})
 				// 								.catch(res => {
 				// 								.catch(res => {
 				// 									uni.$u.toast(res.message);
 				// 									uni.$u.toast(res.message);
@@ -831,7 +851,7 @@
 				this.ValidityPeriodType = type
 				this.ValidityPeriodType = type
 				this.isShowcardValidity = true
 				this.isShowcardValidity = true
 			},
 			},
-		
+
 			changeHandler(e) {
 			changeHandler(e) {
 				const {
 				const {
 					columnIndex,
 					columnIndex,
@@ -880,6 +900,7 @@
 		padding: 20rpx 30rpx;
 		padding: 20rpx 30rpx;
 		border-radius: 5px;
 		border-radius: 5px;
 		margin: 20rpx;
 		margin: 20rpx;
+
 		.left-text {
 		.left-text {
 			// background: red;
 			// background: red;
 			width: 50%;
 			width: 50%;
@@ -888,6 +909,7 @@
 			align-items: center;
 			align-items: center;
 			font-size: 14px;
 			font-size: 14px;
 		}
 		}
+
 		.left {
 		.left {
 			width: 240rpx;
 			width: 240rpx;
 			font-size: 28rpx;
 			font-size: 28rpx;
@@ -905,7 +927,8 @@
 		//     transform: scale(1.5) rotate(-90deg);
 		//     transform: scale(1.5) rotate(-90deg);
 		// }
 		// }
 	}
 	}
-.type {
+
+	.type {
 		background: #2772FB;
 		background: #2772FB;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 		color: white;
 		color: white;
@@ -918,6 +941,7 @@
 		height: 68rpx;
 		height: 68rpx;
 		min-width: 124rpx;
 		min-width: 124rpx;
 	}
 	}
+
 	.picture {
 	.picture {
 		margin-top: 20rpx;
 		margin-top: 20rpx;
 		background: #F5F6FA;
 		background: #F5F6FA;
@@ -930,10 +954,12 @@
 		align-items: center;
 		align-items: center;
 		color: #6A7282;
 		color: #6A7282;
 	}
 	}
+
 	.picture1 {
 	.picture1 {
 		background: url(../../../static/images/mine/zm.png);
 		background: url(../../../static/images/mine/zm.png);
 		background-size: 100% 100%;
 		background-size: 100% 100%;
 	}
 	}
+
 	.picture2 {
 	.picture2 {
 		background: url(../../../static/images/mine/gh.png);
 		background: url(../../../static/images/mine/gh.png);
 		background-size: 100% 100%;
 		background-size: 100% 100%;

+ 3 - 1
pages/order/addEvaluation.vue

@@ -7,7 +7,7 @@
 					<view>{{objData.goodName}}</view>
 					<view>{{objData.goodName}}</view>
 				</view>
 				</view>
 				<view class="flex align-center">
 				<view class="flex align-center">
-					<image :src="objData.driverPortrait" mode="widthFix" class="tx-img"></image>
+					<image :src="objData.driverPortrait"  class="tx-img"></image>
 					<view>{{objData.driverName}}</view>
 					<view>{{objData.driverName}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -308,6 +308,8 @@
 
 
 	.tx-img {
 	.tx-img {
 		width: 40rpx;
 		width: 40rpx;
+		height:40rpx;
+		border-radius: 50%;
 		margin-right: 20rpx;
 		margin-right: 20rpx;
 	}
 	}
 </style>
 </style>

+ 2 - 1
pages/order/index.vue

@@ -107,7 +107,8 @@
 						</view>
 						</view>
 						<view class="flex align-center">
 						<view class="flex align-center">
 							<view style="margin-right: 20rpx;">运距 {{good.distance}}km</view>
 							<view style="margin-right: 20rpx;">运距 {{good.distance}}km</view>
-							<view class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
+							<view v-if="good.cargoOwnerStatus!='已完结'" class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
+							<view v-else class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
 						</view>
 						</view>
 						<!-- 		<view class="right">
 						<!-- 		<view class="right">
 							<view class="flex fontsize-26 row">
 							<view class="flex fontsize-26 row">