Commit 5a14069d authored by 罗超's avatar 罗超

修改文件名

parent 2d0b6e60
...@@ -4,18 +4,35 @@ ...@@ -4,18 +4,35 @@
import { HttpResponse } from '@/@types' import { HttpResponse } from '@/@types'
import Axios from './axios' import Axios from './axios'
/** /**
* @interface loginParams -登录参数 * @interface loginParams -登录参数
* @property {string} grant_type -授权类型 * @property {string} grant_type -授权类型
* @property {string} email -邮箱 * @property {string} email -邮箱
* @property {string} password -用户密码 * @property {string} password -用户密码
*/ */
interface msg { interface CutomerParams {
Enable: number PageIndex: number,
} PageSize: number,
interface IdName { pageCount: number,
Id: number CorpName: string, //企业名称
Name: string CustomerName: string, //备注名
WeChatName: string, //昵称
CustomerMobile: string, //手机号码
CreateSTime: string, //创建开始时间
CreateETime: string, //创建结束时间
FriendSTime: string, //好友开始时间
FriendETime: string, //好友结束时间
Q_NotFollowUpDay: number, //几天未跟进
Q_Friends: string, //好友关系 多选逗号分隔、
Q_AddWay: string, //获取来源 多选英文逗号分隔
EmpId: number, //员工id
CustomerType: number, //类型1微信用户 2企业微信用户
SelectList: Array<any>, //自定义查询
OrderBy: number, //排序
AddCondition: number //查询条件
} }
/** /**
...@@ -23,215 +40,87 @@ interface IdName { ...@@ -23,215 +40,87 @@ interface IdName {
* @todo Get the exchange rate of the current currency * @todo Get the exchange rate of the current currency
*/ */
class customerService { class CustomerService {
// 获取客户字段列表 // 获取用户列表数据
static async getCustomerFiledList(data: msg): Promise<HttpResponse> { static async getCustomerList(data: CutomerParams): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFiledList', { return Axios('/QYCustomer/GetCustomerInfoPageList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户标签
static async getLabelList(data: any): Promise<HttpResponse> {
return Axios('/QYWeChat/GetWeChatLableList', {
method: 'post',
responseType: 'json',
data
})
}
// 客户标签移动
static async setCustomerFiledState(data: { Type: number; SortFiledId: number; FiledId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerFiledState', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取客户线索配置 //获取途径下拉数据
static async getCustomerClueRuleConfig(data: any): Promise<HttpResponse> { static async getWayList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleConfig', { return Axios('/QYCustomer/GetCustomerAddWayEnumList', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 设置客户线索配置 //获取部门-员工下拉数据
static async setCustomerClueRuleConfig(data: any): Promise<HttpResponse> { static async getEmployeeData(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleConfig', { return Axios('/User/GetEmployeeAddrBook', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取客户线索规则列表 //获取员工详情数据
static async getCustomerClueRuleList(data: any): Promise<HttpResponse> { static async getCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleList', { return Axios('/QYCustomer/GetCustomerInfo', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取客户线索规则详情 //获取客户阶段下拉数据
static async getCustomerClueRuleDetail(data: any): Promise<HttpResponse> { static async getCustomStageList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改线索规则
static async setCustomerClueRuleInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 设置线索规则状态
static async setCustomerClueRuleState(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleState', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户阶段列表
static async getCustomerStageList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageList', { return Axios('/QYCustomer/GetCustomerStageList', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取客户子段类型枚举 //保存客户资料
static async getCustomerFieldTypeEnumList(data: any): Promise<HttpResponse> { static async saveCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldTypeEnumList', { return Axios('/QYCustomer/SetCustomerInfo', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取部门树形列表 //保存客户标签
static async getDeptTree(data: any): Promise<HttpResponse> { static async saveCustomLabel(data: any): Promise<HttpResponse> {
return Axios('/User/GetDeptTree', { return Axios('/QYCustomer/SetCustomerLabelBatch', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
// 获取部门树形列表 //获取客户旅程类型枚举列表
static async getCustomerFieldInputTypeEnumList(data: any): Promise<HttpResponse> { static async getCustomerTripType(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldInputTypeEnumList', { return Axios('/QYCustomer/GetCustomerTripTypeEnumList', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
//新增修改客户字段 //获取客户旅程分页列表
static async setCustomerFiledInfo(data: { Id: number; Type: number; Name: string; Required: number; DeptId: number; WordNum: number; InputType: string; OptionsList: Array<IdName>; Digits: number; Enable: number; [propName: string]: any }): Promise<HttpResponse> { static async getCustomerTripPage(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerFiledInfo', { return Axios('/QYCustomer/GetCustomerTripPageList', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
//获取客户阶段流程列表 //新增客户跟进记录
static async getCustomerStageFlowList(data: msg): Promise<HttpResponse> { static async setCustomerTripFollowUpInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageFlowList', { return Axios('/QYCustomer/SetCustomerTripFollowUpInfo', {
method: 'post',
responseType: 'json',
data
})
}
//设置客户阶段流程状态
static async setCustomerStageFlowState(data: { Type: number; FlowId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageFlowState', {
method: 'post',
responseType: 'json',
data
})
}
//验证该阶段是否可以删除
static async validataCustomerStageDel(data: { StageId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/ValidataCustomerStageDel', {
method: 'post',
responseType: 'json',
data
})
}
// 验证阶段输单/无效的 原因选项是否可以删除
static async validataCustomerCauseDel(data: { CauseId: number; Type: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/ValidataCustomerCauseDel', {
method: 'post',
responseType: 'json',
data
})
}
// 验证阶段输单/无效的 原因选项是否可以删除
static async setCustomerStageInfo(data: { Id: number; Type: number; Name: string; Sort: number; OptionsList: Array<IdName>; IsDefault: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户标签/分组 列表
static async getWeChatLableList(data: any): Promise<HttpResponse> {
return Axios('/QYWeChat/GetWeChatLableList', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async setWeChatLable(data: { Id: number; ParentId: number; Name: string; Sort: string; ChildList: Array<{ Name: string; Sort: string }> }): Promise<HttpResponse> {
return Axios('/QYWeChat/SetWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async delWeChatLable(data: { LableId: number }): Promise<HttpResponse> {
return Axios('/QYWeChat/DelWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
// 保存客户阶段流程
static async setCustomerStageFlowInfo(data: { Id: number; FlowName: string; DeptEmpList: Array<{ Id: number; Name: string; Type: number }>; UseStage: string; LoseCause: string; InvalidCause: string }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageFlowInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户阶段流程详情
static async getCustomerStageFlowInfo(data: { FlowId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageFlowInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取获取客户操作配置
static async getCustomerConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerConfig', {
method: 'post',
responseType: 'json',
data
})
}
// 保存客户操作
static async setCustomerConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerConfig', {
method: 'post', method: 'post',
responseType: 'json', responseType: 'json',
data data
}) })
} }
} }
export {CutomerParams}
export default customerService export default CustomerService
/**
* 所有跟用户相关的接口(TODO:DEMO USER)
*/
import { HttpResponse } from '@/@types'
import Axios from './axios'
/**
* @interface loginParams -登录参数
* @property {string} grant_type -授权类型
* @property {string} email -邮箱
* @property {string} password -用户密码
*/
interface CutomerParams {
PageIndex: number,
PageSize: number,
pageCount: number,
CorpName: string, //企业名称
CustomerName: string, //备注名
WeChatName: string, //昵称
CustomerMobile: string, //手机号码
CreateSTime: string, //创建开始时间
CreateETime: string, //创建结束时间
FriendSTime: string, //好友开始时间
FriendETime: string, //好友结束时间
Q_NotFollowUpDay: number, //几天未跟进
Q_Friends: string, //好友关系 多选逗号分隔、
Q_AddWay: string, //获取来源 多选英文逗号分隔
EmpId: number, //员工id
CustomerType: number, //类型1微信用户 2企业微信用户
SelectList: Array<any>, //自定义查询
OrderBy: number, //排序
AddCondition: number //查询条件
}
/**
* @example Axios.get(`https://xxx.com}`)
* @todo Get the exchange rate of the current currency
*/
class CustomerService {
// 获取用户列表数据
static async getCustomerList(data: CutomerParams): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerInfoPageList', {
method: 'post',
responseType: 'json',
data
})
}
//获取途径下拉数据
static async getWayList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerAddWayEnumList', {
method: 'post',
responseType: 'json',
data
})
}
//获取部门-员工下拉数据
static async getEmployeeData(data: any): Promise<HttpResponse> {
return Axios('/User/GetEmployeeAddrBook', {
method: 'post',
responseType: 'json',
data
})
}
//获取员工详情数据
static async getCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerInfo', {
method: 'post',
responseType: 'json',
data
})
}
//获取客户阶段下拉数据
static async getCustomStageList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageList', {
method: 'post',
responseType: 'json',
data
})
}
//保存客户资料
static async saveCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerInfo', {
method: 'post',
responseType: 'json',
data
})
}
//保存客户标签
static async saveCustomLabel(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerLabelBatch', {
method: 'post',
responseType: 'json',
data
})
}
//获取客户旅程类型枚举列表
static async getCustomerTripType(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerTripTypeEnumList', {
method: 'post',
responseType: 'json',
data
})
}
//获取客户旅程分页列表
static async getCustomerTripPage(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerTripPageList', {
method: 'post',
responseType: 'json',
data
})
}
//新增客户跟进记录
static async setCustomerTripFollowUpInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerTripFollowUpInfo', {
method: 'post',
responseType: 'json',
data
})
}
}
export {CutomerParams}
export default CustomerService
/**
* 所有跟用户相关的接口(TODO:DEMO USER)
*/
import { HttpResponse } from '@/@types'
import Axios from './axios'
/**
* @interface loginParams -登录参数
* @property {string} grant_type -授权类型
* @property {string} email -邮箱
* @property {string} password -用户密码
*/
interface msg {
Enable: number
}
interface IdName {
Id: number
Name: string
}
/**
* @example Axios.get(`https://xxx.com}`)
* @todo Get the exchange rate of the current currency
*/
class customerSetService {
// 获取客户字段列表
static async getCustomerFiledList(data: msg): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFiledList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户标签
static async getLabelList(data: any): Promise<HttpResponse> {
return Axios('/QYWeChat/GetWeChatLableList', {
method: 'post',
responseType: 'json',
data
})
}
// 客户标签移动
static async setCustomerFiledState(data: { Type: number; SortFiledId: number; FiledId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerFiledState', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户线索配置
static async getCustomerClueRuleConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleConfig', {
method: 'post',
responseType: 'json',
data
})
}
// 设置客户线索配置
static async setCustomerClueRuleConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleConfig', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户线索规则列表
static async getCustomerClueRuleList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户线索规则详情
static async getCustomerClueRuleDetail(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改线索规则
static async setCustomerClueRuleInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 设置线索规则状态
static async setCustomerClueRuleState(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleState', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户阶段列表
static async getCustomerStageList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户子段类型枚举
static async getCustomerFieldTypeEnumList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldTypeEnumList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取部门树形列表
static async getDeptTree(data: any): Promise<HttpResponse> {
return Axios('/User/GetDeptTree', {
method: 'post',
responseType: 'json',
data
})
}
// 获取部门树形列表
static async getCustomerFieldInputTypeEnumList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldInputTypeEnumList', {
method: 'post',
responseType: 'json',
data
})
}
//新增修改客户字段
static async setCustomerFiledInfo(data: { Id: number; Type: number; Name: string; Required: number; DeptId: number; WordNum: number; InputType: string; OptionsList: Array<IdName>; Digits: number; Enable: number; [propName: string]: any }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerFiledInfo', {
method: 'post',
responseType: 'json',
data
})
}
//获取客户阶段流程列表
static async getCustomerStageFlowList(data: msg): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageFlowList', {
method: 'post',
responseType: 'json',
data
})
}
//设置客户阶段流程状态
static async setCustomerStageFlowState(data: { Type: number; FlowId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageFlowState', {
method: 'post',
responseType: 'json',
data
})
}
//验证该阶段是否可以删除
static async validataCustomerStageDel(data: { StageId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/ValidataCustomerStageDel', {
method: 'post',
responseType: 'json',
data
})
}
// 验证阶段输单/无效的 原因选项是否可以删除
static async validataCustomerCauseDel(data: { CauseId: number; Type: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/ValidataCustomerCauseDel', {
method: 'post',
responseType: 'json',
data
})
}
// 验证阶段输单/无效的 原因选项是否可以删除
static async setCustomerStageInfo(data: { Id: number; Type: number; Name: string; Sort: number; OptionsList: Array<IdName>; IsDefault: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户标签/分组 列表
static async getWeChatLableList(data: any): Promise<HttpResponse> {
return Axios('/QYWeChat/GetWeChatLableList', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async setWeChatLable(data: { Id: number; ParentId: number; Name: string; Sort: string; ChildList: Array<{ Name: string; Sort: string }> }): Promise<HttpResponse> {
return Axios('/QYWeChat/SetWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async delWeChatLable(data: { LableId: number }): Promise<HttpResponse> {
return Axios('/QYWeChat/DelWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
// 保存客户阶段流程
static async setCustomerStageFlowInfo(data: { Id: number; FlowName: string; DeptEmpList: Array<{ Id: number; Name: string; Type: number }>; UseStage: string; LoseCause: string; InvalidCause: string }): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerStageFlowInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户阶段流程详情
static async getCustomerStageFlowInfo(data: { FlowId: number }): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageFlowInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取获取客户操作配置
static async getCustomerConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerConfig', {
method: 'post',
responseType: 'json',
data
})
}
// 保存客户操作
static async setCustomerConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerConfig', {
method: 'post',
responseType: 'json',
data
})
}
}
export default customerSetService
...@@ -514,7 +514,7 @@ import { ...@@ -514,7 +514,7 @@ import {
} from 'vue' } from 'vue'
import { DownLoadFileByUrl } from '@/utils/upload' import { DownLoadFileByUrl } from '@/utils/upload'
import message from '@/utils/message' import message from '@/utils/message'
import customer2 from '@/api/customer2' import customer from '@/api/customer'
import labelgroup from '@/components/customer/label-group.vue' import labelgroup from '@/components/customer/label-group.vue'
import fileUpload from '@/components/common/fileUpload.vue' import fileUpload from '@/components/common/fileUpload.vue'
...@@ -576,7 +576,7 @@ export default { ...@@ -576,7 +576,7 @@ export default {
}) })
//获取详情数据 //获取详情数据
const getCustomInfo = (param: msgParam) => { const getCustomInfo = (param: msgParam) => {
customer2.getCustomInfo(param).then(res => { customer.getCustomInfo(param).then(res => {
data.dataList = res.data.Data; data.dataList = res.data.Data;
data.FiledDetailList = res.data.Data.FiledDetailList; data.FiledDetailList = res.data.Data.FiledDetailList;
data.FiledDetailList.forEach(x => { data.FiledDetailList.forEach(x => {
...@@ -596,7 +596,7 @@ export default { ...@@ -596,7 +596,7 @@ export default {
} }
//获取客户阶段下拉 //获取客户阶段下拉
const getCustomStage = (param) => { const getCustomStage = (param) => {
customer2.getCustomStageList(param).then(res => { customer.getCustomStageList(param).then(res => {
data.customData = res.data.Data; data.customData = res.data.Data;
}) })
} }
...@@ -623,7 +623,7 @@ export default { ...@@ -623,7 +623,7 @@ export default {
} else { } else {
cutomMsg.Value = e.Value; cutomMsg.Value = e.Value;
} }
customer2.saveCustomInfo(cutomMsg).then(res => { customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg); getCustomInfo(msg);
message.successMsg(res.data.Message); message.successMsg(res.data.Message);
}) })
...@@ -635,7 +635,7 @@ export default { ...@@ -635,7 +635,7 @@ export default {
cutomMsg.CustomerId = msg.CustomerId; cutomMsg.CustomerId = msg.CustomerId;
cutomMsg.Type = 1; cutomMsg.Type = 1;
cutomMsg.CustomId = 0; cutomMsg.CustomId = 0;
customer2.saveCustomInfo(cutomMsg).then(res => { customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg); getCustomInfo(msg);
data.isShowEdit = false; data.isShowEdit = false;
message.successMsg(res.data.Message); message.successMsg(res.data.Message);
...@@ -680,14 +680,14 @@ export default { ...@@ -680,14 +680,14 @@ export default {
ckedArr.push(x.Id); ckedArr.push(x.Id);
}) })
labelMsg.LableIds = ckedArr.toString(); labelMsg.LableIds = ckedArr.toString();
customer2.saveCustomLabel(labelMsg).then(res => { customer.saveCustomLabel(labelMsg).then(res => {
getCustomInfo(msg); getCustomInfo(msg);
message.successMsg(res.data.Message); message.successMsg(res.data.Message);
}) })
} }
//获取客户旅程类型 //获取客户旅程类型
const getCustomerTripType = (param: any) => { const getCustomerTripType = (param: any) => {
customer2.getCustomerTripType(param).then(res => { customer.getCustomerTripType(param).then(res => {
console.log(res, 'trip数据'); console.log(res, 'trip数据');
data.tripTypeArr = res.data.Data; data.tripTypeArr = res.data.Data;
let Obj = { let Obj = {
...@@ -706,7 +706,7 @@ export default { ...@@ -706,7 +706,7 @@ export default {
} }
//获取客户旅程分页列表 //获取客户旅程分页列表
const getCustomerPage = () => { const getCustomerPage = () => {
customer2.getCustomerTripPage(customTripMsg).then(res => { customer.getCustomerTripPage(customTripMsg).then(res => {
console.log(res, '旅程分页数据'); console.log(res, '旅程分页数据');
data.tripDataList = res.data.Data.PageData; data.tripDataList = res.data.Data.PageData;
data.TripPageCount = res.data.Data.PageCount; data.TripPageCount = res.data.Data.PageCount;
......
<template> <template>
<q-dialog <q-dialog v-model="show" class="col-6" persistent transition-show="scale" transition-hide="scale" @show="showDialog"
v-model="show" @hide="hideDialog">
class="col-6" <q-card style="width: 600px; height: 600px; max-width: 80vw">
persistent <q-card-section class="row items-center q-pb-none">
transition-show="scale" <div class="text-h6">选择部门 <span v-if="showType === 0">/员工</span></div>
transition-hide="scale" <q-space />
@show="showDialog" <q-btn icon="close" flat round dense v-close-popup />
@hide="hideDialog" </q-card-section>
>
<q-card style="width: 600px;height:600px; max-width: 80vw;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">选择部门 <span v-if="showType===0">/员工</span></div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section class="q-pt-none" style="height:480px;"> <q-card-section class="q-pt-none" style="height: 480px">
<div class="row" style="height:100%;"> <div class="row" style="height: 100%">
<div class="col-6 q-px-sm" style="border-right:1px solid #999;height:100%;"> <div class="col-6 q-px-sm" style="border-right: 1px solid #999; height: 100%">
<q-input <q-input color="teal" dense outlined placeholder="请输入" v-model="filter" style="margin-bottom: 10px"
color="teal" clearable @clear="clearInput">
dense <template v-slot:append>
outlined <q-icon name="search" />
placeholder="请输入" </template>
v-model="filter" </q-input>
style="margin-bottom:10px" <q-tree style="height: calc(100% - 50px); overflow-y: scroll" ref="tree" class="col-12" :nodes="treeData"
clearable :node-key="nodeKey" :label-key="labelKey" :children-key="childrenKey" :tick-strategy="strategy"
@clear="clearInput" :default-expand-all="defaultExpandAll" no-connectors v-model:ticked="ticketArr"
> @update:ticked="tickedTree" :filter="filter" :filter-method="myFilterMethod" />
<template v-slot:append> </div>
<q-icon name="search" /> <div class="col-6 q-px-sm">
</template> <div class="list-title">已选择的部门<span v-if="showType === 0">或成员</span></div>
</q-input> <div class="q-pb-none col-12 list-box">
<q-tree <div v-for="(item, index) in selectArray" :key="index" class="list-item">
style="height:calc(100% - 50px);overflow-y:scroll" <div class="flex-center">
ref="tree" <q-icon name="work" color="primary" v-if="item.Type == '1'" />
class="col-12" <q-icon name="person" color="accent" v-if="item.Type == '2'" />
:nodes="treeData" <span class="q-ml-sm">{{ item.Name }}</span>
:node-key="nodeKey"
:label-key="labelKey"
:children-key="childrenKey"
:tick-strategy="strategy"
:default-expand-all="defaultExpandAll"
no-connectors
v-model:ticked="ticketArr"
@update:ticked="tickedTree"
:filter="filter"
:filter-method="myFilterMethod"
/>
</div>
<div class="col-6 q-px-sm">
<div class="list-title">已选择的部门<span v-if="showType===0">或成员</span></div>
<div class="q-pb-none col-12 list-box">
<div v-for="(item,index) in selectArray" :key="index" class="list-item">
<div class="flex-center">
<q-icon
name="work"
color="primary"
v-if="item.Id.slice(0, 1) == '1'"
/>
<q-icon
name="person"
color="accent"
v-if="item.Id.slice(0, 1) == '2'"
/>
<span class="q-ml-sm">{{ item.Name }}</span>
</div>
<q-icon name="cancel" @click="delItem(item.Id, index)"></q-icon>
</div>
</div>
</div>
</div> </div>
</q-card-section> <q-icon name="cancel" @click="delItem(item.Id, index)"></q-icon>
</div>
</div>
</div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal"> <q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="取消" v-close-popup /> <q-btn flat label="取消" v-close-popup />
<q-btn color="primary" @click="goback" flat label="确定" /> <q-btn color="primary" @click="goback" flat label="确定" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<script lang="ts"> <script lang="ts">
import { ref,watch } from 'vue' import {
ref,
watch
} from 'vue'
interface parmas { interface parmas {
[key: string]: any [key: string]: any
} }
interface SelectParams { interface SelectParams {
Id: string, Id: string
Name: string, Name: string
Type: number Type: number
} }
export default { export default {
props: { props: {
modelValue: { modelValue: {
type: Boolean, type: Boolean,
default: false, default: false,
required: true required: true
}, },
//树形结构列表 //树形结构列表
treeData: { treeData: {
type: Array, type: Array,
required: true required: true
}, },
showType: { showType: {
type: Number,//0:显示部门和员工,1:只显示部门 type: Number, //0:显示部门和员工,1:只显示部门
default: 0 default: 0
}, },
//是否默认展开 //是否默认展开
defaultExpandAll: { defaultExpandAll: {
type: Boolean, type: Boolean,
default: false default: false
}, },
//默认选中值 //默认选中值
defaultArray: { defaultArray: {
type: Array, type: Array,
default: () => [], default: () => [],
required: true, required: true
}, },
//节点Key //节点Key
nodeKey: { nodeKey: {
type: String,//格式需拼成 '类型-名字-id'的形式 type: String, //格式需拼成 '类型-名字-id'的形式
default: 'id' default: 'id'
}, },
//节点名称 //节点名称
labelKey: { labelKey: {
type: String, type: String,
default: 'name' default: 'name'
}, },
//子节点名称 //子节点名称
childrenKey: { childrenKey: {
type: String, type: String,
default: 'children' default: 'children'
}, },
strategy: { strategy: {
type: String, type: String,
default: 'strict' default: 'strict'
}, }
}, },
setup(props, ctx) {
let show=ref(false)
let tree = ref<any>(null);
let keys = ref<Array<string>>([])
let selectArray = ref<Array<SelectParams>>([])
let ticketArr = ref<Array<any>>([])
watch(()=>props.modelValue,(val)=>{
show.value=val
})
let hideDialog = () => {
ctx.emit("update:modelValue", false)
}
let filter = ref('')
const filterRef = ref<any>(null)
// 过滤树形列表
const myFilterMethod = (node, filter) => {
const filt = filter.toLowerCase()
return node[props.labelKey] && node[props.labelKey].toLowerCase().indexOf(filt) > -1
}
let clearInput = () => {
filter.value = ''
}
// 有默认值-----start-------
let flag=true
let initDefault = () => {
selectArray.value = []
if (props.defaultArray && props.defaultArray.length > 0&&flag) {
props.defaultArray.map((e) => {
if (e.slice(0, 1) == 1) {
const node = tree.value.getNodeByKey(e)
if (node[props.childrenKey] && node[props.childrenKey].length > 0) {
findChild(node[props.childrenKey])
} else {
ticketArr.value.push(node.DataType + '-' + node.DeptId)
}
} else {
ticketArr.value.push(e)
}
setup(props, ctx) {
}) let show = ref(false)
flag=false let tree = ref < any > (null)
} let keys = ref < Array < string >> ([])
let selectArray = ref < Array < SelectParams >> ([])
let ticketArr = ref < Array < any >> ([])
watch(
() => props.modelValue,
val => {
show.value = val
} }
let findChild = (arr: Array<parmas>) => { )
arr.map(e => { let hideDialog = () => {
if (e[props.childrenKey] && e[props.childrenKey].length > 0) { ctx.emit('update:modelValue', false)
findChild(e[props.childrenKey]) }
let filter = ref('')
const filterRef = ref < any > (null)
// 过滤树形列表
const myFilterMethod = (node, filter) => {
const filt = filter.toLowerCase()
return node[props.labelKey] && node[props.labelKey].toLowerCase().indexOf(filt) > -1
}
let clearInput = () => {
filter.value = ''
}
// 有默认值-----start-------
let flag = true
let initDefault = () => {
selectArray.value = []
if (props.defaultArray && props.defaultArray.length > 0 && flag) {
if (props.showType == 0) {
props.defaultArray.map(e => {
if (e.slice(0, 1) == 1) {
const node = tree.value.getNodeByKey(e)
if (node[props.childrenKey] && node[props.childrenKey].length > 0) {
findChild(node[props.childrenKey])
} else { } else {
ticketArr.value.push(e.DataType + '-' + e.DeptId) ticketArr.value.push(node.DataType + '-' + node.DeptId)
} }
} else {
ticketArr.value.push(e)
}
}) })
flag = false
} } else {
ticketArr.value = JSON.parse(JSON.stringify(props.defaultArray))
console.log('默认值',ticketArr.value)
}
// 有默认值----end--------
let showDialog = () => {
initDefault()
getselectArray(props.treeData)
} }
//处理选中值------------- }
const getselectArray = (arr: parmas[]) => { let findChild = (arr: Array < parmas > ) => {
for (var i = 0; i < arr.length; i++) { arr.map(e => {
let j = arr[i] if (e[props.childrenKey] && e[props.childrenKey].length > 0) {
let flag = tree.value.isTicked(j[props.nodeKey]) findChild(e[props.childrenKey])
if (flag == true) { } else {
selectArray.value.push({ Id: j[props.nodeKey], Name: j.DeptName, Type: j.DataType }) ticketArr.value.push(e.DataType + '-' + e.DeptId)
} else { }
if (j[props.childrenKey] && j[props.childrenKey].length > 0) { })
getselectArray(j[props.childrenKey]) }
}
}
}
}
let tickedTree = (val) => {
let filt = val.filter(e => e.slice(0, 1) == 2).length
ctx.emit('getNum', filt)
setTimeout(() => {
selectArray.value = []
getselectArray(props.treeData)
}, 100)
} // 有默认值----end--------
let delItemitem = (arr: parmas) => { let showDialog = () => {
arr.map(x => { initDefault()
if (x[props.childrenKey] && x[props.childrenKey].length > 0) { getselectArray(props.treeData)
delItemitem(x[props.childrenKey]) }
} else { //处理选中值-------------
keys.value.push(x[props.nodeKey]) const getselectArray = (arr: parmas[]) => {
} for (var i = 0; i < arr.length; i++) {
let j = arr[i]
let flag = tree.value.isTicked(j[props.nodeKey])
if (flag == true) {
selectArray.value.push({
Id: j[props.nodeKey],
Name: j.DeptName,
Type: j.DataType
}) })
} } else {
let delItemArray = (arr: parmas, Id: string) => { if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
for (let i = 0; i < arr.length; i++) { getselectArray(j[props.childrenKey])
let j = arr[i]
if (j[props.nodeKey] == Id) {
if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
delItemitem(j[props.childrenKey])
} else {
keys.value.push(Id)
}
} else {
if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
delItemArray(j[props.childrenKey], Id)
}
}
} }
}
} }
let delItem = (Id: string, i: number) => { }
keys.value = [] let tickedTree = val => {
delItemArray(props.treeData, Id) if (props.showType === 0) {
tree.value.setTicked(keys.value, false) let filt = val.filter(e => e.slice(0, 1) == 2).length
selectArray.value.splice(i, 1) ctx.emit('getNum', filt)
} }
let goback = () => { setTimeout(() => {
ctx.emit('select', selectArray.value) selectArray.value = []
} getselectArray(props.treeData)
return { }, 100)
show, }
ticketArr, let delItemitem = (arr: parmas) => {
myFilterMethod, arr.map(x => {
filter, if (x[props.childrenKey] && x[props.childrenKey].length > 0) {
filterRef, delItemitem(x[props.childrenKey])
clearInput, } else {
tree, keys.value.push(x[props.nodeKey])
hideDialog, }
tickedTree, })
delItem, }
getselectArray, let delItemArray = (arr: parmas, Id: string) => {
selectArray, for (let i = 0; i < arr.length; i++) {
delItemArray, let j = arr[i]
delItemitem, if (j[props.nodeKey] == Id) {
showDialog, if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
goback delItemitem(j[props.childrenKey])
} else {
keys.value.push(Id)
}
} else {
if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
delItemArray(j[props.childrenKey], Id)
}
}
} }
}
let delItem = (Id: string, i: number) => {
keys.value = []
delItemArray(props.treeData, Id)
tree.value.setTicked(keys.value, false)
selectArray.value.splice(i, 1)
}
let goback = () => {
ctx.emit('select', selectArray.value)
}
return {
show,
ticketArr,
myFilterMethod,
filter,
filterRef,
clearInput,
tree,
hideDialog,
tickedTree,
delItem,
getselectArray,
selectArray,
delItemArray,
delItemitem,
showDialog,
goback
}
} }
} }
</script> </script>
<style scoped> <style scoped>
::-webkit-scrollbar { ::-webkit-scrollbar {
height: 7px; height: 7px;
width: 7px; width: 7px;
} }
::-webkit-scrollbar-thumb {
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 3px; border-radius: 3px;
background-color: #ddd; background-color: #ddd;
} }
::-webkit-scrollbar-track-piece {
::-webkit-scrollbar-track-piece {
background-color: #fff; background-color: #fff;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
} }
.list-title {
.list-title {
height: 50px; height: 50px;
padding-bottom: 10px; padding-bottom: 10px;
color: #606266; color: #606266;
...@@ -301,17 +282,20 @@ export default { ...@@ -301,17 +282,20 @@ export default {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.list-box {
.list-box {
height: 420px; height: 420px;
overflow-y: scroll; overflow-y: scroll;
} }
.list-item {
.list-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 3px 0 0 10px; padding: 3px 0 0 10px;
border-radius: 5px; border-radius: 5px;
height: 30px; height: 30px;
} }
</style>
\ No newline at end of file </style>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
reactive, reactive,
inject inject
} from 'vue' } from 'vue'
import customer2 from '@/api/customer2' import customer from '@/api/customer'
import massage from '@/utils/message' import massage from '@/utils/message'
import { import {
UploadSelfFile UploadSelfFile
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
msg.FileList.splice(i, 1) msg.FileList.splice(i, 1)
} }
const save = () => { const save = () => {
customer2.setCustomerTripFollowUpInfo(msg).then(res => { customer.setCustomerTripFollowUpInfo(msg).then(res => {
massage.successMsg(res.data.Message) massage.successMsg(res.data.Message)
msg.Remark = '' msg.Remark = ''
msg.ImageList = [] msg.ImageList = []
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import selectTree from '@/components/common/selectTree.vue' import selectTree from '@/components/common/selectTree.vue'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
// import { customerFieldtabsType } from '@/@types/customer' // import { customerFieldtabsType } from '@/@types/customer'
export default defineComponent({ export default defineComponent({
components: { draggable, selectTree }, components: { draggable, selectTree },
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
submitobj.InputType = '1' submitobj.InputType = '1'
} }
loading.value = true loading.value = true
customerService.setCustomerFiledInfo(submitobj).then((res) => { customerSetService.setCustomerFiledInfo(submitobj).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
console.log(res) console.log(res)
$q.notify({ $q.notify({
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</template> </template>
<script> <script>
import { defineComponent, ref, onMounted } from 'vue' import { defineComponent, ref, onMounted } from 'vue'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
export default defineComponent({ export default defineComponent({
props: { props: {
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
}) })
} }
const getLabelList = () => { const getLabelList = () => {
customerService.getLabelList({}).then((res) => { customerSetService.getLabelList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
LableList.value = res.data.Data LableList.value = res.data.Data
LableList.value.forEach(x => { LableList.value.forEach(x => {
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
watch, watch,
onMounted onMounted
} from 'vue' } from 'vue'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import labelgroup from './label-group.vue' import labelgroup from './label-group.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { import {
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
ctx.emit('update:addCondition', val) ctx.emit('update:addCondition', val)
} }
const getCustomerFiledList = () => { const getCustomerFiledList = () => {
customerService customerSetService
.getCustomerFiledList({ .getCustomerFiledList({
Enable: 1 Enable: 1
}) })
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
}) })
} }
const getCustomerStageList = () => { const getCustomerStageList = () => {
customerService.getCustomerStageList({}).then(res => { customerSetService.getCustomerStageList({}).then(res => {
let obj: params = { let obj: params = {
Id: '客户阶段', Id: '客户阶段',
Name: '客户阶段', Name: '客户阶段',
......
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import clueService, { ClueParams } from '@/api/clue' import clueService, { ClueParams } from '@/api/clue'
import { ColumnDefaultState } from '@/@types/enumHelper' import { ColumnDefaultState } from '@/@types/enumHelper'
...@@ -80,7 +80,7 @@ const ClueModule = () => { ...@@ -80,7 +80,7 @@ const ClueModule = () => {
colLoadingFinish: false colLoadingFinish: false
}) })
customerService customerSetService
.getCustomerFiledList({ .getCustomerFiledList({
Enable: 1 Enable: 1
}) })
......
...@@ -12,9 +12,9 @@ import { ...@@ -12,9 +12,9 @@ import {
ref, ref,
reactive reactive
} from 'vue' } from 'vue'
import customer2, { import customer, {
CutomerParams CutomerParams
} from '@/api/customer2' } from '@/api/customer'
interface Params { interface Params {
selectVal: string selectVal: string
selectWay: number selectWay: number
...@@ -47,7 +47,7 @@ interface dataParams { ...@@ -47,7 +47,7 @@ interface dataParams {
const CustomerModule = () => { const CustomerModule = () => {
//调用方法 //调用方法
const getCustomerList = (param: CutomerParams) => { const getCustomerList = (param: CutomerParams) => {
customer2.getCustomerList(param).then(res => { customer.getCustomerList(param).then(res => {
console.log(res, '数据') console.log(res, '数据')
if (res.data.Code == 1) { if (res.data.Code == 1) {
data.dataList = res.data.Data.PageData data.dataList = res.data.Data.PageData
...@@ -57,7 +57,7 @@ const CustomerModule = () => { ...@@ -57,7 +57,7 @@ const CustomerModule = () => {
} }
//调用获取下拉 //调用获取下拉
const getWayList = (param: any) => { const getWayList = (param: any) => {
customer2.getWayList(param).then(res => { customer.getWayList(param).then(res => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
data.WayList = res.data.Data data.WayList = res.data.Data
} }
...@@ -65,7 +65,7 @@ const CustomerModule = () => { ...@@ -65,7 +65,7 @@ const CustomerModule = () => {
} }
//获取员工数据 //获取员工数据
const getEmployeeData = (param: any) => { const getEmployeeData = (param: any) => {
customer2.getEmployeeData(param).then(res => { customer.getEmployeeData(param).then(res => {
data.EmployeeList = res.data.Data data.EmployeeList = res.data.Data
console.log(data, '员工数据') console.log(data, '员工数据')
// 重组唯一id // 重组唯一id
......
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer' import customerService from '@/api/customer'
import customerService2 from '@/api/customer2'
import router from '@/router/index' import router from '@/router/index'
import message from '@/utils/message' import message from '@/utils/message'
interface dataParams { interface dataParams {
...@@ -81,7 +81,7 @@ const editRuleModule = () => { ...@@ -81,7 +81,7 @@ const editRuleModule = () => {
} }
//获取线索详情 //获取线索详情
const getDetail = () => { const getDetail = () => {
customerService.getCustomerClueRuleDetail(msg()).then(res => { customerSetService.getCustomerClueRuleDetail(msg()).then(res => {
const d = res.data.Data const d = res.data.Data
data.editMsg.DeptList = d.DeptList data.editMsg.DeptList = d.DeptList
data.editMsg.EmpList = d.EmpList data.editMsg.EmpList = d.EmpList
...@@ -101,7 +101,7 @@ const editRuleModule = () => { ...@@ -101,7 +101,7 @@ const editRuleModule = () => {
} }
//获取部门数据 //获取部门数据
const getEmployeeData = () => { const getEmployeeData = () => {
customerService2.getEmployeeData({}).then(res => { customerService.getEmployeeData({}).then(res => {
console.log(res.data.Data, '部门') console.log(res.data.Data, '部门')
data.dataTree = res.data.Data data.dataTree = res.data.Data
// 重组唯一id // 重组唯一id
...@@ -128,7 +128,7 @@ const editRuleModule = () => { ...@@ -128,7 +128,7 @@ const editRuleModule = () => {
// const flag = condition.value.checkRule(data.editMsg.ConditionList) // const flag = condition.value.checkRule(data.editMsg.ConditionList)
// console.log(94, flag) // console.log(94, flag)
// if (!flag) return // if (!flag) return
customerService.setCustomerClueRuleInfo(data.editMsg).then(res => { customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
message.successMsg(res.data.Message) message.successMsg(res.data.Message)
setTimeout(() => { setTimeout(() => {
router.push({ router.push({
......
...@@ -13,11 +13,17 @@ ...@@ -13,11 +13,17 @@
开启后,员工领取公海客户时需要企微端设置的部门上级审批,审批同意后才可领取 开启后,员工领取公海客户时需要企微端设置的部门上级审批,审批同意后才可领取
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.PublicGetDept" false-value="-1" />以下部门允许领取公海客户 <q-toggle v-model="PublicGetDeptState" @update:model-value="ChangePublicGetDeptState" />以下部门允许领取公海客户
<q-btn color="primary" unelevated label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" :disable="!PublicGetDeptState" unelevated label="修改" size="xs" class="q-ml-lg"
@click="checkedPublicGetDept" />
</div> </div>
<div> <div>
<div v-for="item in items" :key="item.id">{{ item }}</div> <div v-for="(item,index) in data.PublicGetDeptList" :key="index" class="dept-item">
<div class="flex justify-center items-center">
<q-icon name="work" color="primary" />
<span class="q-ml-sm">{{ item.Name }}</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,8 +44,17 @@ ...@@ -38,8 +44,17 @@
<div class="collaborator-title">可操作员工:</div> <div class="collaborator-title">可操作员工:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海 <q-toggle v-model="AbandonDeptState" @update:model-value="ChangeAbandonDeptState" />以下部门允许将客户放弃到公海
<q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" :disable="!AbandonDeptState" label="修改" unelevated size="xs" class="q-ml-lg"
@click="checkedPublicGetDept" />
</div>
<div>
<div v-for="(item,index) in data.AbandonDeptList" :key="index" class="dept-item">
<div class="flex justify-center items-center">
<q-icon name="work" color="primary" />
<span class="q-ml-sm">{{ item.Name }}</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -60,37 +75,41 @@ ...@@ -60,37 +75,41 @@
<div class="AbandonReasonItem flex items-center">{{ element }}</div> <div class="AbandonReasonItem flex items-center">{{ element }}</div>
<n-popover trigger="hover"> <n-popover trigger="hover">
<template #trigger> <template #trigger>
<i class="iconfont icon-edit_light" style="font-size: 20px; color: #111" @click="editAbandonReason(element,index)"></i> <i class="iconfont icon-edit_light" style="font-size: 20px; color: #111"
@click="editAbandonReason(element,index)"></i>
</template> </template>
<span>编辑</span> <span>编辑</span>
</n-popover> </n-popover>
<n-popover trigger="hover"> <n-popover trigger="hover">
<template #trigger> <template #trigger>
<i class="iconfont icon-delete_light q-ml-md" style="font-size: 20px; color: #111"></i> <i class="iconfont icon-delete_light q-ml-md" style="font-size: 20px; color: #111"
@click="delAbandonReaso(index)"></i>
</template> </template>
<span>删除</span> <span>删除</span>
</n-popover> </n-popover>
</div> </div>
</template> </template>
</draggable> </draggable>
<div class="flex items-center q-pl-sm"> <div class="flex items-center q-pl-sm q-mt-md">
<q-btn color="primary" label="添加" unelevated class="q-ml-lg q-mr-md" @click="AbandonReasonDialog=true" /> <q-btn color="primary" label="添加" unelevated class="q-ml-lg q-mr-md" @click="addAbandonReason" />
已设/可设上限:{{data.AbandonReasonList.length}}/10</div> 已设/可设上限:{{data.AbandonReasonList.length}}/10</div>
<q-dialog v-model="AbandonReasonDialog"> <q-dialog v-model="AbandonReasonDialog">
<q-card> <q-card>
<q-card-section class="row items-center q-pb-none"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">添加</div> <div class="text-h6" v-if="AbandonReasonType==0">添加</div>
<div class="text-h6" v-if="AbandonReasonType==1">编辑</div>
<q-space /> <q-space />
<q-btn icon="close" flat round dense v-close-popup /> <q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-card-section class="q-py-lg" style="width: 460px;max-width: 600px;"> <q-card-section class="q-py-lg" style="width: 460px;max-width: 600px;">
<n-input maxlength="10" size="large" v-model:value="AbandonReasonText" show-count clearable placeholder="请输入放弃原因"/> <n-input maxlength="10" size="large" v-model:value="AbandonReasonText" show-count clearable
placeholder="请输入放弃原因" />
</q-card-section> </q-card-section>
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn flat label="取消" color="primary" v-close-popup /> <q-btn flat label="取消" color="primary" v-close-popup />
<q-btn unelevated label="确定" color="primary" v-close-popup /> <q-btn unelevated label="确定" color="primary" @click="saveAbandonReason" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -207,7 +226,7 @@ ...@@ -207,7 +226,7 @@
</div> </div>
</div> </div>
</div> </div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1" <departmentStaff v-model="showDptDialog" :defaultArray="DptDataTreeDefault" nodeKey="DeptId"
labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" /> labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
</div> </div>
</template> </template>
...@@ -219,11 +238,19 @@ ...@@ -219,11 +238,19 @@
defineComponent, defineComponent,
onMounted onMounted
} from 'vue' } from 'vue'
import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer' import customerService from '@/api/customer'
// import customerService2 from '@/api/customer2'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
import requestGroup from '@/components/customer/request-group.vue' import requestGroup from '@/components/customer/request-group.vue'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import message from '@/utils/message'
interface dataParams {
data: {
AbandonReasonList: string[]
[key: string]: any
}
[key: string]: any
}
export default defineComponent({ export default defineComponent({
components: { components: {
departmentStaff, departmentStaff,
...@@ -269,36 +296,44 @@ ...@@ -269,36 +296,44 @@
} }
]) ])
let curItem = ref(1) let curItem = ref(1)
let data = reactive({ let data = reactive < dataParams > ({
data: { data: {
IsPublicAudit: 1, IsPublicAudit: 1,
PublicGetDept: -1, PublicGetDept: -1,
AbandonType: 1 AbandonType: 1,
AbandonAudit: 0,
AbandonReasonList: [],
}, },
PublicGetDeptState: false, //以下部门允许领取公海客户
AbandonDeptState: false, //以下部门允许将客户放弃到公海
showDptDialog: false, showDptDialog: false,
AbandonReasonDialog: false, //放弃原因弹窗 AbandonReasonDialog: false, //放弃原因弹窗
AbandonReasonText:"",//放弃原因 AbandonReasonText: "", //放弃原因
AbandonReasonIndex:0,//放弃原因index AbandonReasonIndex: 0, //放弃原因index
AbandonReasonType:0,// 修改类型 0:新增,1:编辑 AbandonReasonType: 0, // 修改类型 0:新增,1:编辑
defaultDpt: [], DptDataTree: [],
DptDataTree: [] DptDataTreeDefault: [], //部门默认值
}) })
const changeActive = item => { const changeActive = item => {
curItem.value = item.Id curItem.value = item.Id
} }
//获取客户操作配置
const getConfig = () => { const getConfig = () => {
customerService.getCustomerConfig({}).then(res => { customerSetService.getCustomerConfig({}).then(res => {
console.log('CONFIG', res.data.Data) console.log('CONFIG', res.data.Data)
data.data = res.data.Data data.data = res.data.Data
if (data.data.PublicGetDept == -1) {
data.PublicGetDeptState = false
} else {
data.PublicGetDeptState = true
}
}) })
} }
const getDptTree = () => { const getDptTree = () => {
customerService.getDeptTree({}).then(res => { customerService.getEmployeeData({}).then(res => {
console.log('DptDataTree', res.data.Data)
data.DptDataTree = res.data.Data data.DptDataTree = res.data.Data
// 重组唯一id if (data.dataTree.length == 0) return
if (data.DptDataTree.length == 0) return data.DptDataTree.forEach(x => {
data.DptDataTree.forEach((x: any) => {
x.newId = x.DataType + '-' + x.DeptId x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) { if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList) getChildList(x.ChildList)
...@@ -314,27 +349,79 @@ ...@@ -314,27 +349,79 @@
} }
}) })
} }
const getdpt = val => { //保存客户操作配置
console.log('dpt', val) const setCustomerConfig = () => {
customerSetService.setCustomerConfig(data.data).then(res => {
console.log('set', res.data.Data)
})
} }
//领取公海客户 //部门弹窗
const checkedPublicGetDept = () => { const checkedPublicGetDept = () => {
data.showDptDialog = true data.showDptDialog = true
if (curItem.value === 1) {
data.DptDataTreeDefault = data.data.PublicGetDept.split(',')
} else if (curItem.value === 2) {
data.DptDataTreeDefault = data.data.AbandonDept.split(',')
}
} }
const setCustomerConfig = () => { const getdpt = val => {
customerService.setCustomerConfig(data.data).then(res => { data.showDptDialog = false
console.log('set', res.data.Data) const ids = val.map(e => e.Id).toString()
}) const dept = JSON.parse(JSON.stringify(val))
if (curItem.value === 1) {
data.data.PublicGetDept = ids
data.data.PublicGetDeptList = dept
}
if (curItem.value === 2) {
data.data.AbandonDept = ids
data.data.AbandonDeptList = dept
}
console.log('dpt', ids)
}
//以下部门允许领取公海客户
const ChangePublicGetDeptState = (val) => {
if (!val) {
data.data.PublicGetDept = '-1'
}
}
//以下部门允许将客户放弃到公海
const ChangeAbandonDeptState = (val) => {
if (!val) {
data.data.AbandonDept = '-1'
}
} }
const editAbandonReason=(val,index)=>{ //新增放弃原因
data.AbandonReasonDialog=true const addAbandonReason = () => {
data.AbandonReasonText=val, data.AbandonReasonDialog = true
data.AbandonReasonIndex=index data.AbandonReasonText = '',
console.log(332,val,index) data.AbandonReasonIndex = 0
data.AbandonReasonType = 0
} }
const changeAbandonReason=()=>{ //修改放弃原因
// data.data.AbandonReasonList[data.] const editAbandonReason = (val, index) => {
// console.log(332,val,index) data.AbandonReasonDialog = true
data.AbandonReasonText = val,
data.AbandonReasonIndex = index
data.AbandonReasonType = 1
}
//保存放弃原因
const saveAbandonReason = () => {
if (!data.AbandonReasonText) {
message.warnMsg('不能为空')
return
}
if (data.AbandonReasonType === 0) {
data.data.AbandonReasonList.push(data.AbandonReasonText)
} else {
data.data.AbandonReasonList[data.AbandonReasonIndex] = data.AbandonReasonText
}
data.AbandonReasonDialog = false
data.AbandonReasonText = ''
}
// 删除放弃原因
const delAbandonReaso = (index) => {
data.data.AbandonReasonList.splice(index, 1)
} }
onMounted(() => { onMounted(() => {
getDptTree() getDptTree()
...@@ -348,8 +435,12 @@ ...@@ -348,8 +435,12 @@
getdpt, getdpt,
checkedPublicGetDept, checkedPublicGetDept,
setCustomerConfig, setCustomerConfig,
addAbandonReason,
editAbandonReason, editAbandonReason,
changeAbandonReason saveAbandonReason,
delAbandonReaso,
ChangePublicGetDeptState,
ChangeAbandonDeptState,
} }
} }
}) })
...@@ -412,4 +503,19 @@ ...@@ -412,4 +503,19 @@
white-space: nowrap; white-space: nowrap;
} }
.dept-item {
border: 1px solid #e1f3d8;
background-color: #f0f9eb;
color: #67c23a;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
height: 32px;
line-height: 32px;
border-radius: 3px;
padding: 0 14px;
margin: 6px;
}
</style> </style>
...@@ -195,7 +195,7 @@ import { ...@@ -195,7 +195,7 @@ import {
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { Dialog } from 'quasar' import { Dialog } from 'quasar'
import message from '@/utils/message' import message from '@/utils/message'
import customerService from '@/api/customer'; import customerSetService from '@/api/customerSet';
import router from '@/router/index' import router from '@/router/index'
interface dataType { interface dataType {
...@@ -242,7 +242,7 @@ export default defineComponent({ ...@@ -242,7 +242,7 @@ export default defineComponent({
const getClueList = () => { const getClueList = () => {
defaultData.value = [] defaultData.value = []
data.value = [] data.value = []
customerService.getCustomerClueRuleList({}).then(res => { customerSetService.getCustomerClueRuleList({}).then(res => {
res.data.Data.map((item: dataType) => { res.data.Data.map((item: dataType) => {
if (item.IsDefault === 1) { if (item.IsDefault === 1) {
defaultData.value.push(item) defaultData.value.push(item)
...@@ -257,7 +257,7 @@ export default defineComponent({ ...@@ -257,7 +257,7 @@ export default defineComponent({
ClueAllotWay: 1,// 1依次轮流 2随机分配 ClueAllotWay: 1,// 1依次轮流 2随机分配
}) })
const getCustomerClueRuleConfig = () => { const getCustomerClueRuleConfig = () => {
customerService.getCustomerClueRuleConfig({}).then(res => { customerSetService.getCustomerClueRuleConfig({}).then(res => {
let data = res.data.Data let data = res.data.Data
configMsg.ClueType = data.ClueType configMsg.ClueType = data.ClueType
configMsg.ClueAllotWay = data.ClueAllotWay configMsg.ClueAllotWay = data.ClueAllotWay
...@@ -287,13 +287,13 @@ export default defineComponent({ ...@@ -287,13 +287,13 @@ export default defineComponent({
}) })
} }
const configChange = () => { const configChange = () => {
customerService.setCustomerClueRuleConfig(configMsg).then(res => { customerSetService.setCustomerClueRuleConfig(configMsg).then(res => {
console.log(228, res.data) console.log(228, res.data)
}) })
} }
const setState = (msg) => { const setState = (msg) => {
customerService.setCustomerClueRuleState(msg).then(res => { customerSetService.setCustomerClueRuleState(msg).then(res => {
message.successMsg(res.data.Message) message.successMsg(res.data.Message)
if (msg.Type == 2) { if (msg.Type == 2) {
getClueList() getClueList()
......
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, onMounted, } from 'vue' import { defineComponent, ref, onMounted, } from 'vue'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import { customerFieldlistType, customerFieldaddMsgType, customerFieldtabsType } from '@/@types/customer' import { customerFieldlistType, customerFieldaddMsgType, customerFieldtabsType } from '@/@types/customer'
import addfield from '../../../components/customer/addfield.vue' import addfield from '@/components/customer/addfield.vue'
export default defineComponent({ export default defineComponent({
components: { draggable, addfield }, components: { draggable, addfield },
setup() { setup() {
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
} }
) )
const changePage = () => { const changePage = () => {
customerService.getCustomerFiledList({ Enable: -1 }).then((res) => { customerSetService.getCustomerFiledList({ Enable: -1 }).then((res) => {
data.value = res.data.Data data.value = res.data.Data
}) })
} }
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
FiledId: dragId.value, FiledId: dragId.value,
SortFiledId: olddragId, SortFiledId: olddragId,
} }
customerService.setCustomerFiledState(msg).then((res) => { customerSetService.setCustomerFiledState(msg).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
console.log(res) console.log(res)
} else {//如果移动失败 重新获取列表 } else {//如果移动失败 重新获取列表
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
FiledId: item.Id, FiledId: item.Id,
SortFiledId: 0, SortFiledId: 0,
} }
customerService.setCustomerFiledState(msg).then((res) => { customerSetService.setCustomerFiledState(msg).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
$q.notify({ $q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
}); });
} }
const getCustomerFieldType = () => { const getCustomerFieldType = () => {
customerService.getCustomerFieldTypeEnumList({}).then((res) => { customerSetService.getCustomerFieldTypeEnumList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
tabsList.value = res.data.Data tabsList.value = res.data.Data
tabsList.value.forEach(x => { tabsList.value.forEach(x => {
...@@ -224,14 +224,14 @@ ...@@ -224,14 +224,14 @@
} }
} }
const getDepartList = () => { const getDepartList = () => {
customerService.getDeptTree({ School_Id: 0 }).then((res) => { customerSetService.getDeptTree({ School_Id: 0 }).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
deptl.value = res.data.Data deptl.value = res.data.Data
} }
}) })
} }
const getFieldInputType = () => { const getFieldInputType = () => {
customerService.getCustomerFieldInputTypeEnumList({}).then((res) => { customerSetService.getCustomerFieldInputTypeEnumList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
checkboxList.value = res.data.Data checkboxList.value = res.data.Data
} }
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, reactive } from 'vue' import { defineComponent, onMounted, reactive } from 'vue'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import router from '@/router/index' import router from '@/router/index'
...@@ -131,7 +131,7 @@ export default defineComponent({ ...@@ -131,7 +131,7 @@ export default defineComponent({
data: [], data: [],
}) })
const getList = () => { const getList = () => {
customerService.getCustomerStageFlowList({ Enable: 0 }).then((res) => { customerSetService.getCustomerStageFlowList({ Enable: 0 }).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
state.data = res.data.Data state.data = res.data.Data
} else {//如果移动失败 重新获取列表 } else {//如果移动失败 重新获取列表
...@@ -161,7 +161,7 @@ export default defineComponent({ ...@@ -161,7 +161,7 @@ export default defineComponent({
Type: Type, Type: Type,
FlowId: Id, FlowId: Id,
} }
customerService.setCustomerStageFlowState(msg).then((res) => { customerSetService.setCustomerStageFlowState(msg).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
$q.notify({ $q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
...@@ -282,7 +282,7 @@ export default defineComponent({ ...@@ -282,7 +282,7 @@ export default defineComponent({
selectindex:0, selectindex:0,
}) })
const getList = () => { const getList = () => {
customerService.getWeChatLableList({}).then((res) => { customerSetService.getWeChatLableList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
data.dataList = res.data.Data; data.dataList = res.data.Data;
data.SelectID = data.dataList[data.selectindex].Id data.SelectID = data.dataList[data.selectindex].Id
...@@ -369,7 +369,7 @@ export default defineComponent({ ...@@ -369,7 +369,7 @@ export default defineComponent({
} }
} }
const setlable = (msg: any) => { const setlable = (msg: any) => {
customerService.setWeChatLable(msg).then((res) => { customerSetService.setWeChatLable(msg).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
$q.notify({ $q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -406,7 +406,7 @@ export default defineComponent({ ...@@ -406,7 +406,7 @@ export default defineComponent({
flat: true, flat: true,
} }
}).onOk(() => { }).onOk(() => {
customerService.delWeChatLable({ LableId: Id }).then((res) => { customerSetService.delWeChatLable({ LableId: Id }).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
$q.notify({ $q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
......
...@@ -160,9 +160,9 @@ ...@@ -160,9 +160,9 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, reactive, } from 'vue' import { defineComponent, onMounted, reactive, } from 'vue'
import router from '@/router/index' import router from '@/router/index'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
import customerService2 from '@/api/customer2' import customerService from '@/api/customer'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
...@@ -202,7 +202,7 @@ export default defineComponent({ ...@@ -202,7 +202,7 @@ export default defineComponent({
} }
const getList = () => { const getList = () => {
customerService.getCustomerStageList({}).then((res) => { customerSetService.getCustomerStageList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
state.StageList = res.data.Data; state.StageList = res.data.Data;
state.gettypeoneList = [] state.gettypeoneList = []
...@@ -300,7 +300,7 @@ export default defineComponent({ ...@@ -300,7 +300,7 @@ export default defineComponent({
} else { } else {
data.InvalidCause = '' data.InvalidCause = ''
} }
customerService.setCustomerStageFlowInfo(data).then(res => { customerSetService.setCustomerStageFlowInfo(data).then(res => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
$q.notify({ $q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -321,7 +321,7 @@ export default defineComponent({ ...@@ -321,7 +321,7 @@ export default defineComponent({
} }
let getEmployeeData = () => { let getEmployeeData = () => {
customerService2.getEmployeeData({}).then(res => { customerService.getEmployeeData({}).then(res => {
state.dataTree = res.data.Data state.dataTree = res.data.Data
// 重组唯一id // 重组唯一id
if (state.dataTree.length == 0) return if (state.dataTree.length == 0) return
...@@ -346,7 +346,7 @@ export default defineComponent({ ...@@ -346,7 +346,7 @@ export default defineComponent({
state.showDialog = false state.showDialog = false
} }
let getdetails = (Id: number) => { let getdetails = (Id: number) => {
customerService.getCustomerStageFlowInfo({ FlowId: Id }).then(res => { customerSetService.getCustomerStageFlowInfo({ FlowId: Id }).then(res => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
state.addMsg = res.data.Data state.addMsg = res.data.Data
if (state.addMsg.UseStage.length != '') { if (state.addMsg.UseStage.length != '') {
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, reactive, ref } from 'vue' import { defineComponent, onMounted, reactive, ref } from 'vue'
import router from '@/router/index' import router from '@/router/index'
import customerService from '@/api/customer' import customerSetService from '@/api/customerSet'
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
...@@ -178,7 +178,7 @@ export default defineComponent({ ...@@ -178,7 +178,7 @@ export default defineComponent({
} }
const getList = () => { const getList = () => {
customerService.getCustomerStageList({}).then((res) => { customerSetService.getCustomerStageList({}).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
state.addMsg = res.data.Data state.addMsg = res.data.Data
state.followupStage = []; state.followupStage = [];
...@@ -235,7 +235,7 @@ export default defineComponent({ ...@@ -235,7 +235,7 @@ export default defineComponent({
} }
const getStageDel = (Id: number, index: number) => { const getStageDel = (Id: number, index: number) => {
if (Id > 0) {//判断是否是新加 if (Id > 0) {//判断是否是新加
customerService.validataCustomerStageDel({ StageId: Id }).then((res) => { customerSetService.validataCustomerStageDel({ StageId: Id }).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
if (res.data.Data.UseState == false) {//可以删除 if (res.data.Data.UseState == false) {//可以删除
state.followupStage.splice(index, 1) state.followupStage.splice(index, 1)
...@@ -264,7 +264,7 @@ export default defineComponent({ ...@@ -264,7 +264,7 @@ export default defineComponent({
} }
if (Id > 0) { if (Id > 0) {
customerService.validataCustomerCauseDel(data).then((res) => { customerSetService.validataCustomerCauseDel(data).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
if (res.data.Data.UseState == false) {//可以删除 if (res.data.Data.UseState == false) {//可以删除
state.reasonList[y].OptionsList.splice(index, 1) state.reasonList[y].OptionsList.splice(index, 1)
...@@ -330,7 +330,7 @@ export default defineComponent({ ...@@ -330,7 +330,7 @@ export default defineComponent({
x.Sort = i + 1 x.Sort = i + 1
}) })
state.loading = true state.loading = true
customerService.setCustomerStageInfo(state.addMsg).then((res) => { customerSetService.setCustomerStageInfo(state.addMsg).then((res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
state.loading = false state.loading = false
$q.notify({ $q.notify({
......
...@@ -20,7 +20,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -20,7 +20,7 @@ const routes: RouteRecordRaw[] = [
// 客户设置 // 客户设置
{ {
path: '/customerSetup', path: '/customerSetup',
component: () => import('@/pages/customer/customerSetup.vue') component: () => import('@/pages/customerManage/customerSet/customerSetup.vue')
}, },
//客户 //客户
{ {
...@@ -39,17 +39,16 @@ const routes: RouteRecordRaw[] = [ ...@@ -39,17 +39,16 @@ const routes: RouteRecordRaw[] = [
path: '/editor/editRule', path: '/editor/editRule',
component: () => import('@/pages/editor/editRule.vue') component: () => import('@/pages/editor/editRule.vue')
}, },
// 编辑阶段规则 // 编辑阶段规则
{ {
path: '/editor/manageStageRange', path: '/editor/manageStageRange',
component: () => import('@/pages/editor/manageStageRange.vue') component: () => import('@/pages/editor/manageStageRange.vue')
}, },
// 创建阶段 // 创建阶段
{ {
path: '/editor/createStageRange', path: '/editor/createStageRange',
component: () => import('@/pages/editor/createStageRange.vue') component: () => import('@/pages/editor/createStageRange.vue')
}, },
{ {
path: '/auth/login', path: '/auth/login',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment