Commit 0088259c authored by 罗超's avatar 罗超

客户

parent 7def1715
......@@ -112,7 +112,7 @@ module.exports = configure(function (ctx) {
directives: ['ClosePopup'],
// Quasar plugins
plugins: ['Notify','SessionStorage','Dialog']
plugins: ['Notify','SessionStorage','Dialog','Meta']
},
animations: 'all', // --- includes all animations
......
......@@ -89,14 +89,22 @@ class CustomerService {
data
})
}
//保存客户标签
static async saveCustomLabel(data: any): Promise<HttpResponse> {
//批量设置客户标签
static async setCustomLabelBatch(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerLabelBatch', {
method: 'post',
responseType: 'json',
data
})
}
//设置单个客户企业标签
static async setCustomLabel(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerLabelSingle', {
method: 'post',
responseType: 'json',
data
})
}
//获取客户旅程类型枚举列表
static async getCustomerTripType(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerTripTypeEnumList', {
......@@ -121,6 +129,30 @@ class CustomerService {
data
})
}
//客户转移
static async setCustomerTransfer(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerTransfer', {
method: 'post',
responseType: 'json',
data
})
}
//客户放弃至公海
static async setCustomerAbandon(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerAbandon', {
method: 'post',
responseType: 'json',
data
})
}
//删除客户
static async delCustomerInfo(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/DelCustomerInfo', {
method: 'post',
responseType: 'json',
data
})
}
}
export {CutomerParams}
export default CustomerService
......@@ -28,7 +28,6 @@ router.beforeEach((to, from, next) => {
// 判断当前用户是否获取权限
loadAsyncRouter = true
const allAuth = getUserAllMenu()
console.log('allAuth',allAuth)
next({
...to,
replace: true
......
<template>
<q-dialog v-model="show" class="col-6" persistent position="right" full-width maximized
@hide="hideDialog">
<q-card class="full-height">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">
<slot name="head">
导入
</slot>
</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row" style="width:800px ;max-width:800px">
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="取消" v-close-popup />
<q-btn color="primary" unelevated label="确定" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script lang="ts">
import {
ref,
watch
} from 'vue'
export default {
props: {
modelValue: {
type: Boolean,
default: false,
required: true,
},
},
setup(props, ctx) {
let show = ref(false)
watch(
() => props.modelValue,
val => {
console.log(48,val)
show.value = val
}
)
let hideDialog = () => {
ctx.emit('update:modelValue', false)
}
return {
show,
hideDialog
}
}
}
</script>
<style scoped>
::-webkit-scrollbar {
height: 7px;
width: 7px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 3px;
background-color: #ddd;
}
::-webkit-scrollbar-track-piece {
background-color: #fff;
-webkit-border-radius: 12px;
}
.list-title {
height: 50px;
padding-bottom: 10px;
color: #606266;
font-size: 14px;
box-sizing: border-box;
display: flex;
align-items: center;
}
.list-box {
height: 420px;
overflow-y: scroll;
}
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 0 0 10px;
border-radius: 5px;
height: 30px;
}
</style>
......@@ -445,7 +445,7 @@
>{{ qItem.Name }}</div>
</div>
<div class="follow_Component" style="flex-shrink:0">
<fileUpload @success="getCustomerPage()"></fileUpload>
<fileUpload @success="getCustomerPage"></fileUpload>
<!-- <div class="editer_input">
<q-input v-model="text" style="50px" maxlength="1000" type="textarea" placeholder="请填写跟进记录" />
</div>-->
......@@ -497,9 +497,8 @@
<q-icon name="iconfont icon-close" size="15px" />
</div>
<labelgroup
v-if="isshowlabel"
v-model="isshowlabel"
:list="LableList"
@close="isshowlabel = false"
@submit="getlabel"
></labelgroup>
</div>
......@@ -510,7 +509,7 @@ import {
ref,
reactive,
onMounted,
provide
provide,
} from 'vue'
import { DownLoadFileByUrl } from '@/utils/upload'
import message from '@/utils/message'
......@@ -546,7 +545,7 @@ export default {
provide('CustomerId', props.CustomerId)
//客户信息保存数据
const cutomMsg = reactive<dataParam>({
CustomerId: 0,
CustomerId: props.CustomerId,
Type: 2,
CustomId: 0, //自定义字段Id
Value: ''
......@@ -555,7 +554,7 @@ export default {
const customTripMsg = reactive<dataParam>({
pageIndex: 1,
pageSize: 10,
CustomerId: 0,
CustomerId: props.CustomerId,
Type: 0
})
const persistent = ref(true)
......@@ -575,8 +574,8 @@ export default {
TripPageCount: 0
})
//获取详情数据
const getCustomInfo = (param: msgParam) => {
customer.getCustomInfo(param).then(res => {
const getCustomInfo = () => {
customer.getCustomInfo(msg).then(res => {
data.dataList = res.data.Data;
data.FiledDetailList = res.data.Data.FiledDetailList;
data.FiledDetailList.forEach(x => {
......@@ -595,8 +594,8 @@ export default {
})
}
//获取客户阶段下拉
const getCustomStage = (param) => {
customer.getCustomStageList(param).then(res => {
const getCustomStage = () => {
customer.getCustomStageList({}).then(res => {
data.customData = res.data.Data;
})
}
......@@ -615,7 +614,7 @@ export default {
}
//点击单个保存自定义客户信息
const saveCustomInfo = (e) => {
cutomMsg.CustomerId = msg.CustomerId;
cutomMsg.CustomerId = props.CustomerId;
cutomMsg.CustomId = e.Id;
cutomMsg.Type = 2;
if (e.Type == 4) {
......@@ -624,7 +623,7 @@ export default {
cutomMsg.Value = e.Value;
}
customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg);
getCustomInfo();
message.successMsg(res.data.Message);
})
}
......@@ -632,11 +631,11 @@ export default {
e.isShowEdit = !e.isShowEdit;
}
const saveCustomGate = () => {
cutomMsg.CustomerId = msg.CustomerId;
cutomMsg.CustomerId = props.CustomerId;
cutomMsg.Type = 1;
cutomMsg.CustomId = 0;
customer.saveCustomInfo(cutomMsg).then(res => {
getCustomInfo(msg);
getCustomInfo();
data.isShowEdit = false;
message.successMsg(res.data.Message);
})
......@@ -671,23 +670,23 @@ export default {
isshowlabel.value = false;
console.log(list);
const labelMsg = reactive<dataParam>({
CustomerIds: 0,
CustomerId: 0,
LableIds: ''
})
labelMsg.CustomerIds = msg.CustomerId;
labelMsg.CustomerId = props.CustomerId;
let ckedArr: any[] = [];
list.forEach(x => {
ckedArr.push(x.Id);
})
labelMsg.LableIds = ckedArr.toString();
customer.saveCustomLabel(labelMsg).then(res => {
getCustomInfo(msg);
customer.setCustomLabel(labelMsg).then(res => {
getCustomInfo();
message.successMsg(res.data.Message);
})
}
//获取客户旅程类型
const getCustomerTripType = (param: any) => {
customer.getCustomerTripType(param).then(res => {
const getCustomerTripType = () => {
customer.getCustomerTripType({}).then(res => {
console.log(res, 'trip数据');
data.tripTypeArr = res.data.Data;
let Obj = {
......@@ -699,9 +698,9 @@ export default {
}
//点击旅客类型
const getckedType = (e) => {
console.log(e, 'eee');
customTripMsg.CustomerId = msg.CustomerId;
customTripMsg.Type = e.Id;
console.log(customTripMsg, 'customTripMsg');
getCustomerPage();
}
//获取客户旅程分页列表
......@@ -717,10 +716,10 @@ export default {
getCustomerPage();
}
onMounted(() => {
getCustomInfo(msg);
getCustomStage({});
getCustomerTripType({})
getCustomerPage();
getCustomInfo();
getCustomStage();
getCustomerTripType()
})
return {
persistent,
......@@ -740,7 +739,8 @@ export default {
customTripMsg,
getckedType,
changePage,
DownLoadFileByUrl
DownLoadFileByUrl,
getCustomerPage
}
}
}
......
......@@ -19,7 +19,7 @@
</style>
<template>
<div class="labelgroup">
<q-dialog v-model="alert">
<q-dialog v-model="show" @hide="goclose">
<q-card>
<q-card-section>
<div class="text-h6">标签</div>
......@@ -44,7 +44,7 @@
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="goclose" />
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" v-close-popup />
<q-btn label="确定" color="accent q-px-md" style="font-weight:400 !important" @click="determine" />
</q-card-actions>
......@@ -53,11 +53,16 @@
</div>
</template>
<script>
import { defineComponent, ref, onMounted } from 'vue'
import { defineComponent, ref,watch, onMounted } from 'vue'
import customerSetService from '@/api/customerSet'
export default defineComponent({
props: {
modelValue:{
type: Boolean,
default:false,
required: true
},
list: {
type: Array,
default: () => []
......@@ -65,10 +70,17 @@
},
setup(props, ctx) {
let show = ref(false)
watch(
() => props.modelValue,
val => {
show.value = val
}
)
let selectList = ref(props.list)
let LableList = ref([])
const goclose = () => {//关闭弹窗
ctx.emit('close')
ctx.emit('update:modelValue',false)
}
const determine = () => {//确定并返回数据
ctx.emit('submit', selectList.value)
......@@ -126,10 +138,8 @@
onMounted(() => {//进入页面就调用
getLabelList()
})
return {
alert: ref(true),
show,
goclose,
determine,
selectList,
......
......@@ -90,7 +90,7 @@
</div>
<!-- StartValue -->
<div v-if="x.Name == '标签' && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
class="input_label" @click="showlabel(x, y)">
class="input_label" @click="showlabel(y)">
<div style="display: flex" v-if="lableList && lableList.length > 0">
<div class="text-clamp-1 tag-select-input">{{ lableList[0].Name }}</div>
<div v-if="lableList.length > 1" class="tag-select-input" style="margin-left: 5px">
......@@ -138,7 +138,7 @@
<div class="border-bottom" :style="{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }"></div>
</div>
</div>
<labelgroup v-if="isshowlabel" :list="lableList" @close="isshowlabel = false" @submit="getlabel"></labelgroup>
<labelgroup v-model="isshowlabel" :list="lableList" @submit="getlabel"></labelgroup>
</div>
</template>
<script lang="ts">
......@@ -429,7 +429,7 @@
addMsg.value.push(obj)
}
const showlabel = (x, y) => {
const showlabel = (y) => {
selectindex.value = y
isshowlabel.value = true
}
......
// import message from '@/utils/message'
import message from '@/utils/message'
import dayjs from 'dayjs'
import { Dialog } from 'quasar'
import { reactive } from 'vue'
import customer, { CutomerParams } from '@/api/customer'
import customerService, { CutomerParams } from '@/api/customer'
import customerSetService from '@/api/customerSet'
import { ColumnDefaultState } from '@/@types/enumHelper'
......@@ -9,12 +10,12 @@ interface memberParams {
newId: number | string
DataType: number | string
DeptId: number
ChildList: Array < any > | null
ChildList: Array<any> | null
}
interface dataParams {
loading: boolean
columns: Array<any>
sysColumns:Array<any>
sysColumns: Array<any>
showColumns: Array<any>
allColumns: Array<any>
dataList: Array<any>
......@@ -24,13 +25,14 @@ interface dataParams {
defaultArray: Array<number | string>
customerCascaderValue: Array<any> | string
deptCascaderValue: string | null
colLoadingFinish:boolean
colLoadingFinish: boolean
[key: string]: any
}
const CustomerModule = () => {
//获取列表
const getCustomerList = () => {
data.loading=true
customer.getCustomerList(msg).then(res => {
data.loading = true
customerService.getCustomerList(msg).then(res => {
if (res.data.Code == 1) {
data.loading = false
data.dataList = res.data.Data.PageData
......@@ -40,7 +42,7 @@ const CustomerModule = () => {
}
//调用获取下拉
const getWayList = (param: any) => {
customer.getWayList(param).then(res => {
customerService.getWayList(param).then(res => {
if (res.data.Code == 1) {
data.WayList = res.data.Data
}
......@@ -48,7 +50,7 @@ const CustomerModule = () => {
}
//获取员工数据
const getEmployeeData = () => {
customer.getEmployeeData({}).then(res => {
customerService.getEmployeeData({}).then(res => {
data.EmployeeList = res.data.Data
// 重组唯一id
if (data.EmployeeList.length == 0) return
......@@ -63,7 +65,7 @@ const CustomerModule = () => {
})
})
}
const getChildList = (ChildList: Array < any > ) => {
const getChildList = (ChildList: Array<any>) => {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.DataType === 2) {
......@@ -81,6 +83,10 @@ const CustomerModule = () => {
const data = reactive<dataParams>({
loading: false,
isshowlabel: false,//设置标签弹窗
showTransfer: false,//转移客户弹窗
showAbandon: false,//放弃客户弹窗
showImport:false,//导入组件弹窗
columns: [
{
name: 'CustomerName',
......@@ -108,6 +114,16 @@ const CustomerModule = () => {
field: 'carbs',
align: 'left'
},
{
name: 'CreateTime',
label: '创建时间',
field: 'CreateTime',
align: 'left',
sortable: true,
sort: (a, b) => {
return Date.parse(a) - Date.parse(b)
}
},
{
name: 'sodium',
label: '负责人',
......@@ -130,7 +146,11 @@ const CustomerModule = () => {
name: 'FriendTime',
label: '添加好友时间',
field: 'FriendTime',
align: 'left'
align: 'left',
sortable: true,
sort: (a, b) => {
return Date.parse(a) - Date.parse(b)
}
},
{
name: 'CheckInNum',
......@@ -171,7 +191,8 @@ const CustomerModule = () => {
OrderBy: 1, //排序
AddCondition: 0 //查询条件
})
const TypeList = reactive([{
const TypeList = reactive([
{
Name: '企业',
Id: 0
},
......@@ -188,7 +209,8 @@ const CustomerModule = () => {
Id: 3
}
])
const TimeList = reactive([{
const TimeList = reactive([
{
Name: '客户创建时间',
Id: 1
},
......@@ -203,7 +225,7 @@ const CustomerModule = () => {
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
TimeObj.timeRange=null
TimeObj.timeRange = null
}
//选择时间范围
const changeTimeRange = val => {
......@@ -218,18 +240,20 @@ const CustomerModule = () => {
msg.FriendETime = e
}
} else {
msg.FriendSTime = ''
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
msg.FriendSTime = ''
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
}
getCustomerList()
}
//客户筛选
const CustomList = reactive([{
const CustomList = reactive([
{
label: '好友关系',
value: '1',
children: [{
children: [
{
label: '未添加',
value: '1-1'
},
......@@ -249,11 +273,11 @@ const CustomerModule = () => {
}
])
const SeletObj = reactive ({
const SeletObj = reactive({
selectVal: '',
selectWay: 0
})
const TimeObj = reactive ({
const TimeObj = reactive({
timeWay: 1,
timeRange: null
})
......@@ -298,34 +322,98 @@ const CustomerModule = () => {
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
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
data.colLoadingFinish = true
})
const showDialog = (dialogName) => {
data[dialogName] = true
}
const getlabel = val => {
const ids=val.map(e=>e.Id).toString()
setLabel(ids)
}
const setLabel = (id) => {
const labelMsg = {
CustomerIds: data.selected.map(e => e.Id).toString(),
LableIds: id
}
customerService.setCustomLabelBatch(labelMsg).then(res => {
message.successMsg(res.data.Message)
getCustomerList()
})
}
const TransferMsg = reactive({
CustomerIds: '',
EmpId: 0
})
const setTransfer = async () => {
TransferMsg.CustomerIds = data.selected.map(e => e.Id).toString()
await customerService.setCustomerTransfer(TransferMsg).then(res => {
message.successMsg(res.data.Message)
getCustomerList()
data.showTransfer=false
})
TransferMsg.EmpId = 0
}
const AbandonMsg = reactive({
CustomerIds: '',
Reason: ""
})
const setAbandon = async () => {
AbandonMsg.CustomerIds = data.selected.map(e => e.Id).toString()
await customerService.setCustomerAbandon(AbandonMsg).then(res => {
message.successMsg(res.data.Message)
getCustomerList()
data.showAbandon = false
})
AbandonMsg.Reason = ''
}
const delCustomer = () => {
Dialog.create({
title: '确认删除?',
message: "请输入'删除'",
prompt: {
model: '',
isValid: val => val == '删除', // << here is the magic
outlined :true
},
cancel: '取消',
ok: '确认'
}).onOk(() => {
const delMsg = {
CustomerIds: data.selected.map(e => e.Id).toString()
}
customerService.delCustomerInfo(delMsg).then(res => {
message.successMsg(res.data.Message)
data.selected=[]
getCustomerList()
})
})
}
return {
getCustomerList,
getWayList,
......@@ -344,6 +432,14 @@ const CustomerModule = () => {
CustomList,
getDept,
customerUpdateValue,
showDialog,
getlabel,
setLabel,
setTransfer,
TransferMsg,
AbandonMsg,
setAbandon,
delCustomer
}
}
......
......@@ -33,9 +33,6 @@ const groupingManageModule = () => {
console.log(msg.Name)
}
const setTitle = (pageTitle: string, suffix = true) => {
if (suffix) {
title.value = `${pageTitle}-${StaticConfig.appsuffix}`
......
<template>
<div class="q-pa-md customer">
<q-page padding style="background: #fff; border-radius: 10px">
<div class="page-search row items-center">
<q-page padding style="background-color: #fff; border-radius: 10px">
<div class="page-search row items-center" v-if="data.selected.length==0">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input filled v-model="SeletObj.selectVal" clearable @clear="getCustomerList"
<q-input filled v-model="SeletObj.selectVal" clearable @clear="getCustomerList" dense
@update:model-value="getSelectWay(), getCustomerList" placeholder="请输入">
<template #before>
<div style="border-right: 1px solid #999">
<q-select filled @update:model-value="getSelectWay" option-value="Id" option-label="Name"
<div style="border-right: 1px solid #999;padding-right:0">
<q-select filled @update:model-value="getSelectWay" option-value="Id" option-label="Name" dense
v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options />
</div>
</template>
</q-input>
</div>
<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" dense
emit-value map-options @update:model-value="changeTime"> </q-select>
<n-config-provider :locale="zhCN" :date-locale="dateZhCN">
<n-date-picker v-model:value="TimeObj.timeRange" type="datetimerange" size="large" separator="至" clearable
class="full-height" @update:value='changeTimeRange'/>
<n-date-picker v-model:value="TimeObj.timeRange" type="datetimerange" size="small" separator="至" clearable
class="full-height" @update:value='changeTimeRange' />
</n-config-provider>
</div>
<div class="col-2">
......@@ -33,18 +33,63 @@
:options="data.EmployeeList" cascade children-field="ChildList" @update:value="getDept" />
</div>
<div class="col-2">
<q-btn color="primary" size="sm" label="导入" />
<q-btn color="primary" size="sm" style="margin-left: 20px" label="导出" />
<q-btn-dropdown label="导入" dense color="primary">
<q-list>
<q-item>
<q-btn unelevated dense label="导入个人客户" @click="data.showImport=true"/>
</q-item>
<q-item>
<q-btn unelevated dense label="导入企业客户" />
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown label="导出" color="primary" dense class="q-ml-md">
<q-list>
<q-item>
<q-btn unelevated dense label="导出个人客户" />
</q-item>
<q-item>
<q-btn unelevated dense label="导出企业客户" />
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div>
</div>
<div class="select-navs row q-mb-md q-pa-sm flex justify-between items-center" v-if="data.selected.length>0">
<div class="flex items-center">
<div style="color: #111;font-weight:bold">已选择{{data.selected.length}}项</div>
<q-btn style="background-color: #fff; color: #606266" unelevated outline label="设置标签" class="q-ml-md"
@click="showDialog('isshowlabel')" />
<q-btn style="background-color: #fff; color: #606266" unelevated outline label="放弃" class="q-ml-md"
@click="showDialog('showAbandon')" />
<q-btn style="background-color: #fff; color: #606266" unelevated outline label="转移" class="q-ml-md"
@click="showDialog('showTransfer')" />
<q-btn-dropdown label="导出" outline style="background-color: #fff; color: #606266" class="q-ml-md">
<q-list>
<q-item>
<q-btn unelevated dense label="导出客户" />
</q-item>
<q-item>
<q-btn unelevated dense label="导出标签记录" />
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn style="background-color: #FFEDED; color: #FF4949" unelevated outline label="彻底删除" class="q-ml-md"
@click="delCustomer" />
</div>
<q-icon name="cancel" size="sm" style="color:#707070" @click="data.selected=[]"></q-icon>
</div>
<div class="page-content" style="margin-top: 20px">
<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:selected="data.selected" :visible-columns="data.showColumns">
<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:selected="data.selected"
:visible-columns="data.showColumns">
<template v-slot:body-cell-CustomerName="props">
<q-td auto-width :props="props">
<div class="cutomer_Header">
<div class="customer_Img">
<img :src="props.row.WeChatPhoto" style="width: 100%; height: 100%" />
</div>
......@@ -64,13 +109,14 @@
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount"
:input="true" @update:model-value="changePage" />
</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">
<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>
<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">
......@@ -84,7 +130,65 @@
</q-table>
<customRight v-if="isShowCustom" :CustomerId="CustomerId" @close="closeCustomer"></customRight>
</div>
<div>
<labelgroup v-model="data.isshowlabel" @submit="getlabel"></labelgroup>
</div>
<!-- ----------------转移客户-------------------------- -->
<q-dialog v-model="data.showTransfer" class="col-6" persistent>
<q-card style="width: 480px; max-width: 80vw">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">转移客户</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row q-my-md flex items-center no-wrap" style="white-space:nowrap">
转移给:
<n-cascader v-model:value="TransferMsg.EmpId" clearable placeholder="客户筛选" check-strategy="child"
size="large" :show-path="false" max-tag-count="responsive" :options="data.EmployeeList" cascade
value-field="DeptId" label-field="DeptName" children-field="ChildList" />
</div>
<div>
90个自然日内,在职成员的每位客户仅可被转接2次。
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="取消" v-close-popup />
<q-btn color="primary" unelevated label="确定" @click="setTransfer" />
</q-card-actions>
</q-card>
</q-dialog>
<!-- ----------------放弃客户-------------------------- -->
<q-dialog v-model="data.showAbandon" class="col-6" persistent>
<q-card style="width: 480px; max-width: 80vw">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">放弃客户</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row q-my-md flex no-wrap" style="white-space:nowrap">
<q-input outlined v-model="AbandonMsg.Reason" label="放弃原因:" dense type="textarea" style="width:100%" />
</div>
<div>
放弃后,客户将进入公海
</div>
<div>
审批人 审批人为空(您所在部门没有设置主管),将自动通过审批
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="取消" v-close-popup />
<q-btn color="primary" unelevated label="确定" @click="setAbandon" />
</q-card-actions>
</q-card>
</q-dialog>
</q-page>
<importComponents v-model="data.showImport"></importComponents>
</div>
</template>
<script lang="ts">
......@@ -93,19 +197,30 @@
defineComponent,
onMounted
} from 'vue'
import {
useMeta
} from 'quasar'
import CustomerModule from '@/module/customer/customerModule'
import customRight from '@/components/common/customRight.vue'
import customRight from '@/components/customer/customRight.vue'
import visibleColumns from '@/components/common/visibleColumns.vue'
import labelgroup from '@/components/customer/label-group.vue'
import importComponents from '@/components/common/import.vue'
import {
zhCN,
dateZhCN
} from 'naive-ui'
export default defineComponent({
components: {
customRight,
visibleColumns
visibleColumns,
labelgroup,
importComponents
},
setup() {
useMeta({
title: '客户',
})
let {
getCustomerList,
getWayList,
......@@ -124,6 +239,13 @@
getEmployeeData,
getDept,
customerUpdateValue,
showDialog,
getlabel,
setTransfer,
TransferMsg,
AbandonMsg,
setAbandon,
delCustomer
} = CustomerModule()
let isShowCustom = ref(false)
const closeCustomer = () => {
......@@ -163,16 +285,27 @@
CustomerId,
getCustomInfo,
customerUpdateValue,
showDialog,
getlabel,
setTransfer,
TransferMsg,
AbandonMsg,
setAbandon,
delCustomer
}
}
})
</script>
<style lang="scss">
<style>
.customer .q-field__before {
padding-right: 0 !important;
}
.v-binder-follower-container {
z-index: 99999999 !important;
}
</style>
<style lang="scss" scoped>
.cutomer_Header {
......@@ -198,13 +331,13 @@
}
::v-deep .n-base-selection-label {
height: 54px;
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
border: none !important;
}
::v-deep .n-base-selection-input {
height: 54px;
height: 40px;
display: flex;
align-items: center;
border: none !important;
......@@ -218,8 +351,13 @@
}
::v-deep .n-base-selection-tags {
height: 54px;
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
}
.select-navs {
background-color: #f6f6f6;
border-radius: 4px;
}
</style>
......@@ -35,7 +35,7 @@ import customerPhase from './components/customerPhase.vue'
import customerlabel from './components/customerlabel.vue'
import CustomerOperation from "./components/CustomerOperation.vue"
import router from '@/router/index'
import { useMeta } from 'quasar'
import {
defineComponent,
ref
......@@ -51,6 +51,7 @@ export default defineComponent({
CustomerOperation
},
setup() {
useMeta({title: '客户设置'})
let tab = ref<string>('field')
if (router.currentRoute.value.query && router.currentRoute.value.query.type) {
tab.value = router.currentRoute.value.query.type as string
......
......@@ -16,6 +16,5 @@ export function getAuth() {
*/
export function getUserAllMenu() {
const auths = getStoreGetter<UserGetter>('user', 'getUserAllAuth')
console.log(auths)
return auths.length > 0 ? auths : ResultType.EmptyArray
}
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