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
This diff is collapsed.
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