Commit 90b38508 authored by 罗超's avatar 罗超

1

parent de25e559
...@@ -14,24 +14,24 @@ import Axios from './axios' ...@@ -14,24 +14,24 @@ import Axios from './axios'
* @property {string} password -用户密码 * @property {string} password -用户密码
*/ */
interface CutomerParams { interface CutomerParams {
PageIndex: number, PageIndex: number
PageSize: number, PageSize: number
pageCount: number, pageCount: number
CorpName: string, //企业名称 CorpName: string //企业名称
CustomerName: string, //备注名 CustomerName: string //备注名
WeChatName: string, //昵称 WeChatName: string //昵称
CustomerMobile: string, //手机号码 CustomerMobile: string //手机号码
CreateSTime: string, //创建开始时间 CreateSTime: string //创建开始时间
CreateETime: string, //创建结束时间 CreateETime: string //创建结束时间
FriendSTime: string, //好友开始时间 FriendSTime: string //好友开始时间
FriendETime: string, //好友结束时间 FriendETime: string //好友结束时间
Q_NotFollowUpDay: number, //几天未跟进 Q_NotFollowUpDay: number //几天未跟进
Q_Friends: string, //好友关系 多选逗号分隔、 Q_Friends: string //好友关系 多选逗号分隔、
Q_AddWay: string, //获取来源 多选英文逗号分隔 Q_AddWay: string //获取来源 多选英文逗号分隔
EmpId: number, //员工id EmpId: number //员工id
CustomerType: number, //类型1微信用户 2企业微信用户 CustomerType: number //类型1微信用户 2企业微信用户
SelectList: Array<any>, //自定义查询 SelectList: Array<any> //自定义查询
OrderBy: number, //排序 OrderBy: number //排序
AddCondition: number //查询条件 AddCondition: number //查询条件
} }
......
...@@ -31,11 +31,10 @@ export default { ...@@ -31,11 +31,10 @@ export default {
const myAllCol = computed(() => { const myAllCol = computed(() => {
return props.allCol return props.allCol
}) })
const showCol = computed(() => { const showCol = computed(() => {
console.log(props.modelValue)
return props.modelValue return props.modelValue
}) })
const changeVisible = (e) => { const changeVisible = (e) => {
if (e.visible) { if (e.visible) {
showCol.value.push(e.value) showCol.value.push(e.value)
...@@ -43,7 +42,6 @@ export default { ...@@ -43,7 +42,6 @@ export default {
showCol.value.splice(showCol.value.indexOf(e.value), 1) showCol.value.splice(showCol.value.indexOf(e.value), 1)
} }
context.emit('update:modelValue', showCol.value) context.emit('update:modelValue', showCol.value)
console.log(showCol.value)
} }
return { myAllCol, scrollStyle, changeVisible } return { myAllCol, scrollStyle, changeVisible }
......
// import { ResultType } from '@/@types/enumHelper'
// import router from '@/router'
// import UserActions from '@/store/modules/user/actions'//{ UserActionsType }
// import { UserGetter } from '@/store/modules/user/getters'
// import { dispatchAction, getStoreGetter, setStoreState } from '@/store/utils'
// import message from '@/utils/message' // import message from '@/utils/message'
import { import dayjs from 'dayjs'
StaticConfig import { reactive } from 'vue'
} from '@/config/app' import customer, { CutomerParams } from '@/api/customer'
import { import customerSetService from '@/api/customerSet'
ref, import { ColumnDefaultState } from '@/@types/enumHelper'
reactive
} from 'vue'
import customer, {
CutomerParams
} from '@/api/customer'
interface Params {
selectVal: string
selectWay: number
}
interface timeParams {
timeWay: number
}
interface customParams {
customWay: number
}
interface friendParams {
frendArr: 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 >|null ChildList: Array < any > | null
} }
interface dataParams { interface dataParams {
columns: Array < any > loading: boolean
dataList: Array < any > columns: Array<any>
WayList: Array < any > sysColumns:Array<any>
selected: Array < any > showColumns: Array<any>
EmployeeList: Array < memberParams > allColumns: Array<any>
defaultArray: Array < number | string > dataList: Array<any>
CascaderValue: Array < any > | string WayList: Array<any>
selected: Array<any>
EmployeeList: Array<memberParams>
defaultArray: Array<number | string>
customerCascaderValue: Array<any> | string
deptCascaderValue: string | null
colLoadingFinish:boolean
} }
const CustomerModule = () => { const CustomerModule = () => {
//调用方法 //获取列表
const getCustomerList = (param: CutomerParams) => { const getCustomerList = () => {
customer.getCustomerList(param).then(res => { data.loading=true
console.log(res, '数据') customer.getCustomerList(msg).then(res => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
data.loading = false
data.dataList = res.data.Data.PageData data.dataList = res.data.Data.PageData
msg.pageCount = res.data.Data.PageCount msg.pageCount = res.data.Data.PageCount
} }
...@@ -64,20 +47,19 @@ const CustomerModule = () => { ...@@ -64,20 +47,19 @@ const CustomerModule = () => {
}) })
} }
//获取员工数据 //获取员工数据
const getEmployeeData = (param: any) => { const getEmployeeData = () => {
customer.getEmployeeData(param).then(res => { customer.getEmployeeData({}).then(res => {
data.EmployeeList = res.data.Data data.EmployeeList = res.data.Data
console.log(data, '员工数据')
// 重组唯一id // 重组唯一id
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.DataType === 2) { if (x.DataType === 2) {
x.ChildList = null x.ChildList = null
} }
if (x.ChildList && x.ChildList.length > 0) { if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList) getChildList(x.ChildList)
} }
}) })
}) })
} }
...@@ -92,25 +74,27 @@ const CustomerModule = () => { ...@@ -92,25 +74,27 @@ const CustomerModule = () => {
} }
}) })
} }
const title = ref(StaticConfig.appsuffix)
//控制页显示条数 //控制页显示条数
const pagination = reactive({ const pagination = reactive({
rowsPerPage: 0 rowsPerPage: 0
}) })
//日期对象
// const daySelect = const data = reactive<dataParams>({
const data = reactive < dataParams > ({ loading: false,
columns: [{ columns: [
{
name: 'CustomerName', name: 'CustomerName',
label: '客户', label: '客户',
field: 'CustomerName', field: 'CustomerName',
align: 'left' align: 'left'
}, }
],
sysColumns: [
{ {
name: 'StageName', name: 'StageName',
align: 'center', label: '客户阶段',
field: 'StageName', field: 'StageName',
label: '客户阶段' align: 'left'
}, },
{ {
name: 'LableList', name: 'LableList',
...@@ -124,12 +108,6 @@ const CustomerModule = () => { ...@@ -124,12 +108,6 @@ const CustomerModule = () => {
field: 'carbs', field: 'carbs',
align: 'left' align: 'left'
}, },
{
name: 'CreateTime',
label: '创建时间',
field: 'CreateTime',
align: 'left'
},
{ {
name: 'sodium', name: 'sodium',
label: '负责人', label: '负责人',
...@@ -148,8 +126,6 @@ const CustomerModule = () => { ...@@ -148,8 +126,6 @@ const CustomerModule = () => {
field: 'Source', field: 'Source',
align: 'left' align: 'left'
}, },
// { name: 'num', label: '7日内客户回复消息数', align: 'left'},
// { name: 'num', label: '7日内员工发送消息数', align: 'left'},
{ {
name: 'FriendTime', name: 'FriendTime',
label: '添加好友时间', label: '添加好友时间',
...@@ -163,14 +139,18 @@ const CustomerModule = () => { ...@@ -163,14 +139,18 @@ const CustomerModule = () => {
align: 'left' align: 'left'
} }
], ],
showColumns: ['CustomerName'], //对应allColumns的value
allColumns: [],
selected: [], selected: [],
dataList: [], dataList: [],
WayList: [], WayList: [],
EmployeeList: [], EmployeeList: [],
defaultArray: [], // defaultArray: [], //
CascaderValue: "" deptCascaderValue: null,
customerCascaderValue: '',
colLoadingFinish: false
}) })
const msg = reactive({ const msg = reactive<CutomerParams>({
PageIndex: 1, PageIndex: 1,
PageSize: 10, PageSize: 10,
pageCount: 0, pageCount: 0,
...@@ -186,7 +166,6 @@ const CustomerModule = () => { ...@@ -186,7 +166,6 @@ const CustomerModule = () => {
Q_Friends: '', //好友关系 多选逗号分隔、 Q_Friends: '', //好友关系 多选逗号分隔、
Q_AddWay: '', //获取来源 多选英文逗号分隔 Q_AddWay: '', //获取来源 多选英文逗号分隔
EmpId: 0, //员工id EmpId: 0, //员工id
DeptId: 0, //部门id
CustomerType: 0, //类型1微信用户 2企业微信用户 CustomerType: 0, //类型1微信用户 2企业微信用户
SelectList: [], //自定义查询 SelectList: [], //自定义查询
OrderBy: 1, //排序 OrderBy: 1, //排序
...@@ -218,46 +197,65 @@ const CustomerModule = () => { ...@@ -218,46 +197,65 @@ const CustomerModule = () => {
Id: 2 Id: 2
} }
]) ])
//自定义客户筛选 //切换时间范围
const CustomList = reactive([{ const changeTime = () => {
Name: '好友关系', msg.FriendSTime = ''
Id: 1 msg.FriendETime = ''
}, msg.CreateSTime = ''
{ msg.CreateETime = ''
Name: '获取途径', TimeObj.timeRange=null
Id: 2 }
}, //选择时间范围
{ const changeTimeRange = val => {
Name: '未跟进客户', if (val) {
Id: 3 const s = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss')
const e = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss')
if (TimeObj.timeWay == 1) {
msg.CreateSTime = s
msg.CreateETime = e
} else {
msg.FriendSTime = s
msg.FriendETime = e
}
} else {
msg.FriendSTime = ''
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
} }
]) getCustomerList()
const friendOptions = reactive([{ }
Name: '好友客户', //客户筛选
Id: 1 const CustomList = reactive([{
label: '好友关系',
value: '1',
children: [{
label: '未添加',
value: '1-1'
},
{
label: '已添加',
value: '1-2'
}
]
}, },
{ {
Name: '待添加', label: '获取途径',
Id: 2 value: 2
}, },
{ {
Name: '已申请', label: '未跟进客户',
Id: 3 value: 3
} }
]) ])
const SeletObj = reactive < Params > ({
const SeletObj = reactive ({
selectVal: '', selectVal: '',
selectWay: 0 selectWay: 0
}) })
const TimeObj = reactive < timeParams > ({ const TimeObj = reactive ({
timeWay: 1 timeWay: 1,
}) timeRange: null
const customSetObj = reactive < customParams > ({
customWay: 1
})
const friendObj = reactive < friendParams > ({
frendArr: [],
wayArr: []
}) })
//选择方式 //选择方式
const getSelectWay = () => { const getSelectWay = () => {
...@@ -281,39 +279,52 @@ const CustomerModule = () => { ...@@ -281,39 +279,52 @@ const CustomerModule = () => {
} }
const changePage = (val: any) => { const changePage = (val: any) => {
msg.PageIndex = val msg.PageIndex = val
getCustomerList(msg) getCustomerList()
} }
const getChild = (deptArray: any) => { const getDept = (id: any) => {
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID //数据处理 获取id是 1-id,2-id 前面1代表部门2代表人员 后面是原生ID
if (deptArray._value) { if (id) {
const Type = deptArray._value.split('-')[0] msg.EmpId = id.slice(2)
const MyId = deptArray._value.split('-')[1]
//1部门
if (Type == 1) {
msg.DeptId = MyId
}
//2人员
if (Type == 2) {
msg.EmpId = MyId
}
} else { } else {
msg.DeptId = 0
msg.EmpId = 0 msg.EmpId = 0
} }
getCustomerList(msg) getCustomerList()
}
const getCkedFriend = (e: any) => {
const Ids = e
.map((x: any) => {
return x.Id
})
.toString()
msg.Q_Friends = Ids
getCustomerList(msg)
} }
const CascaderUpdateValue = (val) => { const customerUpdateValue = val => {
console.log('val', val) console.log('customerUpdateValue', val)
} }
data.sysColumns.map(e => {
data.columns.push(e)
data.showColumns.push(e.field)
data.allColumns.push({ name: e.label, value: e.field, visible: true, IsCustom: 0 })
})
customerSetService
.getCustomerFiledList({
Enable: 1
})
.then(r => {
const tempCol = r.data.Data
if (tempCol && tempCol.length > 0) {
tempCol.sort((x, y) => {
return x.Sort - y.Sort
})
tempCol.forEach(x => {
const tempRow = { name: x.Name, label: x.Name, field: x.Name, align: 'left' }
data.columns.push(tempRow)
if (x.IsDefault == ColumnDefaultState.Yes) {
data.showColumns.push(x.Name)
}
data.allColumns.push({ name: x.Name, value: x.Name, visible: x.IsDefault == ColumnDefaultState.Yes, data: x, IsCustom: 1 })
})
}
//#region 添加菜单权限
data.columns.push({ name: 'setting', label: '自定义列', field: 'setting', align: 'left' })
data.showColumns.push('setting')
//#endregion
data.colLoadingFinish = true
})
return { return {
getCustomerList, getCustomerList,
...@@ -321,21 +332,18 @@ const CustomerModule = () => { ...@@ -321,21 +332,18 @@ const CustomerModule = () => {
getEmployeeData, getEmployeeData,
data, data,
msg, msg,
title,
TypeList, TypeList,
SeletObj, SeletObj,
getSelectWay, getSelectWay,
TimeObj, TimeObj,
TimeList, TimeList,
changeTime,
changeTimeRange,
changePage, changePage,
pagination, pagination,
CustomList, CustomList,
customSetObj, getDept,
friendObj, customerUpdateValue,
friendOptions,
getChild,
getCkedFriend,
CascaderUpdateValue
} }
} }
......
<template> <template>
<div class="q-pa-md customer"> <div class="q-pa-md customer">
<q-page padding style="background: #FFF;border-radius: 10px;"> <q-page padding style="background: #fff; border-radius: 10px">
<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 filled v-model="SeletObj.selectVal" clearable @clear="getCustomerList(msg)" <q-input filled v-model="SeletObj.selectVal" clearable @clear="getCustomerList"
@update:model-value="getSelectWay(), getCustomerList(msg)" label="请输入"> @update:model-value="getSelectWay(), getCustomerList" placeholder="请输入">
<template #before> <template #before>
<q-select filled style="width:120px;" @update:model-value="getSelectWay" option-value="Id" <div style="border-right: 1px solid #999">
option-label="Name" v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options <q-select filled @update:model-value="getSelectWay" option-value="Id" option-label="Name"
label="选择类型" /> v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options />
</div>
</template> </template>
</q-input> </q-input>
</div> </div>
<div class="col-3"> <div class="flex no-wrap">
<q-select filled option-value="Id" option-label="Name" v-model="TimeObj.timeWay" :options="TimeList" <q-select filled option-value="Id" option-label="Name" v-model="TimeObj.timeWay" :options="TimeList"
emit-value map-options /> emit-value map-options @update:model-value="changeTime"> </q-select>
</div> <n-config-provider :locale="zhCN" :date-locale="dateZhCN">
<template v-if="TimeObj.timeWay == 1"> <n-date-picker v-model:value="TimeObj.timeRange" type="datetimerange" size="large" separator="至" clearable
<div class="col-3"> class="full-height" @update:value='changeTimeRange'/>
<q-input filled v-model="msg.CreateSTime" mask="date" @update:model-value="getCustomerList(msg)" </n-config-provider>
placeholder="创建时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.CreateSTime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="msg.CreateETime" mask="date" @range-end="getCustomerList(msg)"
placeholder="创建时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.CreateETime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
</template>
<template v-if="TimeObj.timeWay == 2">
<div class="col-3">
<q-input filled v-model="msg.FriendSTime" mask="date" placeholder="添加时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.FriendSTime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="msg.FriendETime" mask="date" placeholder="添加时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.FriendETime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
</template>
<div class="col-3">
<q-select filled option-value="Id" option-label="Name" v-model="customSetObj.customWay"
:options="CustomList" emit-value map-options />
</div>
<div class="col-3" v-if="customSetObj.customWay == 1">
<q-select filled 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-2">
<q-select filled label="请选择" use-chips option-value="Id" option-label="Name" :options="data.WayList" <n-cascader v-model:value="data.customerCascaderValue" clearable placeholder="客户筛选" check-strategy="child"
v-model="friendObj.wayArr" multiple /> size="large" :show-path="false" max-tag-count="responsive" multiple :options="CustomList" cascade
@update:value="customerUpdateValue" />
</div> </div>
<div class="col-3" v-if="customSetObj.customWay == 3"> <div class="col-2">
<q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input> <n-cascader v-model:value="data.deptCascaderValue" clearable placeholder="选择部门/人员" check-strategy="all"
</div>
<div class="col-3">
<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" value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
:options="data.EmployeeList" cascade children-field="ChildList" :options="data.EmployeeList" cascade children-field="ChildList" @update:value="getDept" />
@update:value="CascaderUpdateValue" />
</div> </div>
<div class="col-3"> <div class="col-2">
<q-btn color="primary" size="sm" label="导入" /> <q-btn color="primary" size="sm" label="导入" />
<q-btn color="primary" size="sm" style="margin-left:20px;" label="导出" /> <q-btn color="primary" size="sm" style="margin-left: 20px" label="导出" />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content" style="margin-top:20px;"> <div class="page-content" style="margin-top: 20px">
<q-table :rows="data.dataList" :columns="data.columns" class="my-sticky-header-column-table" row-key="name" <q-table :rows="data.dataList" :columns="data.columns" class="sticky-tow-column-table full-height sticky-right-column-table" row-key="Id" :loading="data.loading"
v-model:pagination="pagination" selection="multiple"> v-model:pagination="pagination" selection="multiple" v-model:selected="data.selected" :visible-columns="data.showColumns">
<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">
<div class="customer_Img"> <div class="customer_Img">
<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 class="cutomer_Free" @click="getCustomInfo(props)">{{ props.row.CustomerName }}</div> <div class="cutomer_Free" @click="getCustomInfo(props)">{{ props.row.CustomerName }}</div>
...@@ -128,20 +57,37 @@ ...@@ -128,20 +57,37 @@
</template> </template>
<template v-slot:body-cell-LableList="props"> <template v-slot:body-cell-LableList="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<q-chip v-for="(item,index) in props.row.LableList" :key="index">{{ item }}</q-chip> <q-chip v-for="(item, index) in props.row.LableList" :key="index">{{ item }}</q-chip>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount" <q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount"
:input="true" @update:model-value="changePage" /> :input="true" @update:model-value="changePage" />
</template> </template>
<template v-for="x in data.allColumns.filter(x=>x.IsCustom>0)" :key="x.value" v-slot:[`body-cell-${x.value}`]="props">
<q-td auto-width :props="props">
{{props.row.CustomFiledList.find(y=>y.Name==x.name).ShowValue}}
</q-td>
</template>
<template v-slot:body-cell-setting="props">
<q-td :props="props" style="background:rgba(0,0,0,0)"></q-td>
</template>
<template v-slot:header-cell-setting="props">
<q-th class="mysetting" :props="props">
<i class="iconfont icon-tiaojieqi cursor-pointer" style="font-size:20px;">
<q-popup-proxy>
<visible-columns v-model="data.showColumns" :allCol="data.allColumns"></visible-columns>
</q-popup-proxy>
</i>
</q-th>
</template>
</q-table> </q-table>
<customRight v-if="isShowCustom" :CustomerId="CustomerId" @close="closeCustomer"></customRight> <customRight v-if="isShowCustom" :CustomerId="CustomerId" @close="closeCustomer"></customRight>
</div> </div>
</q-page> </q-page>
</div> </div>
</template> </template>
<script lang='ts'> <script lang="ts">
import { import {
ref, ref,
defineComponent, defineComponent,
...@@ -149,9 +95,15 @@ ...@@ -149,9 +95,15 @@
} from 'vue' } from 'vue'
import CustomerModule from '@/module/customer/customerModule' import CustomerModule from '@/module/customer/customerModule'
import customRight from '@/components/common/customRight.vue' import customRight from '@/components/common/customRight.vue'
import visibleColumns from '@/components/common/visibleColumns.vue'
import {
zhCN,
dateZhCN
} from 'naive-ui'
export default defineComponent({ export default defineComponent({
components: { components: {
customRight, customRight,
visibleColumns
}, },
setup() { setup() {
let { let {
...@@ -159,64 +111,58 @@ ...@@ -159,64 +111,58 @@
getWayList, getWayList,
data, data,
msg, msg,
title,
TypeList, TypeList,
SeletObj, SeletObj,
getSelectWay, getSelectWay,
TimeObj, TimeObj,
TimeList, TimeList,
changeTime,
changeTimeRange,
changePage, changePage,
pagination, pagination,
CustomList, CustomList,
customSetObj,
friendObj,
friendOptions,
getEmployeeData, getEmployeeData,
getChild, getDept,
getCkedFriend, customerUpdateValue,
CascaderUpdateValue
} = CustomerModule() } = CustomerModule()
let isShowCustom = ref(false) let isShowCustom = ref(false)
const closeCustomer = () => { const closeCustomer = () => {
isShowCustom.value = false; 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()
getWayList({}) getWayList({})
getEmployeeData({}) getEmployeeData()
}) })
return { return {
zhCN,
dateZhCN,
getCustomerList, getCustomerList,
getWayList,
data, data,
msg, msg,
title,
TypeList, TypeList,
SeletObj, SeletObj,
getSelectWay, getSelectWay,
TimeObj, TimeObj,
TimeList, TimeList,
changeTime,
changeTimeRange,
changePage, changePage,
pagination, pagination,
CustomList, CustomList,
customSetObj,
friendObj,
friendOptions,
getEmployeeData,
getChild,
getCkedFriend,
isShowCustom, isShowCustom,
closeCustomer, closeCustomer,
getDept,
CustomerId, CustomerId,
getCustomInfo, getCustomInfo,
CascaderUpdateValue customerUpdateValue,
} }
} }
}) })
...@@ -250,15 +196,30 @@ ...@@ -250,15 +196,30 @@
.customer_Wechat { .customer_Wechat {
color: #9999a8; color: #9999a8;
} }
::v-deep .n-base-selection-label{
height: 54px; ::v-deep .n-base-selection-label {
background-color: rgba(0, 0, 0, 0.05); height: 54px;
border: none !important; background-color: rgba(0, 0, 0, 0.05);
} border: none !important;
::v-deep .n-base-selection-input{ }
height: 54px;
display: flex; ::v-deep .n-base-selection-input {
align-items: center; height: 54px;
border: none !important; display: flex;
} align-items: center;
border: none !important;
}
::v-deep .n-input {
height: 100%;
border: none;
display: flex;
align-items: center;
}
::v-deep .n-base-selection-tags {
height: 54px;
background-color: rgba(0, 0, 0, 0.05);
}
</style> </style>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<q-btn color="primary" :disable="!PublicGetDeptState" unelevated label="修改" size="xs" class="q-ml-lg" <q-btn color="primary" :disable="!PublicGetDeptState" unelevated label="修改" size="xs" class="q-ml-lg"
@click="checkedPublicGetDept" /> @click="checkedPublicGetDept" />
</div> </div>
<div> <div v-if="PublicGetDeptState">
<div v-for="(item,index) in PublicGetDeptNameList" :key="index" class="dept-item"> <div v-for="(item,index) in PublicGetDeptNameList" :key="index" class="dept-item">
<div class="flex justify-center items-center"> <div class="flex justify-center items-center">
<q-icon name="work" color="primary" v-if="item.Type==1" /> <q-icon name="work" color="primary" v-if="item.Type==1" />
...@@ -33,8 +33,7 @@ ...@@ -33,8 +33,7 @@
<Abandon v-model:AabandonType="data.AbandonType" v-model:AbandonDept="data.AbandonDept" <Abandon v-model:AabandonType="data.AbandonType" v-model:AbandonDept="data.AbandonDept"
v-model:AbandonAudit="data.AbandonAudit" :AbandonReasonList="data.AbandonReasonList" v-model:AbandonAudit="data.AbandonAudit" :AbandonReasonList="data.AbandonReasonList"
v-model:AbandonReason="data.AbandonReason" v-model:AbandonSelectType="data.AbandonSelectType" v-model:AbandonReason="data.AbandonReason" v-model:AbandonSelectType="data.AbandonSelectType"
:AbandonEmpList="data.AbandonEmpList" :AbandonDeptList="data.AbandonDeptList" :AbandonEmpList="data.AbandonEmpList" :AbandonDeptList="data.AbandonDeptList" />
/>
</div> </div>
<div v-if="curItem == 3" class="row"> <div v-if="curItem == 3" class="row">
<div class="collaborator-title">申请成为协作人:</div> <div class="collaborator-title">申请成为协作人:</div>
...@@ -226,7 +225,7 @@ ...@@ -226,7 +225,7 @@
AbandonReasonList: [], AbandonReasonList: [],
}, },
PublicGetDeptState: false, //以下部门允许领取公海客户 PublicGetDeptState: false, //以下部门允许领取公海客户
PublicGetDeptNameList:[],//允许领取公海客户列表 PublicGetDeptNameList: [], //允许领取公海客户列表
showDptDialog: false, showDptDialog: false,
DptDataTreeDefault: [], //部门默认值 DptDataTreeDefault: [], //部门默认值
}) })
...@@ -245,7 +244,15 @@ ...@@ -245,7 +244,15 @@
} else { } else {
data.PublicGetDeptState = true data.PublicGetDeptState = true
} }
const PublicGetDeptList = data.data.PublicGetDeptList.map(e => {
e.Type = 1
return e
})
const PublicGetEmpList = data.data.PublicGetEmpList.map(e => {
e.Type = 2
return e
})
data.PublicGetDeptNameList=[...PublicGetDeptList,...PublicGetEmpList]
}) })
} }
const getDptTree = () => { const getDptTree = () => {
...@@ -270,8 +277,7 @@ ...@@ -270,8 +277,7 @@
} }
//保存客户操作配置 //保存客户操作配置
const setCustomerConfig = () => { const setCustomerConfig = () => {
customerSetService.setCustomerConfig(data.data).then(res => { customerSetService.setCustomerConfig(data.data).then(() => {
console.log('set', res.data.Data)
message.successMsg('设置成功') message.successMsg('设置成功')
getConfig() getConfig()
}) })
...@@ -292,7 +298,7 @@ ...@@ -292,7 +298,7 @@
const dept = JSON.parse(JSON.stringify(val)) const dept = JSON.parse(JSON.stringify(val))
if (curItem.value === 1) { if (curItem.value === 1) {
data.data.PublicGetDept = ids data.data.PublicGetDept = ids
data.data.PublicGetDeptList = dept data.PublicGetDeptNameList = dept
} }
if (curItem.value === 2) { if (curItem.value === 2) {
data.data.AbandonDept = ids data.data.AbandonDept = ids
......
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