|
@@ -57,6 +57,7 @@
|
|
placeholder="请选择职位"></van-field>
|
|
placeholder="请选择职位"></van-field>
|
|
<van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
|
|
<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>
|
|
: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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -136,14 +137,16 @@
|
|
phone: '',
|
|
phone: '',
|
|
company: '',
|
|
company: '',
|
|
position: '',
|
|
position: '',
|
|
- position_other: ''
|
|
|
|
|
|
+ position_other: '',
|
|
|
|
+ branch: ''
|
|
},
|
|
},
|
|
infoCheckMap: {
|
|
infoCheckMap: {
|
|
name: '',
|
|
name: '',
|
|
phone: '',
|
|
phone: '',
|
|
company: '',
|
|
company: '',
|
|
position: '',
|
|
position: '',
|
|
- position_other: ''
|
|
|
|
|
|
+ position_other: '',
|
|
|
|
+ branch: ''
|
|
},
|
|
},
|
|
isEchoInfoLoading: true,
|
|
isEchoInfoLoading: true,
|
|
popInfo: {
|
|
popInfo: {
|
|
@@ -177,6 +180,24 @@
|
|
title: '职员',
|
|
title: '职员',
|
|
checked: false
|
|
checked: false
|
|
}
|
|
}
|
|
|
|
+ ],
|
|
|
|
+ '部门': [
|
|
|
|
+ {
|
|
|
|
+ title: '市场',
|
|
|
|
+ checked: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '产品',
|
|
|
|
+ checked: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '销售',
|
|
|
|
+ checked: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '渠道',
|
|
|
|
+ checked: false
|
|
|
|
+ }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
ajaxParams: {
|
|
ajaxParams: {
|
|
@@ -185,8 +206,17 @@
|
|
"source": utils.getParam('source'), // 推送消息点进来的
|
|
"source": utils.getParam('source'), // 推送消息点进来的
|
|
"company": "",
|
|
"company": "",
|
|
"position": "",
|
|
"position": "",
|
|
- 'platform': 'app'
|
|
|
|
- }
|
|
|
|
|
|
+ 'platform': 'app',
|
|
|
|
+ "branch": ''
|
|
|
|
+ },
|
|
|
|
+ jobJson: [
|
|
|
|
+ '总裁',
|
|
|
|
+ '总经理',
|
|
|
|
+ '总监',
|
|
|
|
+ '经理',
|
|
|
|
+ '主管',
|
|
|
|
+ '职员'
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
// source=message_bigmember app消息大会员留资地
|
|
// source=message_bigmember app消息大会员留资地
|
|
@@ -237,8 +267,24 @@
|
|
result = this.conditionMap[type].filter(v => v.checked).length
|
|
result = this.conditionMap[type].filter(v => v.checked).length
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
+ case '部门': {
|
|
|
|
+ result = this.conditionMap[type].filter(v => v.checked).length
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return !result
|
|
return !result
|
|
|
|
+ },
|
|
|
|
+ showBranch () {
|
|
|
|
+ // 切换到总裁或总经理之后 把之前选择的部门清空
|
|
|
|
+ if (this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1) {
|
|
|
|
+ this.infoMap.branch = ''
|
|
|
|
+ this.conditionMap['部门'].forEach(v => {
|
|
|
|
+ v.checked = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ var zc = this.infoMap.position.indexOf('总裁') > -1
|
|
|
|
+ var zjl = this.infoMap.position.indexOf('总经理') > -1
|
|
|
|
+ return !(zc || zjl) && this.infoMap.position
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -309,12 +355,14 @@
|
|
if (data.company) {
|
|
if (data.company) {
|
|
this.setCheckForData('company', 'company', data.company)
|
|
this.setCheckForData('company', 'company', data.company)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (data.branch) {
|
|
|
|
+ this.setCheckForData('branch', 'branch', data.branch, '部门')
|
|
|
|
+ }
|
|
},
|
|
},
|
|
setCheckForData (aKey, iKey, cKey, label) {
|
|
setCheckForData (aKey, iKey, cKey, label) {
|
|
this.ajaxParams[aKey] = cKey
|
|
this.ajaxParams[aKey] = cKey
|
|
this.infoMap[iKey] = cKey
|
|
this.infoMap[iKey] = cKey
|
|
- if (label === '职位' && cKey.indexOf('其他') !== -1) {
|
|
|
|
|
|
+ if (label === '职位' && this.jobJson.indexOf(cKey) === -1) {
|
|
// this.infoMap[iKey] = '其他'
|
|
// this.infoMap[iKey] = '其他'
|
|
// this.infoMap.position_other = cKey.split('/')[1]
|
|
// this.infoMap.position_other = cKey.split('/')[1]
|
|
this.infoMap[iKey] = ''
|
|
this.infoMap[iKey] = ''
|
|
@@ -337,6 +385,11 @@
|
|
this.setCheckForData('position', 'position', tempData[0].title)
|
|
this.setCheckForData('position', 'position', tempData[0].title)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
+ case '部门': {
|
|
|
|
+ var tempData = this.conditionMap[type].filter(v => v.checked)
|
|
|
|
+ this.setCheckForData('branch', 'branch', tempData[0].title)
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.popInfo.show = false
|
|
this.popInfo.show = false
|
|
},
|
|
},
|
|
@@ -346,6 +399,10 @@
|
|
this.popInfo.title = '职位'
|
|
this.popInfo.title = '职位'
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
+ case '部门': {
|
|
|
|
+ this.popInfo.title = '部门'
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.popInfo.label = type
|
|
this.popInfo.label = type
|
|
this.popInfo.show = true
|
|
this.popInfo.show = true
|
|
@@ -410,6 +467,7 @@
|
|
if (this.infoMap.position === '其他') {
|
|
if (this.infoMap.position === '其他') {
|
|
this.ajaxParams.position = '其他/' + this.infoMap.position_other
|
|
this.ajaxParams.position = '其他/' + this.infoMap.position_other
|
|
}
|
|
}
|
|
|
|
+ this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ? '' : this.infoMap.branch
|
|
var _this = this
|
|
var _this = this
|
|
var loading = _this.showLoading()
|
|
var loading = _this.showLoading()
|
|
$.ajax({
|
|
$.ajax({
|