Ver Fonte

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-huozhuapp

gjy há 2 anos atrás
pai
commit
0bb9179470
2 ficheiros alterados com 197 adições e 189 exclusões
  1. 20 21
      pages/mine/company/addcompany.vue
  2. 177 168
      pages/mine/company/editcompany.vue

+ 20 - 21
pages/mine/company/addcompany.vue

@@ -203,7 +203,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="value" class='content1'>
+		<!-- <view v-if="value" class='content1'>
 			<view class="flex row">
 				<view class="left-text">企业用地是否自有</view>
 				<view class="flex right">
@@ -242,8 +242,7 @@
 					</view>
 				</view>
 			</view>
-
-		</view>
+		</view> -->
 		<view class="content4">
 
 			<view class="flex service align-center">
@@ -609,25 +608,25 @@
 					})
 					return true
 				}
+				//先注释掉
+				// if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
+				// 		.propertyAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "房产证或租赁合同不能为空!",
+				// 	})
+				// 	return true
+				// }
 
-				if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
-						.propertyAddressUrl)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "房产证或租赁合同不能为空!",
-					})
-					return true
-				}
-
-				if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
-					if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "场地租赁截止日期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "场地租赁截止日期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',

+ 177 - 168
pages/mine/company/editcompany.vue

@@ -23,8 +23,7 @@
 			</view>
 			<view class="flex row">
 				<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'}">
 						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
 					</view>
@@ -45,8 +44,8 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">企业名称</view>
 				<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>
 				</view>
 			</view>
@@ -67,41 +66,38 @@
 				</view>
 			</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 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'}">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
 					</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>
@@ -116,7 +112,8 @@
 			<view class="flex row border-bottom mt20">
 				<view class="left">对公账户</view>
 				<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>
 				</view>
 			</view>
@@ -127,7 +124,8 @@
 					</u--input>
 				</view>
 				<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 class="flex row border-bottom mt20">
@@ -151,7 +149,7 @@
 					</view>
 					<view @click="manualInput" class="type">手动输入</view>
 				</view>
-			
+
 			</view>
 			<!-- 	<view class="flex mt20 align-center">
 				<view class="left">注册实缴金额</view>
@@ -197,7 +195,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="dataDetails.advanceFreightService == 1" class='content1'>
+		<!-- <view v-if="dataDetails.advanceFreightService == 1" class='content1'>
 			<view class="flex row">
 				<view class="left-text">企业用地是否自有</view>
 				<view class="flex right">
@@ -236,8 +234,7 @@
 					</view>
 				</view>
 			</view>
-
-		</view>
+		</view> -->
 		<view class="content4">
 
 			<view class="flex service align-center">
@@ -289,11 +286,11 @@
 				consentStatus: false,
 				ValidityPeriodType: '',
 				value: false,
-				columns:[],
+				columns: [],
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 				},
-				isShowBank:false,
+				isShowBank: false,
 				radiolist1: [{
 						name: '自有',
 						disabled: false
@@ -321,7 +318,7 @@
 					legalPersonName: ''
 
 				},
-				dataType:""
+				dataType: ""
 			}
 		},
 		onShow() {
@@ -349,12 +346,12 @@
 		},
 		methods: {
 			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({
 						title: '提示',
 						content: '您已经关闭相机权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
 								// plus.runtime.openURL("app-settings:");
@@ -362,7 +359,7 @@
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			manualInput() {
@@ -397,7 +394,7 @@
 					})
 					return true
 				}
-			
+
 				this.isShowBank = true
 			},
 			confirmBank(e) {
@@ -562,25 +559,25 @@
 					})
 					return true
 				}
+				//先注释掉
+				// if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
+				// 		.propertyAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "房产证或租赁合同不能为空!",
+				// 	})
+				// 	return true
+				// }
 
-				if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
-						.propertyAddressUrl)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "房产证或租赁合同不能为空!",
-					})
-					return true
-				}
-
-				if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
-					if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "场地租赁截止日期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "场地租赁截止日期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -589,9 +586,9 @@
 				// 	return true
 				// }
 			},
-			companyNamechange(e){
+			companyNamechange(e) {
 				console.log(e)
-				this.dataDetails.corporateAccount=e
+				this.dataDetails.corporateAccount = e
 			},
 			submit() {
 				if (this.validate()) return
@@ -611,7 +608,10 @@
 				this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
 						uni.hideLoading()
 						uni.$u.toast('提交成功')
-						this.goDetailPage('/pages/mine/company/index')
+						uni.navigateBack({
+							delta: 1
+						})
+						// this.goDetailPage('/pages/mine/company/index')
 					})
 					.catch(res => {
 						uni.hideLoading()
@@ -671,117 +671,120 @@
 			imgTypeSelect(val) {
 				var _this = this
 				// 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.$request.baseRequest('get',
 												'/driverInfo/personShibie', {
 													personImg: result,
-													flag:2
+													flag: 2
 												}).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()
 											})
 											.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()
-											  	})
-											  	.catch(res => {
-											  		uni.$u.toast(res.message);
-											  	});
-											break;
-									}
+										break;
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 				// } else {
 				// 	uni.chooseImage({
 				// 		count: 1,
@@ -813,7 +816,7 @@
 				// 										console.log(res)
 				// 										_this.$forceUpdate()
 				// 									}
-			
+
 				// 								})
 				// 								.catch(res => {
 				// 									uni.$u.toast(res.message);
@@ -848,7 +851,7 @@
 				this.ValidityPeriodType = type
 				this.isShowcardValidity = true
 			},
-		
+
 			changeHandler(e) {
 				const {
 					columnIndex,
@@ -897,6 +900,7 @@
 		padding: 20rpx 30rpx;
 		border-radius: 5px;
 		margin: 20rpx;
+
 		.left-text {
 			// background: red;
 			width: 50%;
@@ -905,6 +909,7 @@
 			align-items: center;
 			font-size: 14px;
 		}
+
 		.left {
 			width: 240rpx;
 			font-size: 28rpx;
@@ -922,7 +927,8 @@
 		//     transform: scale(1.5) rotate(-90deg);
 		// }
 	}
-.type {
+
+	.type {
 		background: #2772FB;
 		border-radius: 10rpx;
 		color: white;
@@ -934,6 +940,7 @@
 		align-items: center;
 		height: 68rpx;
 	}
+
 	.picture {
 		margin-top: 20rpx;
 		background: #F5F6FA;
@@ -946,10 +953,12 @@
 		align-items: center;
 		color: #6A7282;
 	}
+
 	.picture1 {
 		background: url(../../../static/images/mine/zm.png);
 		background-size: 100% 100%;
 	}
+
 	.picture2 {
 		background: url(../../../static/images/mine/gh.png);
 		background-size: 100% 100%;