Commit 7def1715 authored by 罗超's avatar 罗超

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

parents 528bcda8 90b38508
......@@ -14,24 +14,24 @@ import Axios from './axios'
* @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, //排序
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 //查询条件
}
......
......@@ -29,7 +29,7 @@
<div class="flex-center">
<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>
<span class="q-ml-sm">{{ item.DeptName }}</span>
</div>
<q-icon name="cancel" @click="delItem(item.Id, index)"></q-icon>
</div>
......@@ -40,7 +40,7 @@
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="取消" v-close-popup />
<q-btn color="primary" @click="goback" flat label="确定" />
<q-btn color="primary" @click="goback" unelevated label="确定" />
</q-card-actions>
</q-card>
</q-dialog>
......@@ -56,7 +56,7 @@
}
interface SelectParams {
Id: string
Name: string
DeptName: string
Type: number
}
export default {
......@@ -153,7 +153,7 @@
flag = false
} else {
ticketArr.value = JSON.parse(JSON.stringify(props.defaultArray))
console.log('默认值',ticketArr.value)
console.log('默认值',ticketArr.value)
}
}
......@@ -181,7 +181,7 @@
if (flag == true) {
selectArray.value.push({
Id: j[props.nodeKey],
Name: j.DeptName,
DeptName: j.DeptName,
Type: j.DataType
})
} else {
......
......@@ -31,11 +31,10 @@ export default {
const myAllCol = computed(() => {
return props.allCol
})
const showCol = computed(() => {
console.log(props.modelValue)
return props.modelValue
})
const changeVisible = (e) => {
if (e.visible) {
showCol.value.push(e.value)
......@@ -43,7 +42,6 @@ export default {
showCol.value.splice(showCol.value.indexOf(e.value), 1)
}
context.emit('update:modelValue', showCol.value)
console.log(showCol.value)
}
return { myAllCol, scrollStyle, changeVisible }
......
......@@ -283,7 +283,6 @@
}
]
const init = () => {
console.log('init', props.defaultData)
if (props.defaultData && props.defaultData.length > 0) {
addMsg.value = []
props.defaultData.map((e: any) => {
......@@ -410,7 +409,6 @@
IsCustom: 2
}
filedList.value.unshift(obj2)
console.log('标签', filedList.value)
})
}
const deleteadd = index => {
......@@ -463,7 +461,6 @@
let find2: any = addMsg.value.find(e => {
return e.Id == 17
})
console.log('生日2', find2)
if (find2) {
filedList.value.map(_e => {
if (_e.Id == 17) {
......@@ -568,7 +565,6 @@
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
}
......
// 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 {
StaticConfig
} from '@/config/app'
import {
ref,
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 >
}
import dayjs from 'dayjs'
import { reactive } from 'vue'
import customer, { CutomerParams } from '@/api/customer'
import customerSetService from '@/api/customerSet'
import { ColumnDefaultState } from '@/@types/enumHelper'
interface memberParams {
newId: number | string
DataType: number | string
DeptId: number
ChildList: Array < any >|null
ChildList: Array < any > | null
}
interface dataParams {
columns: Array < any >
dataList: Array < any >
WayList: Array < any >
selected: Array < any >
EmployeeList: Array < memberParams >
defaultArray: Array < number | string >
CascaderValue: Array < any > | string
loading: boolean
columns: Array<any>
sysColumns:Array<any>
showColumns: Array<any>
allColumns: Array<any>
dataList: Array<any>
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 getCustomerList = (param: CutomerParams) => {
customer.getCustomerList(param).then(res => {
console.log(res, '数据')
//获取列表
const getCustomerList = () => {
data.loading=true
customer.getCustomerList(msg).then(res => {
if (res.data.Code == 1) {
data.loading = false
data.dataList = res.data.Data.PageData
msg.pageCount = res.data.Data.PageCount
}
......@@ -64,10 +47,9 @@ const CustomerModule = () => {
})
}
//获取员工数据
const getEmployeeData = (param: any) => {
customer.getEmployeeData(param).then(res => {
const getEmployeeData = () => {
customer.getEmployeeData({}).then(res => {
data.EmployeeList = res.data.Data
console.log(data, '员工数据')
// 重组唯一id
if (data.EmployeeList.length == 0) return
data.EmployeeList.forEach(x => {
......@@ -92,25 +74,27 @@ const CustomerModule = () => {
}
})
}
const title = ref(StaticConfig.appsuffix)
//控制页显示条数
const pagination = reactive({
rowsPerPage: 0
})
//日期对象
// const daySelect =
const data = reactive < dataParams > ({
columns: [{
const data = reactive<dataParams>({
loading: false,
columns: [
{
name: 'CustomerName',
label: '客户',
field: 'CustomerName',
align: 'left'
},
}
],
sysColumns: [
{
name: 'StageName',
align: 'center',
label: '客户阶段',
field: 'StageName',
label: '客户阶段'
align: 'left'
},
{
name: 'LableList',
......@@ -124,12 +108,6 @@ const CustomerModule = () => {
field: 'carbs',
align: 'left'
},
{
name: 'CreateTime',
label: '创建时间',
field: 'CreateTime',
align: 'left'
},
{
name: 'sodium',
label: '负责人',
......@@ -148,8 +126,6 @@ const CustomerModule = () => {
field: 'Source',
align: 'left'
},
// { name: 'num', label: '7日内客户回复消息数', align: 'left'},
// { name: 'num', label: '7日内员工发送消息数', align: 'left'},
{
name: 'FriendTime',
label: '添加好友时间',
......@@ -163,14 +139,18 @@ const CustomerModule = () => {
align: 'left'
}
],
showColumns: ['CustomerName'], //对应allColumns的value
allColumns: [],
selected: [],
dataList: [],
WayList: [],
EmployeeList: [],
defaultArray: [], //
CascaderValue: ""
deptCascaderValue: null,
customerCascaderValue: '',
colLoadingFinish: false
})
const msg = reactive({
const msg = reactive<CutomerParams>({
PageIndex: 1,
PageSize: 10,
pageCount: 0,
......@@ -186,7 +166,6 @@ const CustomerModule = () => {
Q_Friends: '', //好友关系 多选逗号分隔、
Q_AddWay: '', //获取来源 多选英文逗号分隔
EmpId: 0, //员工id
DeptId: 0, //部门id
CustomerType: 0, //类型1微信用户 2企业微信用户
SelectList: [], //自定义查询
OrderBy: 1, //排序
......@@ -218,46 +197,65 @@ const CustomerModule = () => {
Id: 2
}
])
//自定义客户筛选
//切换时间范围
const changeTime = () => {
msg.FriendSTime = ''
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
TimeObj.timeRange=null
}
//选择时间范围
const changeTimeRange = val => {
if (val) {
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 CustomList = reactive([{
Name: '好友关系',
Id: 1
},
{
Name: '获取途径',
Id: 2
label: '好友关系',
value: '1',
children: [{
label: '未添加',
value: '1-1'
},
{
Name: '未跟进客户',
Id: 3
label: '已添加',
value: '1-2'
}
])
const friendOptions = reactive([{
Name: '好友客户',
Id: 1
]
},
{
Name: '待添加',
Id: 2
label: '获取途径',
value: 2
},
{
Name: '已申请',
Id: 3
label: '未跟进客户',
value: 3
}
])
const SeletObj = reactive < Params > ({
const SeletObj = reactive ({
selectVal: '',
selectWay: 0
})
const TimeObj = reactive < timeParams > ({
timeWay: 1
})
const customSetObj = reactive < customParams > ({
customWay: 1
})
const friendObj = reactive < friendParams > ({
frendArr: [],
wayArr: []
const TimeObj = reactive ({
timeWay: 1,
timeRange: null
})
//选择方式
const getSelectWay = () => {
......@@ -281,39 +279,52 @@ const CustomerModule = () => {
}
const changePage = (val: any) => {
msg.PageIndex = val
getCustomerList(msg)
}
const getChild = (deptArray: any) => {
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
if (deptArray._value) {
const Type = deptArray._value.split('-')[0]
const MyId = deptArray._value.split('-')[1]
//1部门
if (Type == 1) {
msg.DeptId = MyId
}
//2人员
if (Type == 2) {
msg.EmpId = MyId
getCustomerList()
}
const getDept = (id: any) => {
//数据处理 获取id是 1-id,2-id 前面1代表部门2代表人员 后面是原生ID
if (id) {
msg.EmpId = id.slice(2)
} else {
msg.DeptId = 0
msg.EmpId = 0
}
getCustomerList(msg)
getCustomerList()
}
const getCkedFriend = (e: any) => {
const Ids = e
.map((x: any) => {
return x.Id
const customerUpdateValue = 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
})
.toString()
msg.Q_Friends = Ids
getCustomerList(msg)
.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)
}
const CascaderUpdateValue = (val) => {
console.log('val', val)
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 {
getCustomerList,
......@@ -321,21 +332,18 @@ const CustomerModule = () => {
getEmployeeData,
data,
msg,
title,
TypeList,
SeletObj,
getSelectWay,
TimeObj,
TimeList,
changeTime,
changeTimeRange,
changePage,
pagination,
CustomList,
customSetObj,
friendObj,
friendOptions,
getChild,
getCkedFriend,
CascaderUpdateValue
getDept,
customerUpdateValue,
}
}
......
This diff is collapsed.
......@@ -36,14 +36,14 @@
v-if="x.Id.slice(0, 1) == '1'"
text-color="white"
icon="work"
:label="x.Name"
:label="x.DeptName"
></q-chip>
<q-chip
color="primary"
v-if="x.Id.slice(0, 1) == '2'"
text-color="white"
icon="person"
:label="x.Name"
:label="x.DeptName"
></q-chip>
</div>
</div>
......
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