|
@@ -51,13 +51,13 @@
|
|
|
<div class="associate-ent-group" v-show="isAssociateShow">
|
|
|
<div class="associate-ent-item" @click="selectEnt(item)" v-for="(item, i) in searchList" v-bind:key="i" v-html="highlightText(item, infoMap.company)"></div>
|
|
|
</div>
|
|
|
- <van-field @input="entOnChange('input')" @blur="entOnChange('blur')" @focus="infoCheckMap.company = ''"
|
|
|
- :error-message="infoCheckMap.company" v-model.trim="infoMap.company" label="公司名称" placeholder="请输入公司名称"></van-field>
|
|
|
- <van-field :class="{'hide-border': infoMap.position === '其他'}" v-model="infoMap.position" label="职位" @click="openPop('职位')" readonly is-link
|
|
|
+ <van-field @input="entOnChange('input')" @blur="getCheckMap('company')" @focus="infoCheckMap.company = ''"
|
|
|
+ :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称" placeholder="请输入公司名称"></van-field>
|
|
|
+ <van-field :class="{'hide-border': infoMap.position === '其他'}" @blur="getCheckMap('company')" v-model="infoMap.position" required label="职位" @click="openPop('职位')" readonly is-link
|
|
|
placeholder="请选择职位"></van-field>
|
|
|
<van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
|
|
|
:error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他'" label="职位" placeholder="请输入职位"></van-field>
|
|
|
- <van-field v-if="showBranch" v-model="infoMap.branch" label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
|
|
|
+ <van-field v-if="showBranch" :error-message="infoCheckMap.branch" v-model.trim="infoMap.branch" @blur="getCheckMap('branch')" required label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -249,7 +249,7 @@
|
|
|
return this.popInfo.label === '公司类型'
|
|
|
},
|
|
|
checkPosition () {
|
|
|
- if (this.infoMap.position !== "" && this.infoMap.position !== '其他') {
|
|
|
+ if (this.infoMap.position !== "" || this.infoMap.position !== '其他') {
|
|
|
return true
|
|
|
}
|
|
|
if (this.infoMap.position_other.length > 50) {
|
|
@@ -258,8 +258,17 @@
|
|
|
var namereg = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/;
|
|
|
return namereg.test(this.infoMap.position_other)
|
|
|
},
|
|
|
+ checkBranch(){
|
|
|
+ if(this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1){
|
|
|
+ return false
|
|
|
+ } else if(this.infoMap.branch !== ""){
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
isSubmitDisabled () {
|
|
|
- return !this.checkName || !this.checkPhone
|
|
|
+ return !this.checkName || !this.checkPhone || !this.checkPosition || !this.checkEntName || this.checkBranch
|
|
|
},
|
|
|
isNextDisabled () {
|
|
|
var type = this.popInfo.label
|
|
@@ -456,6 +465,14 @@
|
|
|
}
|
|
|
break
|
|
|
}
|
|
|
+ case 'branch': {
|
|
|
+ var isOther = this.infoMap.branch === '其他' && this.infoMap.branch === ''
|
|
|
+ this.infoCheckMap.branch = isOther ? '部门为必填项' : ''
|
|
|
+ if (this.infoCheckMap.branch === '' && !this.checkPosition) {
|
|
|
+ this.infoCheckMap.branch = '请输入正确格式的职位'
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
cancelForm () {
|