Commit bddaf54d authored by 罗超's avatar 罗超

1

parent 47ff3e98
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"lockr": "^0.9.0-beta.0", "lockr": "^0.9.0-beta.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mermaid": "^8.12.1", "mermaid": "^8.12.1",
"naive-ui": "^2.21.2",
"quasar": "^2.0.0", "quasar": "^2.0.0",
"quasar-tiptap-branch": "^1.8.1", "quasar-tiptap-branch": "^1.8.1",
"vue-i18n": "^9.0.0", "vue-i18n": "^9.0.0",
......
...@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) { ...@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot) // app boot file (/src/boot)
// --> boot files are part of "main.js" // --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files // https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp', 'antDesign'], boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp', 'antDesign','naiveUI'],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: ['app.scss'], css: ['app.scss'],
......
...@@ -245,7 +245,6 @@ export default { ...@@ -245,7 +245,6 @@ export default {
const index = checkbox.value.indexOf(checkVal) const index = checkbox.value.indexOf(checkVal)
//父级id数组 //父级id数组
arr.map(e => { arr.map(e => {
const child = e[props.optionChildren] const child = e[props.optionChildren]
if (checkVal == e[props.optionValue]) { if (checkVal == e[props.optionValue]) {
if (index > -1) { if (index > -1) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
<q-card style="width: 600px;height:600px; max-width: 80vw;"> <q-card style="width: 600px;height:600px; max-width: 80vw;">
<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">选择部门 <span v-if="showType===0">/员工</span></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>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
/> />
</div> </div>
<div class="col-6 q-px-sm"> <div class="col-6 q-px-sm">
<div class="list-title">已选择的部门或成员</div> <div class="list-title">已选择的部门<span v-if="showType===0">或成员</span></div>
<div class="q-pb-none col-12 list-box"> <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"> <div class="flex-center">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<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" label="确定" /> <q-btn color="primary" @click="goback" flat label="确定" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
......
...@@ -5,9 +5,16 @@ ...@@ -5,9 +5,16 @@
// import { UserGetter } from '@/store/modules/user/getters' // import { UserGetter } from '@/store/modules/user/getters'
// import { dispatchAction, getStoreGetter, setStoreState } from '@/store/utils' // import { dispatchAction, getStoreGetter, setStoreState } from '@/store/utils'
// import message from '@/utils/message' // import message from '@/utils/message'
import { StaticConfig } from '@/config/app' import {
import { ref, reactive } from 'vue' StaticConfig
import customer2, { CutomerParams } from '@/api/customer2' } from '@/config/app'
import {
ref,
reactive
} from 'vue'
import customer2, {
CutomerParams
} from '@/api/customer2'
interface Params { interface Params {
selectVal: string selectVal: string
selectWay: number selectWay: number
...@@ -19,22 +26,23 @@ interface customParams { ...@@ -19,22 +26,23 @@ interface customParams {
customWay: number customWay: number
} }
interface friendParams { interface friendParams {
frendArr: Array<number> frendArr: Array < number >
wayArr: Array<number> wayArr: Array < number >
} }
interface memberParams { interface memberParams {
newId: number | string newId: number | string
DataType: number | string DataType: number | string
DeptId: number DeptId: number
ChildList: Array<any> ChildList: Array < any >|null
} }
interface dataParams { interface dataParams {
columns: Array<any> columns: Array < any >
dataList: Array<any> dataList: Array < any >
WayList: Array<any> WayList: Array < any >
selected: Array<any> selected: Array < any >
EmployeeList: Array<memberParams> EmployeeList: Array < memberParams >
defaultArray: Array<number|string> defaultArray: Array < number | string >
CascaderValue: Array < any > | string
} }
const CustomerModule = () => { const CustomerModule = () => {
//调用方法 //调用方法
...@@ -64,15 +72,21 @@ const CustomerModule = () => { ...@@ -64,15 +72,21 @@ const CustomerModule = () => {
if (data.EmployeeList.length == 0) return if (data.EmployeeList.length == 0) return
data.EmployeeList.forEach(x => { data.EmployeeList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) { if (x.DataType === 2) {
getChildList(x.ChildList) x.ChildList = null
} }
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
}) })
}) })
} }
const getChildList = (ChildList: Array<any>) => { const getChildList = (ChildList: Array < any > ) => {
ChildList.forEach(x => { ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId x.newId = x.DataType + '-' + x.DeptId
if (x.DataType === 2) {
x.ChildList = null
}
if (x.ChildList && x.ChildList.length > 0) { if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList) getChildList(x.ChildList)
} }
...@@ -85,31 +99,76 @@ const CustomerModule = () => { ...@@ -85,31 +99,76 @@ const CustomerModule = () => {
}) })
//日期对象 //日期对象
// const daySelect = // const daySelect =
const data = reactive<dataParams>({ const data = reactive < dataParams > ({
columns: [ columns: [{
{
name: 'CustomerName', name: 'CustomerName',
label: '客户', label: '客户',
field: 'CustomerName', field: 'CustomerName',
align: 'left' align: 'left'
}, },
{ name: 'StageName', align: 'center', field: 'StageName', label: '客户阶段' }, {
{ name: 'LableList', label: '客户标签', field: 'LableList', align: 'left' }, name: 'StageName',
{ name: 'carbs', label: '内容标签', field: 'carbs', align: 'left' }, align: 'center',
{ name: 'CreateTime', label: '创建时间', field: 'CreateTime', align: 'left' }, field: 'StageName',
{ name: 'sodium', label: '负责人', field: 'sodium', align: 'left' }, label: '客户阶段'
{ name: 'LastFollowUpTime', label: '上次跟进', field: 'LastFollowUpTime', align: 'left' }, },
{ name: 'Source', label: '渠道活码来源', field: 'Source', align: 'left' }, {
name: 'LableList',
label: '客户标签',
field: 'LableList',
align: 'left'
},
{
name: 'carbs',
label: '内容标签',
field: 'carbs',
align: 'left'
},
{
name: 'CreateTime',
label: '创建时间',
field: 'CreateTime',
align: 'left'
},
{
name: 'sodium',
label: '负责人',
field: 'sodium',
align: 'left'
},
{
name: 'LastFollowUpTime',
label: '上次跟进',
field: 'LastFollowUpTime',
align: 'left'
},
{
name: 'Source',
label: '渠道活码来源',
field: 'Source',
align: 'left'
},
// { name: 'num', label: '7日内客户回复消息数', align: 'left'}, // { name: 'num', label: '7日内客户回复消息数', align: 'left'},
// { name: 'num', label: '7日内员工发送消息数', align: 'left'}, // { name: 'num', label: '7日内员工发送消息数', align: 'left'},
{ name: 'FriendTime', label: '添加好友时间', field: 'FriendTime', align: 'left' }, {
{ name: 'CheckInNum', label: '签到拜访', field: 'CheckInNum', align: 'left' } name: 'FriendTime',
label: '添加好友时间',
field: 'FriendTime',
align: 'left'
},
{
name: 'CheckInNum',
label: '签到拜访',
field: 'CheckInNum',
align: 'left'
}
], ],
selected: [], selected: [],
dataList: [], dataList: [],
WayList: [], WayList: [],
EmployeeList: [], EmployeeList: [],
defaultArray: [] // defaultArray: [], //
CascaderValue: ""
}) })
const msg = reactive({ const msg = reactive({
PageIndex: 1, PageIndex: 1,
...@@ -133,8 +192,7 @@ const CustomerModule = () => { ...@@ -133,8 +192,7 @@ const CustomerModule = () => {
OrderBy: 1, //排序 OrderBy: 1, //排序
AddCondition: 0 //查询条件 AddCondition: 0 //查询条件
}) })
const TypeList = reactive([ const TypeList = reactive([{
{
Name: '企业', Name: '企业',
Id: 0 Id: 0
}, },
...@@ -151,8 +209,7 @@ const CustomerModule = () => { ...@@ -151,8 +209,7 @@ const CustomerModule = () => {
Id: 3 Id: 3
} }
]) ])
const TimeList = reactive([ const TimeList = reactive([{
{
Name: '客户创建时间', Name: '客户创建时间',
Id: 1 Id: 1
}, },
...@@ -162,8 +219,7 @@ const CustomerModule = () => { ...@@ -162,8 +219,7 @@ const CustomerModule = () => {
} }
]) ])
//自定义客户筛选 //自定义客户筛选
const CustomList = reactive([ const CustomList = reactive([{
{
Name: '好友关系', Name: '好友关系',
Id: 1 Id: 1
}, },
...@@ -176,8 +232,7 @@ const CustomerModule = () => { ...@@ -176,8 +232,7 @@ const CustomerModule = () => {
Id: 3 Id: 3
} }
]) ])
const friendOptions = reactive([ const friendOptions = reactive([{
{
Name: '好友客户', Name: '好友客户',
Id: 1 Id: 1
}, },
...@@ -190,17 +245,17 @@ const CustomerModule = () => { ...@@ -190,17 +245,17 @@ const CustomerModule = () => {
Id: 3 Id: 3
} }
]) ])
const SeletObj = reactive<Params>({ const SeletObj = reactive < Params > ({
selectVal: '', selectVal: '',
selectWay: 0 selectWay: 0
}) })
const TimeObj = reactive<timeParams>({ const TimeObj = reactive < timeParams > ({
timeWay: 1 timeWay: 1
}) })
const customSetObj = reactive<customParams>({ const customSetObj = reactive < customParams > ({
customWay: 1 customWay: 1
}) })
const friendObj = reactive<friendParams>({ const friendObj = reactive < friendParams > ({
frendArr: [], frendArr: [],
wayArr: [] wayArr: []
}) })
...@@ -229,34 +284,59 @@ const CustomerModule = () => { ...@@ -229,34 +284,59 @@ const CustomerModule = () => {
getCustomerList(msg) getCustomerList(msg)
} }
const getChild = (deptArray: any) => { const getChild = (deptArray: any) => {
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID //数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
if(deptArray._value){ if (deptArray._value) {
const Type = deptArray._value.split('-')[0]; const Type = deptArray._value.split('-')[0]
const MyId = deptArray._value.split('-')[1] const MyId = deptArray._value.split('-')[1]
//1部门 //1部门
if(Type==1){ if (Type == 1) {
msg.DeptId = MyId msg.DeptId = MyId
} }
//2人员 //2人员
if(Type==2){ if (Type == 2) {
msg.EmpId = MyId msg.EmpId = MyId
} }
}else{ } else {
msg.DeptId=0; msg.DeptId = 0
msg.EmpId=0; msg.EmpId = 0
} }
getCustomerList(msg) getCustomerList(msg)
} }
const getCkedFriend = (e:any)=>{ const getCkedFriend = (e: any) => {
const Ids = e.map((x:any)=>{ const Ids = e
return x.Id .map((x: any) => {
}).toString(); return x.Id
msg.Q_Friends = Ids; })
.toString()
msg.Q_Friends = Ids
getCustomerList(msg) getCustomerList(msg)
} }
const CascaderUpdateValue = (val) => {
console.log('val', val)
}
return { getCustomerList, getWayList, getEmployeeData, data, msg, title, TypeList, SeletObj, getSelectWay, TimeObj, TimeList, changePage, pagination, return {
CustomList, customSetObj, friendObj, friendOptions, getChild, getCkedFriend} getCustomerList,
getWayList,
getEmployeeData,
data,
msg,
title,
TypeList,
SeletObj,
getSelectWay,
TimeObj,
TimeList,
changePage,
pagination,
CustomList,
customSetObj,
friendObj,
friendOptions,
getChild,
getCkedFriend,
CascaderUpdateValue
}
} }
export default CustomerModule export default CustomerModule
<template> <template>
<div class="q-mt-md q-pa-md page flex"> <div class="q-mt-md q-pa-md CustomerOperation flex">
<div class="customer-operation-category"> <div class="customer-operation-category">
<div <div v-for="item in leftList" :key="item.Id" :class="{ active: curItem == item.Id }"
v-for="(item) in leftList" class="customer-operation-category--item" @click="changeActive(item)">{{ item.Name }}</div>
:key="item.Id" </div>
:class="{ 'active': curItem == item.Id }" <div class="customer-operation-content">
class="customer-operation-category--item" <div v-if="curItem == 1" class="row">
@click="changeActive(item)" <div class="col-2 content-left">领取公海客户:</div>
>{{ item.Name }}</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" />
</div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
</div>
</div> </div>
<div class="customer-operation-content"> </div>
<div v-if="curItem == 1" class="row"> <div v-if="curItem == 2">
<div class="col-2 content-left">领取公海客户:</div> <div class="row">
<div class="col-10"> <div class="col-2 content-left">可放弃客户:</div>
<div class="flex items-center"> <div class="col-10">
<q-toggle v-model="data.IsPublicAudit" :true-value="1" :false-value="2" />开启后,员工领取公海客户时需要企微端设置的部门上级审批,审批同意后才可领取 <div class="q-gutter-sm">
</div> <q-radio v-model="data.AbandonType" :val="1" label="全部客户" />
<div class="flex items-center"> <q-radio v-model="data.AbandonType" :val="2" label="部分客户" />
<q-toggle v-model="data.PublicGetDept" false-value="-1" />以下部门允许领取公海客户
<q-btn color="primary" label="修改" size="xs" @click="checkedPublicGetDept" />
</div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
</div>
</div>
</div> </div>
<div v-if="curItem == 2"> <div v-if="data.AbandonType == 2">
<div class="row"> <requestGroup />
<div class="col-2 content-left">可放弃客户:</div> </div>
<div class="col-10"> </div>
<div class="q-gutter-sm"> </div>
<q-radio v-model="data.AbandonType" :val="1" label="全部客户" /> <div class="row">
<q-radio v-model="data.AbandonType" :val="2" label="部分客户" /> <div class="col-2 content-left">可操作员工:</div>
</div> <div class="col-10">
<div v-if="data.AbandonType == 2">x</div> <div class="flex items-center">
</div> <q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海
</div> <q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
<div class="row"> </div>
<div class="col-2 content-left">可操作员工:</div> </div>
<div class="col-10"> </div>
<div class="flex items-center"> <div class="row">
<q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海 <div class="col-2 content-left">放弃后审核:</div>
<q-btn <div class="col-10">
color="primary" <div class="flex items-center">
label="修改" <q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
size="xs" </div>
@click="checkedPublicGetDept" </div>
/> <div class="row">
</div> <div class="col-2 content-left" style="padding-top: 15px">放弃原因:</div>
</div> <div class="col-10">
</div> <draggable v-model="data.AbandonReasonList" tag="div" item-key="Id">
<div class="row"> <template #item="{ element }">
<div class="col-2 content-left">放弃后审核:</div> <div class="flex items-center">
<div class="col-10"> <i class="iconfont icon-drag" style="font-size: 20px; color: #777"></i>
<div class="flex items-center"> <div class="AbandonReasonItem flex items-center">{{ element }}</div>
<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="col-10">
<draggable v-model="data.AbandonReasonList" tag="div" item-key="Id">
<template #item="{ element }">
<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>
</div>
</template>
</draggable>
</div>
</div> </div>
</template>
</draggable>
</div>
</div>
</div>
<div v-if="curItem == 3" class="row">
<div class="col-2 content-left">申请成为协作人:</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" />
</div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
</div>
</div>
</div>
<div v-if="curItem == 4" class="row">
<div class="col-2 content-left">添加协作人:</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" />
</div> </div>
<div>
<div v-for="item in items" :key="item.id">{{ item }}</div>
</div>
<div class="flex">
<q-checkbox v-model="data.AddTeamDept" label="协作人被移除后(若该协作人已添加客户为好友),自动创建新的客户" />
</div>
</div> </div>
<departmentStaff </div>
v-model="showDptDialog"
:defaultArray="defaultDpt"
nodeKey="newId"
labelKey="DeptName"
childrenKey="ChildList"
strategy="leaf"
:treeData="DptDataTree"
@select="getdpt"
/>
</div> </div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1"
labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { import {
ref, ref,
toRefs, toRefs,
reactive, reactive,
defineComponent, defineComponent,
onMounted onMounted
} from 'vue' } from 'vue'
import customerService from '@/api/customer' import customerService from '@/api/customer'
// import customerService2 from '@/api/customer2' // import customerService2 from '@/api/customer2'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
import draggable from "vuedraggable"; import requestGroup from '@/components/customer/request-group.vue'
export default defineComponent({ import draggable from 'vuedraggable'
export default defineComponent({
components: { components: {
departmentStaff, departmentStaff,
draggable requestGroup,
draggable
}, },
setup() { setup() {
const leftList = ref([ const leftList = ref([{
{ Id: 1,
Id: 1, Name: '领取公海客户'
Name: "领取公海客户" },
}, { {
Id: 2, Id: 2,
Name: "放弃到公海" Name: '放弃到公海'
}, { },
Id: 3, {
Name: "申请成为协作人" Id: 3,
}, { Name: '申请成为协作人'
Id: 4, },
Name: "添加协作人" {
}, { Id: 4,
Id: 5, Name: '添加协作人'
Name: "转移客户" },
}, { {
Id: 6, Id: 5,
Name: "删除客户跟进记录" Name: '转移客户'
}, { },
Id: 7, {
Name: "签到拜访设置" Id: 6,
}, { Name: '删除客户跟进记录'
Id: 8, },
Name: "创建企业" {
}, { Id: 7,
Id: 9, Name: '签到拜访设置'
Name: "写跟进" },
{
Id: 8,
Name: '创建企业'
},
{
Id: 9,
Name: '写跟进'
}
])
let curItem = ref(1)
let data = reactive({
data: {
IsPublicAudit: 1,
PublicGetDept: -1,
AbandonType: 1
},
showDptDialog: false,
defaultDpt: [],
DptDataTree: []
})
const changeActive = item => {
curItem.value = item.Id
}
const getConfig = () => {
customerService.getCustomerConfig({}).then(res => {
console.log('CONFIG', res.data.Data)
data.data = res.data.Data
})
}
const getDptTree = () => {
customerService.getDeptTree({}).then(res => {
console.log('DptDataTree', res.data.Data)
data.DptDataTree = res.data.Data
// 重组唯一id
if (data.DptDataTree.length == 0) return
data.DptDataTree.forEach((x: any) => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
} }
})
])
let curItem = ref(1)
let data = reactive({
data: {
IsPublicAudit: 1,
PublicGetDept: -1,
AbandonType: 1,
},
showDptDialog: false,
defaultDpt: [],
DptDataTree: []
}) })
const changeActive = (item) => { }
curItem.value = item.Id const getChildList = (ChildList: Array < any > ) => {
} ChildList.forEach(x => {
const getConfig = () => { x.newId = x.DataType + '-' + x.DeptId
customerService.getCustomerConfig({}).then((res) => { if (x.ChildList && x.ChildList.length > 0) {
console.log('CONFIG', res.data.Data) getChildList(x.ChildList)
data.data = res.data.Data }
})
}
const getDptTree = () => {
customerService.getDeptTree({}).then((res) => {
console.log('DptDataTree', res.data.Data)
data.DptDataTree = res.data.Data
// 重组唯一id
if (data.DptDataTree.length == 0) return
data.DptDataTree.forEach((x: any) => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
})
})
}
const getChildList = (ChildList: Array<any>) => {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
})
}
const getdpt = (val) => {
console.log('dpt', val)
}
//领取公海客户
const checkedPublicGetDept = () => {
data.showDptDialog = true
}
const setCustomerConfig = () => {
customerService.setCustomerConfig(data.data).then((res) => {
console.log('set', res.data.Data)
})
}
onMounted(() => {
getDptTree()
getConfig()
}) })
return { }
leftList, const getdpt = val => {
curItem, console.log('dpt', val)
changeActive, }
...toRefs(data), //领取公海客户
getdpt, const checkedPublicGetDept = () => {
checkedPublicGetDept, data.showDptDialog = true
setCustomerConfig, }
} const setCustomerConfig = () => {
customerService.setCustomerConfig(data.data).then(res => {
console.log('set', res.data.Data)
})
}
onMounted(() => {
getDptTree()
getConfig()
})
return {
leftList,
curItem,
changeActive,
...toRefs(data),
getdpt,
checkedPublicGetDept,
setCustomerConfig
}
} }
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .CustomerOperation {
background-color: rgb(243, 246, 249); background-color: rgb(243, 246, 249);
} }
.customer-operation-category {
.customer-operation-category {
margin-right: 10px; margin-right: 10px;
width: 200px; width: 200px;
flex: none; flex: none;
...@@ -219,32 +237,37 @@ export default defineComponent({ ...@@ -219,32 +237,37 @@ export default defineComponent({
border-radius: 8px; border-radius: 8px;
padding: 15px 0; padding: 15px 0;
overflow: auto; overflow: auto;
.customer-operation-category--item { .customer-operation-category--item {
padding: 15px 25px; padding: 15px 25px;
cursor: pointer; cursor: pointer;
font-weight: 600; font-weight: 600;
user-select: none; user-select: none;
color: #333; color: #333;
font-size: 14px; font-size: 14px;
} }
.active { .active {
background-color: #eaf0ff; background-color: #eaf0ff;
color: #3470ff; color: #3470ff;
} }
} }
.customer-operation-content {
.customer-operation-content {
background: #fff; background: #fff;
flex: 1; flex: 1;
border-radius: 8px; border-radius: 8px;
padding: 25px; padding: 25px;
overflow: auto; overflow: auto;
} }
.content-left {
.content-left {
line-height: 40px; line-height: 40px;
font-weight: 600; font-weight: 600;
white-space: nowrap; white-space: nowrap;
} }
.AbandonReasonItem {
.AbandonReasonItem {
width: 453px; width: 453px;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
...@@ -253,5 +276,6 @@ export default defineComponent({ ...@@ -253,5 +276,6 @@ export default defineComponent({
border-radius: 5px; border-radius: 5px;
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
margin: 10px; margin: 10px;
} }
</style>
\ No newline at end of file </style>
...@@ -4,58 +4,26 @@ ...@@ -4,58 +4,26 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input <q-input filled v-model="SeletObj.selectVal" clearable @clear="getCustomerList(msg)"
filled @update:model-value="getSelectWay(), getCustomerList(msg)" label="请输入">
v-model="SeletObj.selectVal"
clearable
@clear="getCustomerList(msg)"
@update:model-value="getSelectWay(), getCustomerList(msg)"
label="请输入"
>
<template #before> <template #before>
<q-select <q-select filled style="width:120px;" @update:model-value="getSelectWay" option-value="Id"
filled option-label="Name" v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options
style="width:120px;" label="选择类型" />
@update:model-value="getSelectWay"
option-value="Id"
option-label="Name"
v-model="SeletObj.selectWay"
:options="TypeList"
emit-value
map-options
label="选择类型"
/>
</template> </template>
</q-input> </q-input>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select <q-select filled option-value="Id" option-label="Name" v-model="TimeObj.timeWay" :options="TimeList"
filled emit-value map-options />
option-value="Id"
option-label="Name"
v-model="TimeObj.timeWay"
:options="TimeList"
emit-value
map-options
/>
</div> </div>
<template v-if="TimeObj.timeWay == 1"> <template v-if="TimeObj.timeWay == 1">
<div class="col-3"> <div class="col-3">
<q-input <q-input filled v-model="msg.CreateSTime" mask="date" @update:model-value="getCustomerList(msg)"
filled placeholder="创建时间">
v-model="msg.CreateSTime"
mask="date"
@update:model-value="getCustomerList(msg)"
placeholder="创建时间"
>
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
ref="qDateProxy"
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="msg.CreateSTime"> <q-date v-model="msg.CreateSTime">
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat /> <q-btn v-close-popup label="Close" color="primary" flat />
...@@ -67,21 +35,11 @@ ...@@ -67,21 +35,11 @@
</q-input> </q-input>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input <q-input filled v-model="msg.CreateETime" mask="date" @range-end="getCustomerList(msg)"
filled placeholder="创建时间">
v-model="msg.CreateETime"
mask="date"
@range-end="getCustomerList(msg)"
placeholder="创建时间"
>
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
ref="qDateProxy"
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="msg.CreateETime"> <q-date v-model="msg.CreateETime">
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat /> <q-btn v-close-popup label="Close" color="primary" flat />
...@@ -98,12 +56,7 @@ ...@@ -98,12 +56,7 @@
<q-input filled v-model="msg.FriendSTime" mask="date" placeholder="添加时间"> <q-input filled v-model="msg.FriendSTime" mask="date" placeholder="添加时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
ref="qDateProxy"
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="msg.FriendSTime"> <q-date v-model="msg.FriendSTime">
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat /> <q-btn v-close-popup label="Close" color="primary" flat />
...@@ -118,12 +71,7 @@ ...@@ -118,12 +71,7 @@
<q-input filled v-model="msg.FriendETime" mask="date" placeholder="添加时间"> <q-input filled v-model="msg.FriendETime" mask="date" placeholder="添加时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
ref="qDateProxy"
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="msg.FriendETime"> <q-date v-model="msg.FriendETime">
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat /> <q-btn v-close-popup label="Close" color="primary" flat />
...@@ -136,40 +84,16 @@ ...@@ -136,40 +84,16 @@
</div> </div>
</template> </template>
<div class="col-3"> <div class="col-3">
<q-select <q-select filled option-value="Id" option-label="Name" v-model="customSetObj.customWay"
filled :options="CustomList" emit-value map-options />
option-value="Id"
option-label="Name"
v-model="customSetObj.customWay"
:options="CustomList"
emit-value
map-options
/>
</div> </div>
<div class="col-3" v-if="customSetObj.customWay == 1"> <div class="col-3" v-if="customSetObj.customWay == 1">
<q-select <q-select filled label="请选择" use-chips @update:model-value="getCkedFriend" option-value="Id"
filled option-label="Name" :options="friendOptions" v-model="friendObj.frendArr" multiple />
label="请选择"
use-chips
@update:model-value="getCkedFriend"
option-value="Id"
option-label="Name"
:options="friendOptions"
v-model="friendObj.frendArr"
multiple
/>
</div> </div>
<div class="col-3" v-if="customSetObj.customWay == 2"> <div class="col-3" v-if="customSetObj.customWay == 2">
<q-select <q-select filled label="请选择" use-chips option-value="Id" option-label="Name" :options="data.WayList"
filled v-model="friendObj.wayArr" multiple />
label="请选择"
use-chips
option-value="Id"
option-label="Name"
:options="data.WayList"
v-model="friendObj.wayArr"
multiple
/>
</div> </div>
<div class="col-3" v-if="customSetObj.customWay == 3"> <div class="col-3" v-if="customSetObj.customWay == 3">
<q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input> <q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input>
...@@ -185,14 +109,12 @@ ...@@ -185,14 +109,12 @@
tipText="选择部门/人员" tipText="选择部门/人员"
@getChild="getChild" @getChild="getChild"
></selectTree>--> ></selectTree>-->
<Cascader <n-cascader v-model:value="data.CascaderValue" clearable placeholder="选择部门/人员" check-strategy="all"
:options="data.EmployeeList" value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
optionLabel="DeptName" :options="data.EmployeeList" cascade children-field="ChildList"
optionValue="newId" @update:value="CascaderUpdateValue" />
optionChildren="ChildList" <!-- <Cascader :options="data.EmployeeList" optionLabel="DeptName" optionValue="newId" optionChildren="ChildList"
label="选择部门/人员" label="选择部门/人员" :multiple="true" /> -->
:multiple="true"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-btn color="primary" size="sm" label="导入" /> <q-btn color="primary" size="sm" label="导入" />
...@@ -201,14 +123,8 @@ ...@@ -201,14 +123,8 @@
</div> </div>
</div> </div>
<div class="page-content" style="margin-top:20px;"> <div class="page-content" style="margin-top:20px;">
<q-table <q-table :rows="data.dataList" :columns="data.columns" class="my-sticky-header-column-table" row-key="name"
:rows="data.dataList" v-model:pagination="pagination" selection="multiple">
:columns="data.columns"
class="my-sticky-header-column-table"
row-key="name"
v-model:pagination="pagination"
selection="multiple"
>
<template v-slot:body-cell-CustomerName="props"> <template v-slot:body-cell-CustomerName="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<div class="cutomer_Header"> <div class="cutomer_Header">
...@@ -216,10 +132,7 @@ ...@@ -216,10 +132,7 @@
<img :src="props.row.WeChatPhoto" style="width:100%;height:100%" /> <img :src="props.row.WeChatPhoto" style="width:100%;height:100%" />
</div> </div>
<div> <div>
<div <div class="cutomer_Free" @click="getCustomInfo(props)">{{ props.row.CustomerName }}</div>
class="cutomer_Free"
@click="getCustomInfo(props)"
>{{ props.row.CustomerName }}</div>
<div class="customer_Wechat">{{ props.row.WeChatName }}</div> <div class="customer_Wechat">{{ props.row.WeChatName }}</div>
</div> </div>
</div> </div>
...@@ -231,14 +144,8 @@ ...@@ -231,14 +144,8 @@
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination <q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount"
class="full-width justify-end" :input="true" @update:model-value="changePage" />
v-model="msg.PageIndex"
color="primary"
:max="msg.pageCount"
:input="true"
@update:model-value="changePage"
/>
</template> </template>
</q-table> </q-table>
<customRight v-if="isShowCustom" :CustomerId="CustomerId" @close="closeCustomer"></customRight> <customRight v-if="isShowCustom" :CustomerId="CustomerId" @close="closeCustomer"></customRight>
...@@ -247,109 +154,119 @@ ...@@ -247,109 +154,119 @@
</div> </div>
</template> </template>
<script lang='ts'> <script lang='ts'>
import { ref, defineComponent, onMounted } from 'vue' import {
import CustomerModule from '@/module/customer/customerModule' ref,
// import selectTree from '@/components/common/selectTree.vue' defineComponent,
import customRight from '@/components/common/customRight.vue' onMounted
import Cascader from "@/components/common/Cascader.vue" } from 'vue'
export default defineComponent({ import CustomerModule from '@/module/customer/customerModule'
components: { // import selectTree from '@/components/common/selectTree.vue'
// selectTree, import customRight from '@/components/common/customRight.vue'
customRight, // import Cascader from "@/components/common/Cascader.vue"
Cascader export default defineComponent({
}, components: {
setup() { // selectTree,
let { customRight,
getCustomerList, // Cascader
getWayList, },
data, setup() {
msg, let {
title, getCustomerList,
TypeList, getWayList,
SeletObj, data,
getSelectWay, msg,
TimeObj, title,
TimeList, TypeList,
changePage, SeletObj,
pagination, getSelectWay,
CustomList, TimeObj,
customSetObj, TimeList,
friendObj, changePage,
friendOptions, pagination,
getEmployeeData, CustomList,
getChild, customSetObj,
getCkedFriend friendObj,
} = CustomerModule() friendOptions,
let isShowCustom = ref(false) getEmployeeData,
const closeCustomer = () => { getChild,
isShowCustom.value = false; getCkedFriend,
} CascaderUpdateValue
} = CustomerModule()
let isShowCustom = ref(false)
const closeCustomer = () => {
isShowCustom.value = false;
}
let CustomerId = ref(0); let CustomerId = ref(0);
const getCustomInfo = (item) => { const getCustomInfo = (item) => {
CustomerId.value = item.row.Id; CustomerId.value = item.row.Id;
isShowCustom.value = true; isShowCustom.value = true;
} }
onMounted(() => { onMounted(() => {
getCustomerList(msg) getCustomerList(msg)
getWayList({}) getWayList({})
getEmployeeData({}) getEmployeeData({})
}) })
return { return {
getCustomerList, getCustomerList,
getWayList, getWayList,
data, data,
msg, msg,
title, title,
TypeList, TypeList,
SeletObj, SeletObj,
getSelectWay, getSelectWay,
TimeObj, TimeObj,
TimeList, TimeList,
changePage, changePage,
pagination, pagination,
CustomList, CustomList,
customSetObj, customSetObj,
friendObj, friendObj,
friendOptions, friendOptions,
getEmployeeData, getEmployeeData,
getChild, getChild,
getCkedFriend, getCkedFriend,
isShowCustom, isShowCustom,
closeCustomer, closeCustomer,
CustomerId, CustomerId,
getCustomInfo getCustomInfo,
CascaderUpdateValue
}
} }
} })
})
</script> </script>
<style lang="scss"> <style lang="scss">
.customer .q-field__before { .customer .q-field__before {
padding-right: 0 !important; padding-right: 0 !important;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.cutomer_Header { .cutomer_Header {
display: flex; display: flex;
} }
.customer_Img { .customer_Img {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 5px; border-radius: 5px;
overflow: hidden; overflow: hidden;
margin-right: 14px; margin-right: 14px;
} }
.cutomer_Free { .cutomer_Free {
color: #3470ff; color: #3470ff;
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
} }
.customer_Wechat { .customer_Wechat {
color: #9999a8; color: #9999a8;
}
.n-base-selection-label{
height: 56px;
} }
</style> </style>
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