Переглянути джерело

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

gjy 3 роки тому
батько
коміт
bda8acdec3
1 змінених файлів з 25 додано та 1 видалено
  1. 25 1
      pages/mine/company/addcompany.vue

+ 25 - 1
pages/mine/company/addcompany.vue

@@ -14,7 +14,7 @@
 			<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="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
+					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName" @blur='companyNameBlur'>
 					</u--input>
 					</u--input>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -235,6 +235,30 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		methods: {
 		methods: {
+			companyNameBlur(){
+				this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
+						commonId: this.userInfo.id,
+						companyName:this.dataDetails.companyName
+					}).then(res => {
+						if (res.code==200) {debugger
+							// that.dataDetails.legalPersonName = res.data.name
+						}else{
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
 			getName(){
 			getName(){
 				let that = this
 				let that = this
 				this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
 				this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {