Commit 8b4792ef authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/xiangwei/horse

parents adeaec46 5a14069d
......@@ -14,10 +14,9 @@
"@types/lockr": "^0.8.7",
"@types/lodash": "^4.14.175",
"@types/webpack-env": "^1.16.2",
"ant-design-vue": "^2.2.8",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"element-plus": "^1.2.0-beta.3",
"dayjs": "^1.10.7",
"katex": "^0.13.18",
"lockr": "^0.9.0-beta.0",
"lodash": "^4.17.21",
......
......@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp', 'antDesign','naiveUI'],
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp','naiveUI'],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: ['app.scss','svg.scss'],
......
......@@ -10,6 +10,6 @@ export default defineComponent({
</script>
<style lang="sass">
@import url('./css/font.sass')
@import url('//at.alicdn.com/t/font_2930340_5n2w0eo4056.css')
@import url('//at.alicdn.com/t/font_2930340_at4xv6vjdh.css')
@import url('./css/table.sass')
</style>
......@@ -4,18 +4,35 @@
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
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 //查询条件
}
/**
......@@ -23,215 +40,87 @@ interface IdName {
* @todo Get the exchange rate of the current currency
*/
class customerService {
// 获取客户字段列表
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', {
class CustomerService {
// 获取用户列表数据
static async getCustomerList(data: CutomerParams): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerInfoPageList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户线索配置
static async getCustomerClueRuleConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleConfig', {
//获取途径下拉数据
static async getWayList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerAddWayEnumList', {
method: 'post',
responseType: 'json',
data
})
}
// 设置客户线索配置
static async setCustomerClueRuleConfig(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueRuleConfig', {
//获取部门-员工下拉数据
static async getEmployeeData(data: any): Promise<HttpResponse> {
return Axios('/User/GetEmployeeAddrBook', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户线索规则列表
static async getCustomerClueRuleList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerClueRuleList', {
//获取员工详情数据
static async getCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerInfo', {
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> {
//获取客户阶段下拉数据
static async getCustomStageList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerStageList', {
method: 'post',
responseType: 'json',
data
})
}
// 获取客户子段类型枚举
static async getCustomerFieldTypeEnumList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldTypeEnumList', {
//保存客户资料
static async saveCustomInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerInfo', {
method: 'post',
responseType: 'json',
data
})
}
// 获取部门树形列表
static async getDeptTree(data: any): Promise<HttpResponse> {
return Axios('/User/GetDeptTree', {
//保存客户标签
static async saveCustomLabel(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerLabelBatch', {
method: 'post',
responseType: 'json',
data
})
}
// 获取部门树形列表
static async getCustomerFieldInputTypeEnumList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerFieldInputTypeEnumList', {
//获取客户旅程类型枚举列表
static async getCustomerTripType(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerTripTypeEnumList', {
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', {
//获取客户旅程分页列表
static async getCustomerTripPage(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerTripPageList', {
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', {
//新增客户跟进记录
static async setCustomerTripFollowUpInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerTripFollowUpInfo', {
method: 'post',
responseType: 'json',
data
})
}
}
export default customerService
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 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
import { boot } from 'quasar/wrappers'
import Antd from 'ant-design-vue'
// import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'ant-design-vue/dist/antd.css'
export default boot(({ app }) => {
// Set Antd instance on app
app.use(Antd)
// app.use(ElementPlus)
})
import { boot } from 'quasar/wrappers'
import naive from 'naive-ui'
export default boot(({ app }) => {
// Set naive instance on app
app.use(naive)
......
......@@ -514,7 +514,7 @@ import {
} from 'vue'
import { DownLoadFileByUrl } from '@/utils/upload'
import message from '@/utils/message'
import customer2 from '@/api/customer2'
import customer from '@/api/customer'
import labelgroup from '@/components/customer/label-group.vue'
import fileUpload from '@/components/common/fileUpload.vue'
......@@ -576,7 +576,7 @@ export default {
})
//获取详情数据
const getCustomInfo = (param: msgParam) => {
customer2.getCustomInfo(param).then(res => {
customer.getCustomInfo(param).then(res => {
data.dataList = res.data.Data;
data.FiledDetailList = res.data.Data.FiledDetailList;
data.FiledDetailList.forEach(x => {
......@@ -596,7 +596,7 @@ export default {
}
//获取客户阶段下拉
const getCustomStage = (param) => {
customer2.getCustomStageList(param).then(res => {
customer.getCustomStageList(param).then(res => {
data.customData = res.data.Data;
})
}
......@@ -623,7 +623,7 @@ export default {
} else {
cutomMsg.Value = e.Value;
}
customer2.saveCustomInfo(cutomMsg).then(res => {
customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg);
message.successMsg(res.data.Message);
})
......@@ -635,7 +635,7 @@ export default {
cutomMsg.CustomerId = msg.CustomerId;
cutomMsg.Type = 1;
cutomMsg.CustomId = 0;
customer2.saveCustomInfo(cutomMsg).then(res => {
customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg);
data.isShowEdit = false;
message.successMsg(res.data.Message);
......@@ -680,14 +680,14 @@ export default {
ckedArr.push(x.Id);
})
labelMsg.LableIds = ckedArr.toString();
customer2.saveCustomLabel(labelMsg).then(res => {
customer.saveCustomLabel(labelMsg).then(res => {
getCustomInfo(msg);
message.successMsg(res.data.Message);
})
}
//获取客户旅程类型
const getCustomerTripType = (param: any) => {
customer2.getCustomerTripType(param).then(res => {
customer.getCustomerTripType(param).then(res => {
console.log(res, 'trip数据');
data.tripTypeArr = res.data.Data;
let Obj = {
......@@ -706,7 +706,7 @@ export default {
}
//获取客户旅程分页列表
const getCustomerPage = () => {
customer2.getCustomerTripPage(customTripMsg).then(res => {
customer.getCustomerTripPage(customTripMsg).then(res => {
console.log(res, '旅程分页数据');
data.tripDataList = res.data.Data.PageData;
data.TripPageCount = res.data.Data.PageCount;
......
<template>
<q-dialog
v-model="show"
class="col-6"
persistent
transition-show="scale"
transition-hide="scale"
@show="showDialog"
@hide="hideDialog"
>
<q-card style="width: 600px;height:600px; max-width: 80vw;">
<q-dialog v-model="show" class="col-6" persistent transition-show="scale" transition-hide="scale" @show="showDialog"
@hide="hideDialog">
<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>
<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;">
<div class="row" style="height:100%;">
<div class="col-6 q-px-sm" style="border-right:1px solid #999;height:100%;">
<q-input
color="teal"
dense
outlined
placeholder="请输入"
v-model="filter"
style="margin-bottom:10px"
clearable
@clear="clearInput"
>
<q-card-section class="q-pt-none" style="height: 480px">
<div class="row" style="height: 100%">
<div class="col-6 q-px-sm" style="border-right: 1px solid #999; height: 100%">
<q-input color="teal" dense outlined placeholder="请输入" v-model="filter" style="margin-bottom: 10px"
clearable @clear="clearInput">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-tree
style="height:calc(100% - 50px);overflow-y:scroll"
ref="tree"
class="col-12"
:nodes="treeData"
: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"
/>
<q-tree style="height: calc(100% - 50px); overflow-y: scroll" ref="tree" class="col-12" :nodes="treeData"
: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="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 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'"
/>
<q-icon name="work" color="primary" v-if="item.Type == '1'" />
<q-icon name="person" color="accent" v-if="item.Type == '2'" />
<span class="q-ml-sm">{{ item.Name }}</span>
</div>
<q-icon name="cancel" @click="delItem(item.Id, index)"></q-icon>
......@@ -81,17 +46,20 @@
</q-dialog>
</template>
<script lang="ts">
import { ref,watch } from 'vue'
import {
ref,
watch
} from 'vue'
interface parmas {
interface parmas {
[key: string]: any
}
interface SelectParams {
Id: string,
Name: string,
}
interface SelectParams {
Id: string
Name: string
Type: number
}
export default {
}
export default {
props: {
modelValue: {
type: Boolean,
......@@ -104,7 +72,7 @@ export default {
required: true
},
showType: {
type: Number,//0:显示部门和员工,1:只显示部门
type: Number, //0:显示部门和员工,1:只显示部门
default: 0
},
//是否默认展开
......@@ -116,11 +84,11 @@ export default {
defaultArray: {
type: Array,
default: () => [],
required: true,
required: true
},
//节点Key
nodeKey: {
type: String,//格式需拼成 '类型-名字-id'的形式
type: String, //格式需拼成 '类型-名字-id'的形式
default: 'id'
},
//节点名称
......@@ -136,23 +104,26 @@ export default {
strategy: {
type: String,
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 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)
ctx.emit('update:modelValue', false)
}
let filter = ref('')
const filterRef = ref<any>(null)
const filterRef = ref < any > (null)
// 过滤树形列表
const myFilterMethod = (node, filter) => {
const filt = filter.toLowerCase()
......@@ -162,11 +133,12 @@ export default {
filter.value = ''
}
// 有默认值-----start-------
let flag=true
let flag = true
let initDefault = () => {
selectArray.value = []
if (props.defaultArray && props.defaultArray.length > 0&&flag) {
props.defaultArray.map((e) => {
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) {
......@@ -177,13 +149,16 @@ export default {
} else {
ticketArr.value.push(e)
}
})
flag=false
flag = false
} else {
ticketArr.value = JSON.parse(JSON.stringify(props.defaultArray))
console.log('默认值',ticketArr.value)
}
}
}
let findChild = (arr: Array<parmas>) => {
let findChild = (arr: Array < parmas > ) => {
arr.map(e => {
if (e[props.childrenKey] && e[props.childrenKey].length > 0) {
findChild(e[props.childrenKey])
......@@ -191,7 +166,6 @@ export default {
ticketArr.value.push(e.DataType + '-' + e.DeptId)
}
})
}
// 有默认值----end--------
......@@ -205,7 +179,11 @@ export default {
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 })
selectArray.value.push({
Id: j[props.nodeKey],
Name: j.DeptName,
Type: j.DataType
})
} else {
if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
getselectArray(j[props.childrenKey])
......@@ -213,14 +191,15 @@ export default {
}
}
}
let tickedTree = (val) => {
let tickedTree = val => {
if (props.showType === 0) {
let filt = val.filter(e => e.slice(0, 1) == 2).length
ctx.emit('getNum', filt)
}
setTimeout(() => {
selectArray.value = []
getselectArray(props.treeData)
}, 100)
}
let delItemitem = (arr: parmas) => {
arr.map(x => {
......@@ -240,7 +219,6 @@ export default {
} else {
keys.value.push(Id)
}
} else {
if (j[props.childrenKey] && j[props.childrenKey].length > 0) {
delItemArray(j[props.childrenKey], Id)
......@@ -274,26 +252,29 @@ export default {
delItemitem,
showDialog,
goback
}
}
}
}
</script>
<style scoped>
::-webkit-scrollbar {
::-webkit-scrollbar {
height: 7px;
width: 7px;
}
::-webkit-scrollbar-thumb {
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 3px;
background-color: #ddd;
}
::-webkit-scrollbar-track-piece {
}
::-webkit-scrollbar-track-piece {
background-color: #fff;
-webkit-border-radius: 12px;
}
.list-title {
}
.list-title {
height: 50px;
padding-bottom: 10px;
color: #606266;
......@@ -301,17 +282,20 @@ export default {
box-sizing: border-box;
display: flex;
align-items: center;
}
.list-box {
}
.list-box {
height: 420px;
overflow-y: scroll;
}
.list-item {
}
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 0 0 10px;
border-radius: 5px;
height: 30px;
}
}
</style>
......@@ -8,16 +8,16 @@
<q-input v-model="msg.Remark" maxlength="1000" type="textarea" placeholder="请填写跟进记录" />
<div class="file_box">
<div class="img_list">
<div v-for="(e,i) in msg.ImageList" :key="i" class="img_box">
<div v-for="(e, i) in msg.ImageList" :key="i" class="img_box">
<img :src="e" class="img" />
<q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)"/>
<q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)" />
</div>
</div>
<div class="file_list">
<div v-for="(e,i) in msg.FileList" :key="i" class="flex items-center file_box">
<div v-for="(e, i) in msg.FileList" :key="i" class="flex items-center file_box">
<div class="flex items-center">
附件:
<span style="color:#333">{{ e.FileName }}</span>
<span style="color: #333">{{ e.FileName }}</span>
({{ e.size }})
</div>
<div class="del_btn" @click="delFile(i)">删除</div>
......@@ -25,40 +25,23 @@
</div>
</div>
<div class="file_Space">
<div style="display:flex;align-items:center;">
<div style="display: flex; align-items: center">
<div>
<a-upload
accept="image/*"
v-model:file-list="data.imageList"
name="file"
:multiple="true"
:show-upload-list="false"
:customRequest="customUploadImg"
>
<i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i>
</a-upload>
<n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.imageList"
:custom-request="customUploadImg">
<i style="font-size: 25px; cursor: pointer" class="iconfont icon-picture"></i>
</n-upload>
</div>
<div style="margin-left:8px;">
<a-upload
v-model:file-list="data.fileList"
name="file"
:multiple="true"
:show-upload-list="false"
:customRequest="customUploadFile"
>
<i style="font-size:20px;cursor:pointer;" class="iconfont icon-paperclip"></i>
</a-upload>
<div style="margin-left: 8px">
<n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.fileList"
:custom-request="customUploadFile">
<i style="font-size: 20px; cursor: pointer" class="iconfont icon-paperclip"></i>
</n-upload>
</div>
</div>
<div>
<q-btn
color="myInput"
text-color="#000"
size="sm"
@click="data.isShowEdit = false"
label="取消"
/>
<q-btn color="primary" style="margin-left:10px;" size="sm" @click="save" label="确定" />
<q-btn color="myInput" text-color="#000" size="sm" @click="data.isShowEdit = false" label="取消" />
<q-btn color="primary" style="margin-left: 10px" size="sm" @click="save" label="确定" />
</div>
</div>
</div>
......@@ -66,52 +49,59 @@
</div>
</template>
<script lang="ts">
import {
import {
reactive,
inject
} from 'vue'
import customer2 from '@/api/customer2'
import massage from "@/utils/message"
import { UploadSelfFile } from '@/utils/upload'
interface dataParam {
} from 'vue'
import customer from '@/api/customer'
import massage from '@/utils/message'
import {
UploadSelfFile
} from '@/utils/upload'
interface dataParam {
[key: string]: any
}
export default {
setup(props,ctx) {
let msg = reactive<dataParam>({
}
export default {
setup(props, ctx) {
let msg = reactive < dataParam > ({
CustomerId: inject('CustomerId'),
Remark: "",
Remark: '',
ImageList: [],
FileList: []
})
const data = reactive<dataParam>({
const data = reactive < dataParam > ({
isShowEdit: false,
fileList: [],
imageList: []
})
let customUploadImg = (file) => {
UploadSelfFile('/horse', file.file, (res) => {
msg.ImageList.push(res.FileUrl )
let customUploadImg = file => {
console.log(82,file)
UploadSelfFile('/horse', file.file.file, res => {
msg.ImageList.push(res.FileUrl)
})
}
let customUploadFile = (file) => {
UploadSelfFile('/horse', file.file, (res) => {
msg.FileList.push({ FileName: res.FileName, FileUrl: res.FileUrl, size: res.Size })
let customUploadFile = file => {
UploadSelfFile('/horse', file.file.file, res => {
msg.FileList.push({
FileName: res.FileName,
FileUrl: res.FileUrl,
size: res.Size
})
})
}
const delImg=(i)=>{
msg.ImageList.splice(i,1)
const delImg = i => {
msg.ImageList.splice(i, 1)
}
const delFile=(i)=>{
msg.FileList.splice(i,1)
const delFile = i => {
msg.FileList.splice(i, 1)
}
const save = () => {
customer2.setCustomerTripFollowUpInfo(msg).then((res)=>{
customer.setCustomerTripFollowUpInfo(msg).then(res => {
massage.successMsg(res.data.Message)
msg.Remark=""
msg.ImageList=[]
msg.FileList=[]
ctx.emit("success")
msg.Remark = ''
msg.ImageList = []
msg.FileList = []
ctx.emit('success')
})
}
......@@ -126,34 +116,39 @@ export default {
save
}
}
}
}
</script>
<style lang="scss" scoped>
.editer_input {
.editer_input {
padding: 5px 0;
}
}
.myInput {
.myInput {
background-color: #f6f6f6 !important;
}
.file_box {
}
.file_box {
margin-top: 5px;
.img_list {
display: flex;
flex-wrap: wrap;
.img_box {
width: 40px;
height: 40px;
margin: 10px;
position: relative;
.img {
width: 100%;
height: 100%;
overflow: hidden;
object-fit: cover;
}
.del_icon {
font-size: 18px;
position: absolute;
......@@ -163,10 +158,12 @@ export default {
}
}
}
.file_list {
.file_box {
font-size: 14px;
color: #9696a6;
.del_btn {
margin-left: 10px;
padding-left: 5px;
......@@ -176,19 +173,21 @@ export default {
}
}
}
}
.file_Space {
}
.file_Space {
display: flex;
justify-content: space-between;
margin-top: 10px;
align-items: center;
}
}
.q-field__control {
.q-field__control {
background-color: #f6f6f6 !important;
}
}
.q-field--filled .q-field__control:hover:before {
.q-field--filled .q-field__control:hover:before {
opacity: 0;
}
}
</style>
......@@ -127,7 +127,7 @@
import draggable from "vuedraggable";
import selectTree from '@/components/common/selectTree.vue'
import { useQuasar } from 'quasar'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
// import { customerFieldtabsType } from '@/@types/customer'
export default defineComponent({
components: { draggable, selectTree },
......@@ -242,7 +242,7 @@
submitobj.InputType = '1'
}
loading.value = true
customerService.setCustomerFiledInfo(submitobj).then((res) => {
customerSetService.setCustomerFiledInfo(submitobj).then((res) => {
if (res.data.Code == 1) {
console.log(res)
$q.notify({
......
......@@ -54,7 +54,7 @@
</template>
<script>
import { defineComponent, ref, onMounted } from 'vue'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
export default defineComponent({
props: {
......@@ -103,7 +103,7 @@
})
}
const getLabelList = () => {
customerService.getLabelList({}).then((res) => {
customerSetService.getLabelList({}).then((res) => {
if (res.data.Code == 1) {
LableList.value = res.data.Data
LableList.value.forEach(x => {
......
<style>
.my-special-class {
.my-special-class {
width: 200px;
margin-right: 6px;
}
}
.input_label {
.input_label {
width: 200px;
height: 40px;
border-radius: 4px;
......@@ -15,32 +15,32 @@
align-items: center;
justify-content: space-between;
cursor: pointer;
}
}
.right_select {
.right_select {
width: 40px;
position: absolute;
left: 0;
top: 20px;
}
}
.border_top {
.border_top {
border: 1px solid #d7d7d7;
width: 29px;
border-bottom: none;
border-right: none;
margin-left: 12px;
}
}
.border-bottom {
.border-bottom {
border: 1px solid #d7d7d7;
width: 29px;
border-top: none;
border-right: none;
margin-left: 12px;
}
}
.right_select .border_mid div {
.right_select .border_mid div {
width: 23px;
height: 23px;
text-align: center;
......@@ -49,146 +49,72 @@
font-size: 12px;
cursor: pointer;
background: #d8d8d8;
}
}
.right_select .border_mid .checked {
.right_select .border_mid .checked {
background: #333 !important;
color: #fff !important;
}
}
.tag-select-input {
.tag-select-input {
padding: 4px 10px;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 14px;
}
}
</style>
<template>
<div class="requestgroup">
<div :style="{ 'position': 'relative', 'padding-left': addMsg.length > 1 ? '40px' : '0' }">
<div class="row" v-for="(x,y) in addMsg" :key="y" style="margin-bottom: 8px">
<div :style="{ position: 'relative', 'padding-left': addMsg.length > 1 ? '40px' : '0' }">
<div class="row no-wrap" v-for="(x, y) in addMsg" :key="y" style="margin-bottom: 8px">
<!-- name -->
<q-select
outlined
v-model="x.Id"
:options="filedList"
dense
class="my-special-class"
label="请选择客户信息"
option-value="Id"
option-label="Name"
option-disable="disable"
emit-value
map-options
@update:model-value="changeName($event, y)"
/>
<q-select outlined v-model="x.Id" :options="filedList" dense class="my-special-class" label="请选择客户信息"
option-value="Id" option-label="Name" option-disable="disable" emit-value map-options
@update:model-value="changeName($event, y)" />
<!-- Direction -->
<q-select
v-if="x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == ''"
outlined
v-model="x.Direction"
:options="x.directionList"
dense
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
<q-select v-if="x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == ''" outlined v-model="x.Direction"
:options="x.directionList" dense label="请选择" class="my-special-class" option-value="Id" option-label="Name"
emit-value map-options />
<div class="cascader" v-if="x.Type == 3">
<a-cascader
v-model:value="birthday"
:options="dateOptions"
placeholder="请选择"
expandTrigger="hover"
size="large"
@change="changeDate($event, y)"
/>
<n-cascader v-model:value="birthday" clearable placeholder="请选择" check-strategy="child" multiple
style="width:200px" size="large" max-tag-count="responsive" :options="dateOptions" expand-trigger="hover"
@update:value="changeDate($event, y)" />
</div>
<div v-if="x.Type == 4">
<a-range-picker
style="width:auto"
v-model:value="x.rangeArr"
size="large"
:locale="locale"
format="YYYY/MM/DD HH:mm:ss"
showTime
@change="changeRange($event, y)"
/>
<n-config-provider :locale="zhCN" :date-locale="dateZhCN">
<n-date-picker v-model:value="x.rangeArr" type="datetimerange" size="large" separator="至"
clearable @update:value="changeRange($event,y)"/>
</n-config-provider>
</div>
<!-- StartValue -->
<div
v-if="x.Name == '标签' && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
class="input_label"
@click="showlabel(x, y)"
>
<div style="display: flex;" v-if="lableList && lableList.length > 0">
<div v-if="x.Name == '标签' && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
class="input_label" @click="showlabel(x, y)">
<div style="display: flex" v-if="lableList && lableList.length > 0">
<div class="text-clamp-1 tag-select-input">{{ lableList[0].Name }}</div>
<div
v-if="lableList.length > 1"
class="tag-select-input"
style="margin-left: 5px;"
>{{ lableList.length - 1 }}+</div>
<div v-if="lableList.length > 1" class="tag-select-input" style="margin-left: 5px">
{{ lableList.length - 1 }}+</div>
</div>
</div>
<div
v-if="(x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == '') && x.Name !== '标签'"
>
<div v-if="(x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == '') && x.Name !== '标签'">
<div v-if="x.labelType == 3">
<q-select
v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == ''"
outlined
v-model="x.StartValue"
:options="x.OptionsList"
dense
:multiple="x.labelType == 4"
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
<q-select v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == ''" outlined v-model="x.StartValue"
:options="x.OptionsList" dense :multiple="x.labelType == 4" label="请选择" class="my-special-class"
option-value="Id" option-label="Name" emit-value map-options />
</div>
<div v-else-if="x.labelType == 4">
<q-select
v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == ''"
outlined
v-model="x.StartValue"
:options="x.OptionsList"
dense
:multiple="true"
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
<q-select v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == ''" outlined
v-model="x.StartValue" :options="x.OptionsList" dense :multiple="true" label="请选择"
class="my-special-class" option-value="Id" option-label="Name" emit-value map-options />
</div>
<div v-else-if="x.labelType == 1 || x.labelType == 2 || x.labelType == 7">
<q-input
v-if="x.Type == 1 && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
outlined
v-model="x.StartValue"
label="请输入"
dense
/>
<q-input
v-if="x.Type == 2 && (x.Direction == 1 || x.Direction == 2 || x.Direction == '')"
outlined
v-model="x.StartValue"
label="请输入"
dense
/>
<q-input
v-if="x.Type == 5 || x.Type == ''"
outlined
v-model="x.StartValue"
label="请输入"
dense
/>
outlined v-model="x.StartValue" label="请输入" dense />
<q-input v-if="x.Type == 2 && (x.Direction == 1 || x.Direction == 2 || x.Direction == '')" outlined
v-model="x.StartValue" label="请输入" dense />
<q-input v-if="x.Type == 5 || x.Type == ''" outlined v-model="x.StartValue" label="请输入" dense />
</div>
<div v-else>
<q-input outlined label="请输入" dense />
......@@ -196,86 +122,64 @@
</div>
<!-- 新增和删除 -->
<div style="display: flex;align-items: center;">
<img
src="../../assets/images/customer/delete.png"
v-if="addMsg.length > 1"
style="width: 20px;height: 20px;margin-left: 10px;"
@click="deleteadd(y)"
/>
<img
src="../../assets/images/customer/add.png"
v-if="addMsg.length == y + 1 && addMsg.length < 10"
style="width: 20px;height: 20px;margin-left: 10px;"
@click="addsList()"
/>
<div style="display: flex; align-items: center">
<img src="../../assets/images/customer/delete.png" v-if="addMsg.length > 1"
style="width: 20px; height: 20px; margin-left: 10px" @click="deleteadd(y)" />
<img src="../../assets/images/customer/add.png" v-if="addMsg.length == y + 1 && addMsg.length < 10"
style="width: 20px; height: 20px; margin-left: 10px" @click="addsList()" />
</div>
</div>
<div class="right_select" v-if="addMsg.length > 1">
<div
class="border_top"
:style="{ height: ((addMsg.length * 48 - 8 - 46 - 40) / 2) + 'px' }"
></div>
<div class="border_top" :style="{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }"></div>
<div class="border_mid">
<div
class="and"
:class="{ 'checked': addCondition == 1 }"
@click="changeAddCondition(1)"
>且</div>
<div
class="no"
:class="{ 'checked': addCondition == 2 }"
@click="changeAddCondition(2)"
>或</div>
<div class="and" :class="{ checked: addCondition == 1 }" @click="changeAddCondition(1)">且</div>
<div class="no" :class="{ checked: addCondition == 2 }" @click="changeAddCondition(2)">或</div>
</div>
<div
class="border-bottom"
:style="{ height: ((addMsg.length * 48 - 8 - 46 - 40) / 2) + 'px' }"
></div>
<div class="border-bottom" :style="{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }"></div>
</div>
</div>
<labelgroup
v-if="isshowlabel"
:list="lableList"
@close="isshowlabel = false"
@submit="getlabel"
></labelgroup>
<labelgroup v-if="isshowlabel" :list="lableList" @close="isshowlabel = false" @submit="getlabel"></labelgroup>
</div>
</template>
<script lang="ts">
import {
import {
defineComponent,
ref,
watch,
onMounted
} from 'vue'
import customerService from '@/api/customer'
import labelgroup from './label-group.vue'
import dayjs from 'dayjs'
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import { Notify } from 'quasar'
interface params {
} from 'vue'
import customerSetService from '@/api/customerSet'
import labelgroup from './label-group.vue'
import dayjs from 'dayjs'
import {
Notify
} from 'quasar'
import {
zhCN,
dateZhCN
} from 'naive-ui'
interface params {
Name: number | string
IsCustom: number
Type: number | string
labelType?: number | string
Id?: number | string
Direction?: string | number
StartValue?: string | Array<any>
EndValue?: string
disable?: boolean
directionList?: Array<any>
OptionsList?: Array<any>
isSelect?: boolean
rangeArr?: Array<any>
}
interface dateParams {
labelType ? : number | string
Id ? : number | string
Direction ? : string | number
StartValue ? : string | Array < any >
EndValue ? : string
disable ? : boolean
directionList ? : Array < any >
OptionsList ? : Array < any >
isSelect ? : boolean
rangeArr ? : Array < any > | null
}
interface dateParams {
value: string | number
label: string
children?: Array<dateParams>
}
const format = "YYYY/MM/DD HH:mm:ss"
export default defineComponent({
children ? : Array < dateParams >
}
const format = 'YYYY/MM/DD HH:mm:ss'
export default defineComponent({
props: {
addCondition: {
type: Number,
......@@ -287,30 +191,30 @@ export default defineComponent({
}
},
components: {
labelgroup,
labelgroup
},
setup(props, ctx) {
let birthday = ref([])//只有一个
let lableList = ref<Array<any>>([]) //标签的数组//只有一个
let filedList = ref<Array<params>>([]); //客户字段数组
let addMsg = ref<Array<any>>([]) //筛选数组
let birthday = ref([]) //只有一个
let lableList = ref < Array < any >> ([]) //标签的数组//只有一个
let filedList = ref < Array < params >> ([]) //客户字段数组
let addMsg = ref < Array < any >> ([]) //筛选数组
let isshowlabel = ref(false) //标签弹出显示
let selectindex = ref(0) //现在筛选数组 索引
//日期数组
let dateOptions = ref<Array<dateParams>>([])
let dateOptions = ref < Array < dateParams >> ([])
let year: any = new Date().getFullYear()
for (let i = 1; i <= 12; i++) {
let obj: dateParams = {
value: i < 10 ? '0' + i : i,
value: i < 10 ? '0' + i : '' + i,
label: i + '月',
children: []
}
let day = new Date(year, i, 0).getDate()
for (let d = 1; d <= day; d++) {
obj.children?.push({
value: d < 10 ? '0' + d : d,
label: d + '号',
value: (i < 10 ? '0' + i : '' + i) + '-' + (d < 10 ? '0' + d : '' + d),
label: d + '号'
})
}
dateOptions.value.push(obj)
......@@ -318,86 +222,105 @@ export default defineComponent({
const directionList1 = [{
Id: 1,
Name: '包含所有'
}, {
},
{
Id: 2,
Name: '包含任意'
}, {
},
{
Id: 3,
Name: '不包含'
}, {
},
{
Id: 4,
Name: '为空'
}, {
},
{
Id: 5,
Name: '不为空'
},]
}
]
const directionList2 = [{
Id: 1,
Name: '等于'
}, {
},
{
Id: 2,
Name: '不等于'
}, {
},
{
Id: 3,
Name: '为空'
}, {
},
{
Id: 4,
Name: '不为空'
}, {
},
{
Id: 5,
Name: '模糊'
},]
}
]
const directionList5 = [{
Id: 1,
Name: '等于'
}, {
},
{
Id: 2,
Name: '大于'
}, {
},
{
Id: 3,
Name: '大于等于'
}, {
},
{
Id: 4,
Name: '小于'
}, {
},
{
Id: 5,
Name: '小于等于'
},]
}
]
const init = () => {
console.log('init', props.defaultData)
if (props.defaultData && props.defaultData.length > 0) {
addMsg.value = []
props.defaultData.map((e: any) => {
let find: any = filedList.value.find((_e) => {
let find: any = filedList.value.find(_e => {
return _e.Id == e.Id
})
if (find && find.OptionsList) {
e.OptionsList = find.OptionsList
}
switch (find.Type) {
case 1: {//单行文本
case 1: {
//单行文本
e.labelType = 1
e.directionList = directionList2
break;
break
}
case 2: {//多行文本
case 2: {
//多行文本
e.labelType = 2
e.directionList = directionList2
break;
break
}
case 3: {//单选
case 3: {
//单选
e.labelType = 3
e.directionList = directionList2
e.StartValue = Number(e.StartValue)
if (find.OptionsList) {
e.OptionsList = find.OptionsList
}
break;
break
}
case 4: {//多选
case 4: {
//多选
e.labelType = 4
if (e.Id == "标签") {
e.StartValue=''
if (e.Id == '标签') {
e.StartValue = ''
} else {
if (e.StartValue) {
e.StartValue = e.StartValue.split(',').map(e => Number(e))
......@@ -410,28 +333,31 @@ export default defineComponent({
if (find.OptionsList) {
e.OptionsList = find.OptionsList
}
break;
break
}
case 5: {//日期
case 5: {
//日期
e.labelType = 5
if (e.StartValue) {
birthday.value = e.StartValue.split('-')
birthday.value = e.StartValue.split(',')
} else {
birthday.value = []
}
console.log(5, e.StartValue)
break;
break
}
case 6: {//日期时间范围
case 6: {
//日期时间范围
e.labelType = 6
e.rangeArr = [e.StartValue, e.EndValue]
e.rangeArr = [Date.parse(e.StartValue), Date.parse(e.EndValue)]
console.log(6, e.StartValue)
break;
break
}
case 7: {//数值
case 7: {
//数值
e.labelType = 7
e.directionList = directionList5
break;
break
}
}
addMsg.value.push(e)
......@@ -449,23 +375,26 @@ export default defineComponent({
}]
}
}
let changeAddCondition = (val) => {
let changeAddCondition = val => {
ctx.emit('update:addCondition', val)
}
const getCustomerFiledList = () => {
customerService.getCustomerFiledList({
customerSetService
.getCustomerFiledList({
Enable: 1
}).then((res) => {
})
.then(res => {
let data = res.data.Data
filedList.value = data;
filedList.value.forEach((x) => { // IsCustom 是否自定义字段 1是 2标签 3阶段
filedList.value = data
filedList.value.forEach(x => {
// IsCustom 是否自定义字段 1是 2标签 3阶段
x.IsCustom = 1
})
getCustomerStageList(); //获取客户阶段
getCustomerStageList() //获取客户阶段
})
}
const getCustomerStageList = () => {
customerService.getCustomerStageList({}).then(res => {
customerSetService.getCustomerStageList({}).then(res => {
let obj: params = {
Id: '客户阶段',
Name: '客户阶段',
......@@ -481,10 +410,11 @@ export default defineComponent({
IsCustom: 2
}
filedList.value.unshift(obj2)
console.log("标签", filedList.value)
console.log('标签', filedList.value)
})
}
const deleteadd = (index) => { //删除addMsg某一项
const deleteadd = index => {
//删除addMsg某一项
addMsg.value.splice(index, 1)
}
const addsList = () => {
......@@ -502,46 +432,46 @@ export default defineComponent({
}
const showlabel = (x, y) => {
selectindex.value = y;
selectindex.value = y
isshowlabel.value = true
}
const getlabel = (list) => {
isshowlabel.value = false;
const getlabel = list => {
isshowlabel.value = false
lableList.value = list
addMsg.value[selectindex.value].StartValue = list.map(e => e.Id).toString()
}
//----------------------------------------------------------------------------
// 禁用标签
let changeLabel = () => {
let find: any = addMsg.value.find((e) => {
let find: any = addMsg.value.find(e => {
return e.Id == '标签'
})
if (find) {
filedList.value.map((_e) => {
filedList.value.map(_e => {
if (_e.Id == '标签') {
_e.disable = true
}
})
} else {
filedList.value.map((_e) => {
filedList.value.map(_e => {
if (_e.Id == '标签') {
_e.disable = false
}
})
}
//禁用生日
let find2: any = addMsg.value.find((e) => {
let find2: any = addMsg.value.find(e => {
return e.Id == 17
})
console.log('生日2', find2)
if (find2) {
filedList.value.map((_e) => {
filedList.value.map(_e => {
if (_e.Id == 17) {
_e.disable = true
}
})
} else {
filedList.value.map((_e) => {
filedList.value.map(_e => {
if (_e.Id == 17) {
_e.disable = false
}
......@@ -555,47 +485,51 @@ export default defineComponent({
addMsg.value[y].EndValue = ''
switch (val) {
case "标签": {
case '标签': {
addMsg.value[y].IsCustom = 2
break;
break
}
case "客户阶段": {
case '客户阶段': {
addMsg.value[y].IsCustom = 3
break;
break
}
default: {
addMsg.value[y].IsCustom = 1
}
}
let find: any = filedList.value.find((e) => {
let find: any = filedList.value.find(e => {
return e.Id == val
})
if (find) {
addMsg.value[y].Name = find.Name
}
switch (find.Type) {
case 1: {//单行文本
case 1: {
//单行文本
addMsg.value[y].labelType = 1
addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2
break;
break
}
case 2: {//多行文本
case 2: {
//多行文本
addMsg.value[y].labelType = 2
addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2
break;
break
}
case 3: {//多选
case 3: {
//多选
addMsg.value[y].labelType = 3
addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2
if (find.OptionsList) {
addMsg.value[y].OptionsList = find.OptionsList
}
break;
break
}
case 4: {//多选
case 4: {
//多选
addMsg.value[y].labelType = 4
addMsg.value[y].StartValue = []
addMsg.value[y].directionList = directionList1
......@@ -603,39 +537,42 @@ export default defineComponent({
if (find.OptionsList) {
addMsg.value[y].OptionsList = find.OptionsList
}
break;
break
}
case 5: {//日期
case 5: {
//日期
addMsg.value[y].labelType = 5
addMsg.value[y].Type = 3
break;
break
}
case 6: {//日期时间范围
case 6: {
//日期时间范围
addMsg.value[y].labelType = 6
addMsg.value[y].Type = 4
addMsg.value[y].rangeArr = []
break;
addMsg.value[y].rangeArr = null
break
}
case 7: {//数值
case 7: {
//数值
addMsg.value[y].labelType = 7
addMsg.value[y].directionList = directionList5
addMsg.value[y].Type = 5
break;
break
}
}
}
let changeDate = (value, y) => {
console.log(500, value, y)
addMsg.value[y].StartValue = value.join('-')
addMsg.value[y].StartValue = value.toString();
}
let changeRange = (val, y) => {
let a = dayjs(val[0]._d).format(format)
let b = dayjs(val[1]._d).format(format)
console.log(a, b)
addMsg.value[y].StartValue = a
addMsg.value[y].EndValue = b
}
const checkRule = (val: Array<params>) => {
const newVal=JSON.parse(JSON.stringify(val))
const s= dayjs(newVal[0]).format(format)
const e= dayjs(newVal[1]).format(format)
console.log(570,val,s,e)
addMsg.value[y].StartValue = s
addMsg.value[y].EndValue = e
}
const checkRule = (val: Array < params > ) => {
let flag = false
flag = val.every(e => {
if (e.Type == 1) {
......@@ -644,7 +581,6 @@ export default defineComponent({
} else {
return !!e.Id && e.Direction
}
} else if (e.Type == 2) {
if (e.Direction == 1 || e.Direction == 2) {
return !!e.Id && !!e.StartValue
......@@ -658,7 +594,6 @@ export default defineComponent({
} else {
return e.Id && e.Direction && e.StartValue
}
})
if (!flag) {
Notify.create({
......@@ -669,9 +604,11 @@ export default defineComponent({
}
return flag
}
watch(() => [...addMsg.value], (val) => {
watch(
() => [...addMsg.value],
val => {
changeLabel()
let newVal: Array<params> = []
let newVal: Array < params > = []
val.map((e: params) => {
let item: params = JSON.parse(JSON.stringify(e))
if (e.OptionsList) {
......@@ -680,23 +617,25 @@ export default defineComponent({
if (e.directionList) {
delete item.directionList
}
if (item.labelType === 4 && Array.isArray(item.StartValue)) {
item.StartValue = item.StartValue.join(',')
}
delete item.labelType
newVal.push(item)
})
console.log('change', newVal)
ctx.emit('change', newVal)
}, { deep: true })
onMounted(() => { //进入页面就调用
}, {
deep: true
}
)
onMounted(() => {
//进入页面就调用
setTimeout(() => {
init()
}, 2000)
getCustomerFiledList(); //获取客户字段
getCustomerFiledList() //获取客户字段
})
return {
zhCN,
dateZhCN,
birthday,
dateOptions,
getCustomerFiledList,
......@@ -712,37 +651,41 @@ export default defineComponent({
changeName,
changeDate,
changeRange,
locale,
changeAddCondition,
checkRule
}
}
})
})
</script>
<style lang="scss" scoped>
::v-deep .ant-cascader-picker {
::v-deep .ant-cascader-picker {
border-radius: 4px;
border-color: rgb(0 0 0 / 24%);
overflow: hidden;
}
}
</style>
<style>
/*修改滚动条样式*/
ul::-webkit-scrollbar {
/*修改滚动条样式*/
ul::-webkit-scrollbar {
width: 6px;
height: 10px;
/**/
}
ul::-webkit-scrollbar-track {
}
ul::-webkit-scrollbar-track {
background: rgb(239, 239, 239);
border-radius: 3px;
}
ul::-webkit-scrollbar-thumb {
}
ul::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 10px;
}
ul::-webkit-scrollbar-thumb:hover {
}
ul::-webkit-scrollbar-thumb:hover {
background: #333;
}
}
</style>
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import { ref, reactive } from 'vue'
import clueService, { ClueParams } from '@/api/clue'
import { ColumnDefaultState } from '@/@types/enumHelper'
......@@ -80,7 +80,7 @@ const ClueModule = () => {
colLoadingFinish: false
})
customerService
customerSetService
.getCustomerFiledList({
Enable: 1
})
......
......@@ -12,9 +12,9 @@ import {
ref,
reactive
} from 'vue'
import customer2, {
import customer, {
CutomerParams
} from '@/api/customer2'
} from '@/api/customer'
interface Params {
selectVal: string
selectWay: number
......@@ -47,7 +47,7 @@ interface dataParams {
const CustomerModule = () => {
//调用方法
const getCustomerList = (param: CutomerParams) => {
customer2.getCustomerList(param).then(res => {
customer.getCustomerList(param).then(res => {
console.log(res, '数据')
if (res.data.Code == 1) {
data.dataList = res.data.Data.PageData
......@@ -57,7 +57,7 @@ const CustomerModule = () => {
}
//调用获取下拉
const getWayList = (param: any) => {
customer2.getWayList(param).then(res => {
customer.getWayList(param).then(res => {
if (res.data.Code == 1) {
data.WayList = res.data.Data
}
......@@ -65,7 +65,7 @@ const CustomerModule = () => {
}
//获取员工数据
const getEmployeeData = (param: any) => {
customer2.getEmployeeData(param).then(res => {
customer.getEmployeeData(param).then(res => {
data.EmployeeList = res.data.Data
console.log(data, '员工数据')
// 重组唯一id
......
import { ref, reactive } from 'vue'
import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer'
import customerService2 from '@/api/customer2'
import router from '@/router/index'
import message from '@/utils/message'
interface dataParams {
......@@ -81,7 +81,7 @@ const editRuleModule = () => {
}
//获取线索详情
const getDetail = () => {
customerService.getCustomerClueRuleDetail(msg()).then(res => {
customerSetService.getCustomerClueRuleDetail(msg()).then(res => {
const d = res.data.Data
data.editMsg.DeptList = d.DeptList
data.editMsg.EmpList = d.EmpList
......@@ -101,7 +101,7 @@ const editRuleModule = () => {
}
//获取部门数据
const getEmployeeData = () => {
customerService2.getEmployeeData({}).then(res => {
customerService.getEmployeeData({}).then(res => {
console.log(res.data.Data, '部门')
data.dataTree = res.data.Data
// 重组唯一id
......@@ -128,7 +128,7 @@ const editRuleModule = () => {
// const flag = condition.value.checkRule(data.editMsg.ConditionList)
// console.log(94, flag)
// if (!flag) return
customerService.setCustomerClueRuleInfo(data.editMsg).then(res => {
customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
message.successMsg(res.data.Message)
setTimeout(() => {
router.push({
......
......@@ -99,22 +99,10 @@
<q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input>
</div>
<div class="col-3">
<!-- <selectTree
:treeData="data.EmployeeList"
:defaultArray="data.defaultArray"
nodeKey="newId"
:multiple="false"
labelKey="DeptName"
childrenKey="ChildList"
tipText="选择部门/人员"
@getChild="getChild"
></selectTree>-->
<n-cascader v-model:value="data.CascaderValue" clearable placeholder="选择部门/人员" check-strategy="all"
value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
:options="data.EmployeeList" cascade children-field="ChildList"
@update:value="CascaderUpdateValue" />
<!-- <Cascader :options="data.EmployeeList" optionLabel="DeptName" optionValue="newId" optionChildren="ChildList"
label="选择部门/人员" :multiple="true" /> -->
</div>
<div class="col-3">
<q-btn color="primary" size="sm" label="导入" />
......@@ -160,14 +148,10 @@
onMounted
} from 'vue'
import CustomerModule from '@/module/customer/customerModule'
// import selectTree from '@/components/common/selectTree.vue'
import customRight from '@/components/common/customRight.vue'
// import Cascader from "@/components/common/Cascader.vue"
export default defineComponent({
components: {
// selectTree,
customRight,
// Cascader
},
setup() {
let {
......@@ -266,7 +250,15 @@
.customer_Wechat {
color: #9999a8;
}
.n-base-selection-label{
height: 56px;
::v-deep .n-base-selection-label{
height: 54px;
background-color: rgba(0, 0, 0, 0.05);
border: none !important;
}
::v-deep .n-base-selection-input{
height: 54px;
display: flex;
align-items: center;
border: none !important;
}
</style>
......@@ -6,24 +6,30 @@
</div>
<div class="customer-operation-content">
<div v-if="curItem == 1" class="row">
<div class="col-2 content-left">领取公海客户:</div>
<div class="collaborator-title">领取公海客户:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.IsPublicAudit" :true-value="1" :false-value="2" />
开启后,员工领取公海客户时需要企微端设置的部门上级审批,审批同意后才可领取
</div>
<div class="flex items-center">
<q-toggle v-model="data.PublicGetDept" false-value="-1" />以下部门允许领取公海客户
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
<q-toggle v-model="PublicGetDeptState" @update:model-value="ChangePublicGetDeptState" />以下部门允许领取公海客户
<q-btn color="primary" :disable="!PublicGetDeptState" unelevated label="修改" size="xs" class="q-ml-lg"
@click="checkedPublicGetDept" />
</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 v-if="curItem == 2">
<div class="row">
<div class="col-2 content-left">可放弃客户:</div>
<div class="collaborator-title">可放弃客户:</div>
<div class="col-10">
<div class="q-gutter-sm">
<q-radio v-model="data.AbandonType" :val="1" label="全部客户" />
......@@ -35,41 +41,87 @@
</div>
</div>
<div class="row">
<div class="col-2 content-left">可操作员工:</div>
<div class="collaborator-title">可操作员工:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
<q-toggle v-model="AbandonDeptState" @update:model-value="ChangeAbandonDeptState" />以下部门允许将客户放弃到公海
<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 class="row">
<div class="col-2 content-left">放弃后审核:</div>
<div class="collaborator-title">放弃后审核:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
</div>
</div>
<div class="row">
<div class="col-2 content-left" style="padding-top: 15px">放弃原因:</div>
<div class="collaborator-title" style="padding-top: 15px">放弃原因:</div>
<div class="col-10">
<draggable v-model="data.AbandonReasonList" tag="div" item-key="Id">
<template #item="{ element }">
<template #item="{ element,index }">
<div class="flex items-center">
<i class="iconfont icon-drag" style="font-size: 20px; color: #777"></i>
<div class="AbandonReasonItem flex items-center">{{ element }}</div>
<n-popover trigger="hover">
<template #trigger>
<i class="iconfont icon-edit_light" style="font-size: 20px; color: #111"
@click="editAbandonReason(element,index)"></i>
</template>
<span>编辑</span>
</n-popover>
<n-popover trigger="hover">
<template #trigger>
<i class="iconfont icon-delete_light q-ml-md" style="font-size: 20px; color: #111"
@click="delAbandonReaso(index)"></i>
</template>
<span>删除</span>
</n-popover>
</div>
</template>
</draggable>
<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="addAbandonReason" />
已设/可设上限:{{data.AbandonReasonList.length}}/10</div>
<q-dialog v-model="AbandonReasonDialog">
<q-card>
<q-card-section class="row items-center q-pb-none">
<div class="text-h6" v-if="AbandonReasonType==0">添加</div>
<div class="text-h6" v-if="AbandonReasonType==1">编辑</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<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="请输入放弃原因" />
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="取消" color="primary" v-close-popup />
<q-btn unelevated label="确定" color="primary" @click="saveAbandonReason" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</div>
</div>
<div v-if="curItem == 3" class="row">
<div class="col-2 content-left">申请成为协作人:</div>
<div class="collaborator-title">申请成为协作人:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
<q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
......@@ -77,11 +129,11 @@
</div>
</div>
<div v-if="curItem == 4" class="row">
<div class="col-2 content-left">添加协作人:</div>
<div class="collaborator-title">添加协作人:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.AddTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
<q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
......@@ -91,8 +143,90 @@
</div>
</div>
</div>
<div v-if="curItem == 5">
<div class="row">
<div class="collaborator-title">转移客户:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
以下部门允许转移客户
<q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div>
</div>
</div>
<div class="row">
<div class="collaborator-title">转移范围:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
转移客户时允许选择的范围
<q-btn color="primary" label="设置" unelevated size="xs" class="q-ml-lg" />
</div>
</div>
</div>
</div>
<div class="row" v-if="curItem == 6">
<div class="collaborator-title">删除客户跟进记录:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,允许员工删除自己填写的客户跟进记录
</div>
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,仅允许添加跟进记录后
<q-input outlined v-model="data.text" dense type="number" :min="0" style="width: 100px; margin: 0 10px" />
分钟内删除
</div>
</div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1"
</div>
<div v-if="curItem == 7">
<div class="row">
<div class="collaborator-title">签到拜访限制:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,仅企业客户允许签到拜访
</div>
</div>
</div>
<div class="row">
<div class="collaborator-title">签到拜访拍照:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,签到拜访时必须拍照
</div>
</div>
</div>
</div>
<div v-if="curItem == 8">
<div class="row">
<div class="collaborator-title" style="min-width: 140px">创建企业时查重方式:</div>
<div class="col-10">
<div class="q-gutter-sm">
<q-radio v-model="data.AbandonType" :val="1" label="模糊查重" />
<q-radio v-model="data.AbandonType" :val="2" label="精准查重 " />
</div>
</div>
</div>
<div class="row">
<div class="collaborator-title" style="min-width: 140px">创建企业客户:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
仅支持通过工商信息库来创建企业
</div>
</div>
</div>
</div>
<div v-if="curItem == 9">
<div class="row flex justify-end">
<q-btn color="primary" label="添加自定义字段" unelevated />
</div>
</div>
</div>
<departmentStaff v-model="showDptDialog" :defaultArray="DptDataTreeDefault" nodeKey="DeptId"
labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
</div>
</template>
......@@ -104,11 +238,19 @@
defineComponent,
onMounted
} from 'vue'
import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer'
// import customerService2 from '@/api/customer2'
import departmentStaff from '@/components/common/departmentStaff.vue'
import requestGroup from '@/components/customer/request-group.vue'
import draggable from 'vuedraggable'
import message from '@/utils/message'
interface dataParams {
data: {
AbandonReasonList: string[]
[key: string]: any
}
[key: string]: any
}
export default defineComponent({
components: {
departmentStaff,
......@@ -154,32 +296,44 @@
}
])
let curItem = ref(1)
let data = reactive({
let data = reactive < dataParams > ({
data: {
IsPublicAudit: 1,
PublicGetDept: -1,
AbandonType: 1
AbandonType: 1,
AbandonAudit: 0,
AbandonReasonList: [],
},
PublicGetDeptState: false, //以下部门允许领取公海客户
AbandonDeptState: false, //以下部门允许将客户放弃到公海
showDptDialog: false,
defaultDpt: [],
DptDataTree: []
AbandonReasonDialog: false, //放弃原因弹窗
AbandonReasonText: "", //放弃原因
AbandonReasonIndex: 0, //放弃原因index
AbandonReasonType: 0, // 修改类型 0:新增,1:编辑
DptDataTree: [],
DptDataTreeDefault: [], //部门默认值
})
const changeActive = item => {
curItem.value = item.Id
}
//获取客户操作配置
const getConfig = () => {
customerService.getCustomerConfig({}).then(res => {
customerSetService.getCustomerConfig({}).then(res => {
console.log('CONFIG', res.data.Data)
data.data = res.data.Data
if (data.data.PublicGetDept == -1) {
data.PublicGetDeptState = false
} else {
data.PublicGetDeptState = true
}
})
}
const getDptTree = () => {
customerService.getDeptTree({}).then(res => {
console.log('DptDataTree', res.data.Data)
customerService.getEmployeeData({}).then(res => {
data.DptDataTree = res.data.Data
// 重组唯一id
if (data.DptDataTree.length == 0) return
data.DptDataTree.forEach((x: any) => {
if (data.dataTree.length == 0) return
data.DptDataTree.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
......@@ -195,17 +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 = () => {
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 = () => {
customerService.setCustomerConfig(data.data).then(res => {
console.log('set', res.data.Data)
})
}
const getdpt = val => {
data.showDptDialog = false
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 addAbandonReason = () => {
data.AbandonReasonDialog = true
data.AbandonReasonText = '',
data.AbandonReasonIndex = 0
data.AbandonReasonType = 0
}
//修改放弃原因
const editAbandonReason = (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(() => {
getDptTree()
......@@ -218,7 +434,13 @@
...toRefs(data),
getdpt,
checkedPublicGetDept,
setCustomerConfig
setCustomerConfig,
addAbandonReason,
editAbandonReason,
saveAbandonReason,
delAbandonReaso,
ChangePublicGetDeptState,
ChangeAbandonDeptState,
}
}
})
......@@ -261,12 +483,6 @@
overflow: auto;
}
.content-left {
line-height: 40px;
font-weight: 600;
white-space: nowrap;
}
.AbandonReasonItem {
width: 453px;
height: 50px;
......@@ -278,4 +494,28 @@
margin: 10px;
}
.collaborator-title {
min-width: 80px;
line-height: 40px;
text-align: right;
margin-right: 10px;
font-weight: 600;
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>
......@@ -195,7 +195,7 @@ import {
import draggable from "vuedraggable";
import { Dialog } from 'quasar'
import message from '@/utils/message'
import customerService from '@/api/customer';
import customerSetService from '@/api/customerSet';
import router from '@/router/index'
interface dataType {
......@@ -242,7 +242,7 @@ export default defineComponent({
const getClueList = () => {
defaultData.value = []
data.value = []
customerService.getCustomerClueRuleList({}).then(res => {
customerSetService.getCustomerClueRuleList({}).then(res => {
res.data.Data.map((item: dataType) => {
if (item.IsDefault === 1) {
defaultData.value.push(item)
......@@ -257,7 +257,7 @@ export default defineComponent({
ClueAllotWay: 1,// 1依次轮流 2随机分配
})
const getCustomerClueRuleConfig = () => {
customerService.getCustomerClueRuleConfig({}).then(res => {
customerSetService.getCustomerClueRuleConfig({}).then(res => {
let data = res.data.Data
configMsg.ClueType = data.ClueType
configMsg.ClueAllotWay = data.ClueAllotWay
......@@ -287,13 +287,13 @@ export default defineComponent({
})
}
const configChange = () => {
customerService.setCustomerClueRuleConfig(configMsg).then(res => {
customerSetService.setCustomerClueRuleConfig(configMsg).then(res => {
console.log(228, res.data)
})
}
const setState = (msg) => {
customerService.setCustomerClueRuleState(msg).then(res => {
customerSetService.setCustomerClueRuleState(msg).then(res => {
message.successMsg(res.data.Message)
if (msg.Type == 2) {
getClueList()
......
......@@ -66,11 +66,11 @@
</template>
<script lang="ts">
import { defineComponent, ref, onMounted, } from 'vue'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import draggable from "vuedraggable";
import { useQuasar } from 'quasar'
import { customerFieldlistType, customerFieldaddMsgType, customerFieldtabsType } from '@/@types/customer'
import addfield from '../../../components/customer/addfield.vue'
import addfield from '@/components/customer/addfield.vue'
export default defineComponent({
components: { draggable, addfield },
setup() {
......@@ -99,7 +99,7 @@
}
)
const changePage = () => {
customerService.getCustomerFiledList({ Enable: -1 }).then((res) => {
customerSetService.getCustomerFiledList({ Enable: -1 }).then((res) => {
data.value = res.data.Data
})
}
......@@ -116,7 +116,7 @@
FiledId: dragId.value,
SortFiledId: olddragId,
}
customerService.setCustomerFiledState(msg).then((res) => {
customerSetService.setCustomerFiledState(msg).then((res) => {
if (res.data.Code == 1) {
console.log(res)
} else {//如果移动失败 重新获取列表
......@@ -134,7 +134,7 @@
FiledId: item.Id,
SortFiledId: 0,
}
customerService.setCustomerFiledState(msg).then((res) => {
customerSetService.setCustomerFiledState(msg).then((res) => {
if (res.data.Code == 1) {
$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -183,7 +183,7 @@
});
}
const getCustomerFieldType = () => {
customerService.getCustomerFieldTypeEnumList({}).then((res) => {
customerSetService.getCustomerFieldTypeEnumList({}).then((res) => {
if (res.data.Code == 1) {
tabsList.value = res.data.Data
tabsList.value.forEach(x => {
......@@ -224,14 +224,14 @@
}
}
const getDepartList = () => {
customerService.getDeptTree({ School_Id: 0 }).then((res) => {
customerSetService.getDeptTree({ School_Id: 0 }).then((res) => {
if (res.data.Code == 1) {
deptl.value = res.data.Data
}
})
}
const getFieldInputType = () => {
customerService.getCustomerFieldInputTypeEnumList({}).then((res) => {
customerSetService.getCustomerFieldInputTypeEnumList({}).then((res) => {
if (res.data.Code == 1) {
checkboxList.value = res.data.Data
}
......
......@@ -120,7 +120,7 @@
</template>
<script lang="ts">
import { defineComponent, onMounted, reactive } from 'vue'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import { useQuasar } from 'quasar'
import router from '@/router/index'
......@@ -131,7 +131,7 @@ export default defineComponent({
data: [],
})
const getList = () => {
customerService.getCustomerStageFlowList({ Enable: 0 }).then((res) => {
customerSetService.getCustomerStageFlowList({ Enable: 0 }).then((res) => {
if (res.data.Code == 1) {
state.data = res.data.Data
} else {//如果移动失败 重新获取列表
......@@ -161,7 +161,7 @@ export default defineComponent({
Type: Type,
FlowId: Id,
}
customerService.setCustomerStageFlowState(msg).then((res) => {
customerSetService.setCustomerStageFlowState(msg).then((res) => {
if (res.data.Code == 1) {
$q.notify({
icon: 'iconfont icon-chenggong',
......
......@@ -253,7 +253,7 @@
</template>
<script lang="ts">
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import { useQuasar } from 'quasar'
......@@ -282,7 +282,7 @@ export default defineComponent({
selectindex:0,
})
const getList = () => {
customerService.getWeChatLableList({}).then((res) => {
customerSetService.getWeChatLableList({}).then((res) => {
if (res.data.Code == 1) {
data.dataList = res.data.Data;
data.SelectID = data.dataList[data.selectindex].Id
......@@ -369,7 +369,7 @@ export default defineComponent({
}
}
const setlable = (msg: any) => {
customerService.setWeChatLable(msg).then((res) => {
customerSetService.setWeChatLable(msg).then((res) => {
if (res.data.Code == 1) {
$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -406,7 +406,7 @@ export default defineComponent({
flat: true,
}
}).onOk(() => {
customerService.delWeChatLable({ LableId: Id }).then((res) => {
customerSetService.delWeChatLable({ LableId: Id }).then((res) => {
if (res.data.Code == 1) {
$q.notify({
icon: 'iconfont icon-chenggong',
......
......@@ -160,9 +160,9 @@
<script lang="ts">
import { defineComponent, onMounted, reactive, } from 'vue'
import router from '@/router/index'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import departmentStaff from '@/components/common/departmentStaff.vue'
import customerService2 from '@/api/customer2'
import customerService from '@/api/customer'
import { useQuasar } from 'quasar'
......@@ -202,7 +202,7 @@ export default defineComponent({
}
const getList = () => {
customerService.getCustomerStageList({}).then((res) => {
customerSetService.getCustomerStageList({}).then((res) => {
if (res.data.Code == 1) {
state.StageList = res.data.Data;
state.gettypeoneList = []
......@@ -300,7 +300,7 @@ export default defineComponent({
} else {
data.InvalidCause = ''
}
customerService.setCustomerStageFlowInfo(data).then(res => {
customerSetService.setCustomerStageFlowInfo(data).then(res => {
if (res.data.Code == 1) {
$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -321,7 +321,7 @@ export default defineComponent({
}
let getEmployeeData = () => {
customerService2.getEmployeeData({}).then(res => {
customerService.getEmployeeData({}).then(res => {
state.dataTree = res.data.Data
// 重组唯一id
if (state.dataTree.length == 0) return
......@@ -346,7 +346,7 @@ export default defineComponent({
state.showDialog = false
}
let getdetails = (Id: number) => {
customerService.getCustomerStageFlowInfo({ FlowId: Id }).then(res => {
customerSetService.getCustomerStageFlowInfo({ FlowId: Id }).then(res => {
if (res.data.Code == 1) {
state.addMsg = res.data.Data
if (state.addMsg.UseStage.length != '') {
......
......@@ -149,7 +149,7 @@
<script lang="ts">
import { defineComponent, onMounted, reactive, ref } from 'vue'
import router from '@/router/index'
import customerService from '@/api/customer'
import customerSetService from '@/api/customerSet'
import draggable from "vuedraggable";
import { useQuasar } from 'quasar'
......@@ -178,7 +178,7 @@ export default defineComponent({
}
const getList = () => {
customerService.getCustomerStageList({}).then((res) => {
customerSetService.getCustomerStageList({}).then((res) => {
if (res.data.Code == 1) {
state.addMsg = res.data.Data
state.followupStage = [];
......@@ -235,7 +235,7 @@ export default defineComponent({
}
const getStageDel = (Id: number, index: number) => {
if (Id > 0) {//判断是否是新加
customerService.validataCustomerStageDel({ StageId: Id }).then((res) => {
customerSetService.validataCustomerStageDel({ StageId: Id }).then((res) => {
if (res.data.Code == 1) {
if (res.data.Data.UseState == false) {//可以删除
state.followupStage.splice(index, 1)
......@@ -264,7 +264,7 @@ export default defineComponent({
}
if (Id > 0) {
customerService.validataCustomerCauseDel(data).then((res) => {
customerSetService.validataCustomerCauseDel(data).then((res) => {
if (res.data.Code == 1) {
if (res.data.Data.UseState == false) {//可以删除
state.reasonList[y].OptionsList.splice(index, 1)
......@@ -330,7 +330,7 @@ export default defineComponent({
x.Sort = i + 1
})
state.loading = true
customerService.setCustomerStageInfo(state.addMsg).then((res) => {
customerSetService.setCustomerStageInfo(state.addMsg).then((res) => {
if (res.data.Code == 1) {
state.loading = false
$q.notify({
......
......@@ -20,7 +20,7 @@ const routes: RouteRecordRaw[] = [
// 客户设置
{
path: '/customerSetup',
component: () => import('@/pages/customer/customerSetup.vue')
component: () => import('@/pages/customerManage/customerSet/customerSetup.vue')
},
//客户
{
......@@ -50,7 +50,6 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/pages/editor/createStageRange.vue')
},
{
path: '/auth/login',
component: () => import('@/pages/auth/login.vue')
......
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