|
@@ -85,9 +85,17 @@
|
|
<el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
|
|
<el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-input v-if="showOtherJob" v-model.trim="form.otherJob" class="data-short-input item-input job-name-iput"
|
|
|
|
|
|
+ <!-- <el-input v-if="showOtherJob" v-model.trim="form.otherJob" class="data-short-input item-input job-name-iput"
|
|
@focus="otherFocus" placeholder="请输入职位名称">
|
|
@focus="otherFocus" placeholder="请输入职位名称">
|
|
- </el-input>
|
|
|
|
|
|
+ </el-input> -->
|
|
|
|
+ <el-select
|
|
|
|
+ style="margin-left:12px;"
|
|
|
|
+ v-if="showBranch"
|
|
|
|
+ popper-class="custom-select"
|
|
|
|
+ v-model="form.branch" placeholder="请选择部门" class="data-short-input item-input job-input" clearable>
|
|
|
|
+ <el-option v-for="item in branchData" :key="item.value" :label="item.label" :value="item.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<div class="long-control" v-if="moduleShow.scale">
|
|
<div class="long-control" v-if="moduleShow.scale">
|
|
@@ -134,7 +142,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { industryJson, jobJson, companyScaleJson } from '@/assets/js/selector.js'
|
|
|
|
|
|
+import { industryJson, jobJson, companyScaleJson, branchJson } from '@/assets/js/selector.js'
|
|
import { Form, FormItem, Button, CheckboxGroup, Checkbox, Select, Input, Option, Cascader } from 'element-ui'
|
|
import { Form, FormItem, Button, CheckboxGroup, Checkbox, Select, Input, Option, Cascader } from 'element-ui'
|
|
import { mapState } from 'vuex'
|
|
import { mapState } from 'vuex'
|
|
import { debounce } from '@/utils/'
|
|
import { debounce } from '@/utils/'
|
|
@@ -199,8 +207,8 @@ export default {
|
|
if (value === '') {
|
|
if (value === '') {
|
|
return callback(new Error('职位不能为空'))
|
|
return callback(new Error('职位不能为空'))
|
|
} else {
|
|
} else {
|
|
- if (value === '其他' && this.form.otherJob === '') {
|
|
|
|
- return callback(new Error('请输入职位'))
|
|
|
|
|
|
+ if ((value.indexOf('总裁') === -1 || value.indexOf('总经理') === -1) && this.showBranch && !this.form.branch) {
|
|
|
|
+ return callback(new Error('部门不能为空'))
|
|
} else {
|
|
} else {
|
|
callback()
|
|
callback()
|
|
}
|
|
}
|
|
@@ -212,6 +220,7 @@ export default {
|
|
industryData: [], // 行业数据
|
|
industryData: [], // 行业数据
|
|
jobData: [], // 职位数据
|
|
jobData: [], // 职位数据
|
|
scaleData: [], // 公司规模数据
|
|
scaleData: [], // 公司规模数据
|
|
|
|
+ branchData: [], // 部门数据
|
|
moldData: [{ // 公司类型数据
|
|
moldData: [{ // 公司类型数据
|
|
label: '公司',
|
|
label: '公司',
|
|
value: '公司'
|
|
value: '公司'
|
|
@@ -236,7 +245,8 @@ export default {
|
|
scale: '', // 公司规模
|
|
scale: '', // 公司规模
|
|
business: '', // 业务范围
|
|
business: '', // 业务范围
|
|
need: '', // 合作需求
|
|
need: '', // 合作需求
|
|
- agreeChecked: true
|
|
|
|
|
|
+ agreeChecked: true,
|
|
|
|
+ branch: '' // 部门
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
name: [{
|
|
name: [{
|
|
@@ -302,6 +312,15 @@ export default {
|
|
},
|
|
},
|
|
showCompany: function () {
|
|
showCompany: function () {
|
|
return this.form.mold === '公司'
|
|
return this.form.mold === '公司'
|
|
|
|
+ },
|
|
|
|
+ showBranch: function () {
|
|
|
|
+ // 切换到总裁或总经理之后 把之前选择的部门清空
|
|
|
|
+ if (this.form.job.indexOf('总裁') > -1 || this.form.job.indexOf('总经理') > -1) {
|
|
|
|
+ this.form.branch = ''
|
|
|
|
+ }
|
|
|
|
+ var zc = this.form.job.indexOf('总裁') > -1
|
|
|
|
+ var zjl = this.form.job.indexOf('总经理') > -1
|
|
|
|
+ return !(zc || zjl) && this.form.job
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
@@ -328,6 +347,12 @@ export default {
|
|
label: item
|
|
label: item
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ this.branchData = branchJson.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ value: item,
|
|
|
|
+ label: item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
mounted () {},
|
|
mounted () {},
|
|
methods: {
|
|
methods: {
|
|
@@ -421,7 +446,8 @@ export default {
|
|
position: this.form.job === '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
|
|
position: this.form.job === '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
|
|
workScope: this.form.business,
|
|
workScope: this.form.business,
|
|
partnerNeeds: this.form.need,
|
|
partnerNeeds: this.form.need,
|
|
- agree: this.form.agreeChecked
|
|
|
|
|
|
+ agree: this.form.agreeChecked,
|
|
|
|
+ branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 ? '' : this.form.branch
|
|
}
|
|
}
|
|
var _this = this
|
|
var _this = this
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -465,8 +491,10 @@ export default {
|
|
_this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
|
|
_this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
|
|
if (res.data.position) {
|
|
if (res.data.position) {
|
|
if (jobJson.indexOf(res.data.position) === -1) {
|
|
if (jobJson.indexOf(res.data.position) === -1) {
|
|
- _this.form.job = '其他'
|
|
|
|
- _this.form.otherJob = res.data.position.replace('其他/', '')
|
|
|
|
|
|
+ // _this.form.job = '其他'
|
|
|
|
+ // _this.form.otherJob = res.data.position.replace('其他/', '')
|
|
|
|
+ _this.form.job = ''
|
|
|
|
+ _this.form.otherJob = ''
|
|
} else {
|
|
} else {
|
|
_this.form.job = res.data.position
|
|
_this.form.job = res.data.position
|
|
}
|
|
}
|
|
@@ -477,6 +505,7 @@ export default {
|
|
_this.form.business = res.data.workScope ? res.data.workScope : ''
|
|
_this.form.business = res.data.workScope ? res.data.workScope : ''
|
|
_this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
|
|
_this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
|
|
_this.form.agreeChecked = res.data.agree === undefined ? true : res.data.agree
|
|
_this.form.agreeChecked = res.data.agree === undefined ? true : res.data.agree
|
|
|
|
+ _this.form.branch = res.data.branch
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -690,6 +719,9 @@ export default {
|
|
.el-popper[x-placement^=bottom] .popper__arrow {
|
|
.el-popper[x-placement^=bottom] .popper__arrow {
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
+ .el-select-dropdown__item.selected{
|
|
|
|
+ color: #2CB7CA!important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.collect-info{
|
|
.collect-info{
|
|
.mask {
|
|
.mask {
|