Commit 02594cbf authored by Mac's avatar Mac

1

parent 0378047c
......@@ -555,6 +555,16 @@ export function SetSynvEduEmployee(data) {
data
})
}
/**
* 获取部门Id
*/
export function getEmployeeAddrBook(data) {
return request({
url: '/User/GetEmployeeAddrBook',
method: 'post',
data
})
}
......
<template>
<div class="customer page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @keyup.enter.native="changePage(1)" clearable standout="bg-primary text-white"
v-model="msg.Name" label="企业/姓名/备注名/昵称/电话" @clear="changePage(1)" maxlength="20" />
</div>
<div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name"
v-model="msg.customerType" ref="Id" :options="ctypeList" label="客户类型" :dense="false" emit-value
map-options />
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="changePage(1)" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
:picker-options="pickerOptions"  range-separator="至"  start-placeholder="开始时间"
 end-placeholder="结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
<div class="col-3">
<selectTree :treeData='memberList' :defaultArray="returnString" nodeKey="newId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门/人员" @getChild="getChild"></selectTree>
</div>
</div>
</div>
<div class="page-content">
</div>
</div>
</template>
<script>
import selectTree from '../../../components/common/select-tree'
import {
getEmployeeAddrBook
} from '../../../api/system/wechat';
export default {
components: {
selectTree
},
meta: {
title: "客户"
},
name: "customer",
data() {
return {
loading: false,
pickerOptions: {
shortcuts: [{
text: '今天',
onClick(picker) {
const end = new Date();
const start = new Date();
picker.$emit('pick', [start, end]);
}
}, {
text: '昨天',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
msg: {
Name: '',
customerType: 0
},
returnString :[],
dateList: [],//创建时间
ctypeList: [{ Id: 0, Name: '全部客户' }, { Id: 1, Name: '好友客户' },],
memberList: [],
}
},
mounted() {
this.getEmployList()
},
created() {
this.getEmployList()
},
methods: {
changePage(e) {
this.msg.pageIndex = e
this.getList()
},
getList() {
},
getEmployList() {
getEmployeeAddrBook({}).then(res => {
if (res.Code == 1) {
this.memberList = res.Data
// 重组唯一id
if(this.memberList && this.memberList.length==0) return
this.memberList.forEach(x=>{
x.newId = x.DataType+'-'+x.DeptId
if(x.ChildList && x.ChildList.length>0){
this.getChildList(x.ChildList)
}
})
}
}).catch(() => {
})
},
getChildList(ChildList){
ChildList.forEach(x=>{
x.newId = x.DataType+'-'+x.DeptId
if(x.ChildList && x.ChildList.length>0){
this.getChildList(x.ChildList)
}
})
},
getChild(deptArray) {
console.log(deptArray)
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
},
clearData(){
}
}
}
</script>
<style>
.customer .el-input {
width: 100%;
border: none;
background-color: transparent;
}
.customer .el-input__inner {
width: 100%;
border: none;
background-color: transparent;
}
.customer .el-range-input {
background-color: transparent !important;
}
</style>
\ No newline at end of file
......@@ -1307,6 +1307,11 @@ const routes = [{
component: () =>
import("pages/enterprise/customer/CSChild/addPhase")
},
{
path: "/enterprise/customer/customer", //企微 客户管理 客户
component: () =>
import("pages/enterprise/customer/customer")
},
],
},
......
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