Commit fdd8fa68 by 前端

Merge branch 'xuyl_dev_v2.4.0' into 'v2.4.0'

抽取获取跟进员工方法

See merge request !122
2 parents fc70c0f1 bc8f87b4
......@@ -113,7 +113,6 @@
<script>
import { marketingPeopleListShow, getcrowdManageList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import { getStaffList } from '@/api/modules/clientManage'
import marketingPlan from './components/marketingPlan.vue'
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
......@@ -317,7 +316,7 @@ export default {
this.crowdGroupDesc = crowInfo.crowdGroupDesc
this.activeName = crowInfo.selectTab == 'first' ? 'first' : 'second'
}
this.getStaffList()
this.getFollowStaffList()
},
mounted() {
this.screenWidth = document.body.clientWidth
......@@ -372,6 +371,14 @@ export default {
}
},
methods: {
// 获取跟进员工
async getFollowStaffList() {
const formListBackup = JSON.stringify(this.marketPeopleFormList)
const { id, staff } = await this.$Utils.getStaffListApi('', formListBackup, 'followStaff')
this.$nextTick(() => {
this.marketPeopleFormList[id].optionList = staff
})
},
goback() {
if (this.$route.query && this.$route.query.flag) {
this.$router.push('/clientDataOverview/index')
......@@ -436,30 +443,6 @@ export default {
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
},
// 获取跟进员工
getStaffList(val) {
const params = {
staffName: val ? val.trim() : ''
}
getStaffList(params).then(res => {
if (res.length == 0) {
return ''
}
const id = this.marketPeopleFormList.findIndex(item => {
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.marketPeopleFormList[id].optionList = staff
})
})
},
// 搜索表格
searchTable() {
this.$refs.marketPeople.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!