// import { // crmSettingRecordListAPI // } from '@/api/clients/common' import { GetCustomerContacterList } from '@/api/customermanagement/customerManage' import { mapGetters } from 'vuex' export default { data () { return { /** 记录类型 */ followTypes: [], followType: '', wayTypes: [], wayType: '', contactTypes: [], contactType: '' } }, computed: { ...mapGetters([ 'oa' ]), showOAPermission () { // return this.oa return true } }, created () { this.getFollowLogType() console.log('ccccccccc', this.detail) // if (this.detail) { // this.getContact() // } }, methods: { /** * 获取详情 */ getFollowLogType () { this.loading = true this.loading = false this.followTypes = [ { type: 0, name: '默认其他' }, { type: 1, name: '客户' }, { type: 2, name: '联系人' }, { type: 3, name: '商机' }, { type: 4, name: '合同管理' }, { type: 5, name: '工单' }, { type: 6, name: '报价单' }, { type: 7, name: '合同' }, { type: 8, name: '日程' }, { type: 9, name: '开票' }, { type: 10, name: '回款' }, { type: 11, name: '审批' } ] this.followType = this.followTypes[0].name this.wayTypes = [ { type: 1, name: '电话' }, { type: 2, name: '在线沟通' }, { type: 3, name: '邮件或短信' }, { type: 4, name: '上门拜访' } ] this.wayType = this.wayTypes[0].name this.wayTypeId = this.wayTypes[0].type if (this.crmType === 'business') { this.getContact() } }, getContact () { let params = { 'PageIndex': 1, 'PageSize': 9999, Id: this.detail.CustomerId } GetCustomerContacterList(params).then(res => { if (res.data.ErrorCode === 200 && res.data.Result !== 0) { let dataList = res.data.Result.List || [] if (res.data.Result.Count > 0) { this.contactTypes = dataList.map(item => { return { type: item.Id, name: item.RealName } }) } else { this.contactTypes = [{type: '', name: '暂无数据'}] } this.contactType = this.contactTypes[0].name this.contactTypeId = this.contactTypes[0].type } else { this.$message.error(res.data.Message) } }) } }, deactivated: function () { } }