|
|
@@ -1,70 +1,87 @@
|
|
|
<template>
|
|
|
- <div class="f-main">
|
|
|
- <div class="content-top">
|
|
|
- <p>企业认证</p>
|
|
|
- </div>
|
|
|
- <div class="f-form">
|
|
|
- <div class="page-part">
|
|
|
- <mt-field placeholder="企业名称"
|
|
|
- v-model="valid.spaceName"
|
|
|
- :state="state.spaceName"
|
|
|
- @blur.native.capture="validateSpaceName"
|
|
|
- ></mt-field>
|
|
|
- </div>
|
|
|
- <div class="page-part">
|
|
|
- <mt-field placeholder="营业执照号"
|
|
|
- v-model="valid.businessCode"
|
|
|
- auto-complete="off"
|
|
|
- :state="state.businessCode"
|
|
|
- @blur.native.capture="validateBusinessCode"
|
|
|
- ></mt-field>
|
|
|
- </div>
|
|
|
- <div class="page-part">
|
|
|
- <a class="phone-btn-blank" title="上传营业执照扫描件" v-bind:class="{ correct: uploadFileChecked }">
|
|
|
- <i class="fa fa-picture-o fa-p"></i>
|
|
|
- <span class="upload">上传营业执照扫描件</span>
|
|
|
- <input type="file"
|
|
|
- class="form-control file-input"
|
|
|
- name="name"
|
|
|
- accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf"
|
|
|
- @change="upload"/>
|
|
|
- </a>
|
|
|
- <a class="thumbnail" v-if="valid.businessCodeImage !== ''"><img class="previewImg" alt="" :src="isPdf ? '/images/all/timg.png' : valid.businessCodeImage"></a>
|
|
|
- </div>
|
|
|
- <div class="page-part">
|
|
|
- <mt-field placeholder="法定代表人"
|
|
|
- v-model="valid.corporation"
|
|
|
- auto-complete="off"
|
|
|
- :state="state.corporation"
|
|
|
- @blur.native.capture="validateCorporation"
|
|
|
- ></mt-field>
|
|
|
- </div>
|
|
|
- <div class="page-part" style="position: relative">
|
|
|
- <!--// 注册地址-->
|
|
|
- <mt-field readonly aria-haspopup="true" aria-expanded="false"
|
|
|
- placeholder="注册地址"
|
|
|
- v-model="valid.regAddress"
|
|
|
- @click.native="chooseAddress('choose')"></mt-field>
|
|
|
- <i class="fa fa-map-marker fa-p"></i>
|
|
|
- </div>
|
|
|
- <div class="form-btn">
|
|
|
- <div class="page-part">
|
|
|
- <el-checkbox v-model="checked">我已阅读并同意 <a href="/common/agreement" class="rgba">《优软云服务条款》</a></el-checkbox>
|
|
|
+ <div>
|
|
|
+ <template v-if="!showChooseAddress">
|
|
|
+ <div class="f-main">
|
|
|
+ <div class="content-top">
|
|
|
+ <p>企业认证</p>
|
|
|
+ </div>
|
|
|
+ <div class="f-form">
|
|
|
+ <div class="page-part">
|
|
|
+ <mt-field placeholder="企业名称"
|
|
|
+ v-model="valid.spaceName"
|
|
|
+ :state="state.spaceName"
|
|
|
+ @blur.native.capture="validateSpaceName"
|
|
|
+ ></mt-field>
|
|
|
+ </div>
|
|
|
+ <div class="page-part">
|
|
|
+ <mt-field placeholder="营业执照号"
|
|
|
+ v-model="valid.businessCode"
|
|
|
+ auto-complete="off"
|
|
|
+ :state="state.businessCode"
|
|
|
+ @blur.native.capture="validateBusinessCode"
|
|
|
+ ></mt-field>
|
|
|
+ </div>
|
|
|
+ <div class="page-part">
|
|
|
+ <a class="phone-btn-blank" title="上传营业执照扫描件" v-bind:class="{isEmpty: valid.businessCodeImage}">
|
|
|
+ <i class="fa fa-picture-o fa-p"></i>
|
|
|
+ <span class="upload">上传营业执照扫描件</span>
|
|
|
+ <input type="file"
|
|
|
+ class="form-control file-input"
|
|
|
+ name="name"
|
|
|
+ accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf"
|
|
|
+ @change="upload"/>
|
|
|
+ </a>
|
|
|
+ <a class="thumbnail" v-if="valid.businessCodeImage !== ''"><img class="previewImg" alt="" :src="isPdf ? '/images/all/timg.png' : valid.businessCodeImage"></a>
|
|
|
+ </div>
|
|
|
+ <div class="page-part">
|
|
|
+ <mt-field placeholder="法定代表人"
|
|
|
+ v-model="valid.corporation"
|
|
|
+ auto-complete="off"
|
|
|
+ :state="state.corporation"
|
|
|
+ @blur.native.capture="validateCorporation"
|
|
|
+ ></mt-field>
|
|
|
+ </div>
|
|
|
+ <div class="page-part" style="position: relative">
|
|
|
+ <!--// 注册地址-->
|
|
|
+ <mt-field readonly aria-haspopup="true" aria-expanded="false"
|
|
|
+ placeholder="注册地址"
|
|
|
+ v-model="regAddress"
|
|
|
+ @click.native="chooseAddress"></mt-field>
|
|
|
+ <i class="fa fa-map-marker fa-p"></i>
|
|
|
+ </div>
|
|
|
+ <div class="form-btn">
|
|
|
+ <div class="page-part">
|
|
|
+ <el-checkbox v-model="checked">我已阅读并同意 <a href="/common/agreement" class="rgba">《优软云服务条款》</a></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <mt-button size="large" type="primary" @click="sureAccount('await')">提 交</mt-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <mt-button size="large" type="primary" @click="sureAccount('await')">提 交</mt-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <address-choose
|
|
|
+ @getAddress="setAddress"
|
|
|
+ @getProvince="setProvince"
|
|
|
+ @getCity="setCity"
|
|
|
+ @getArea="setArea"
|
|
|
+ @getDetailAddress="setDetailAddress"
|
|
|
+ @getPopAddress="setPopAddress"
|
|
|
+ @showEvent="showAddress"
|
|
|
+ :popAddress="popAddress"
|
|
|
+ :regStreet="regStreet"/>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import addressChoose from '~components/mobile/enterpriseCertification/addressChoose.vue'
|
|
|
export default {
|
|
|
name: 'step-one',
|
|
|
data () {
|
|
|
return {
|
|
|
uploadFileChecked: false,
|
|
|
isPdf: false,
|
|
|
- popupVisible: false,
|
|
|
+ showChooseAddress: false,
|
|
|
checked: true,
|
|
|
state: {
|
|
|
spaceName: 'error',
|
|
|
@@ -75,11 +92,19 @@
|
|
|
spaceName: '',
|
|
|
businessCode: '',
|
|
|
businessCodeImage: '',
|
|
|
- corporation: '',
|
|
|
- regAddress: ''
|
|
|
- }
|
|
|
+ corporation: ''
|
|
|
+ },
|
|
|
+ regAddress: '',
|
|
|
+ regProvince: '',
|
|
|
+ regCity: '',
|
|
|
+ regDistrict: '',
|
|
|
+ popAddress: '',
|
|
|
+ regStreet: ''
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ addressChoose
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 弹窗处理
|
|
|
downToast (type) {
|
|
|
@@ -89,9 +114,31 @@
|
|
|
})
|
|
|
},
|
|
|
// 获取地址
|
|
|
- chooseAddress (step) {
|
|
|
- console.log(step)
|
|
|
- this.$emit('stepEvent', step)
|
|
|
+ chooseAddress () {
|
|
|
+ this.showChooseAddress = true
|
|
|
+ // this.$emit('setRegAddress', this.regAddress)
|
|
|
+ // this.$emit('setRegStreet', this.regStreet)
|
|
|
+ },
|
|
|
+ setAddress (detail) {
|
|
|
+ this.regAddress = detail
|
|
|
+ },
|
|
|
+ setProvince (detail) {
|
|
|
+ this.regProvince = detail
|
|
|
+ },
|
|
|
+ setCity (detail) {
|
|
|
+ this.regCity = detail
|
|
|
+ },
|
|
|
+ setArea (detail) {
|
|
|
+ this.regDistrict = detail
|
|
|
+ },
|
|
|
+ setDetailAddress (detail) {
|
|
|
+ this.regStreet = detail
|
|
|
+ },
|
|
|
+ setPopAddress (detail) {
|
|
|
+ this.popAddress = detail
|
|
|
+ },
|
|
|
+ showAddress (info) {
|
|
|
+ this.showChooseAddress = info
|
|
|
},
|
|
|
// 验证企业名称
|
|
|
validateSpaceName () {
|
|
|
@@ -110,10 +157,8 @@
|
|
|
this.downToast('该企业已被认证,请确认。')
|
|
|
} else {
|
|
|
this.state.spaceName = 'success'
|
|
|
- return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
- this.$indicator.close()
|
|
|
this.downToast(err.errMsg)
|
|
|
})
|
|
|
}
|
|
|
@@ -138,9 +183,9 @@
|
|
|
} else {
|
|
|
this.state.businessCode = 'warning'
|
|
|
this.downToast('该企业已被认证,请确认')
|
|
|
- return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ console.log(err)
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
} else {
|
|
|
@@ -204,11 +249,12 @@
|
|
|
}
|
|
|
},
|
|
|
sureAccount (type) {
|
|
|
+ console.log(this.regAddress)
|
|
|
if (this.state.spaceName !== 'success' ||
|
|
|
this.state.businessCode !== 'success' ||
|
|
|
this.state.corporation !== 'success' ||
|
|
|
- this.valid.businessCodeImage !== '' ||
|
|
|
- this.valid.regAddress !== '') {
|
|
|
+ this.valid.businessCodeImage === '' ||
|
|
|
+ this.regAddress === '') {
|
|
|
this.downToast('请确认填写部分是否有误')
|
|
|
} else {
|
|
|
if (!this.checked) {
|
|
|
@@ -220,11 +266,11 @@
|
|
|
param.append('businessCode', this.valid.businessCode)
|
|
|
param.append('corporation', this.valid.corporation)
|
|
|
param.append('businessCodeImage', this.valid.businessCodeImage)
|
|
|
- param.append('regAddress', this.valid.regAddress)
|
|
|
- param.append('regProvince', this.address.regProvince)
|
|
|
- param.append('regCity', this.address.regCity)
|
|
|
- param.append('regDistrict', this.address.regDistrict)
|
|
|
- param.append('regStreet', this.address.regStreet)
|
|
|
+ param.append('regAddress', this.regAddress)
|
|
|
+ param.append('regProvince', this.regProvince)
|
|
|
+ param.append('regCity', this.regCity)
|
|
|
+ param.append('regDistrict', this.regDistrict)
|
|
|
+ param.append('regStreet', this.regStreet)
|
|
|
let config = {
|
|
|
headers: {'Content-Type': 'multipart/form-data'}
|
|
|
}
|