Commit 86ede3fc authored by 罗超's avatar 罗超

1

parent 77822a16
<template>
<div class="page-search row items-center" v-if="select.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 dense @clear="clearSelectWay"
<div class=" flex wrap q-mr-lg q-col-gutter-md">
<div >
<q-input filled v-model="SeletObj.selectVal" clearable dense @clear="clearSelectWay"
@update:model-value="getSelectWay" placeholder="请输入">
<template #before>
<div style="border-right: 1px solid #999;padding-right:0">
<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>
......@@ -20,23 +20,23 @@
class="full-height" @update:value='changeTimeRange' />
</n-config-provider>
</div>
<div class="col-2">
<div >
<n-cascader v-model:value="CascaderData.customerCascaderValue" clearable placeholder="客户筛选"
check-strategy="child" size="large" :show-path="false" max-tag-count="responsive" multiple
:options="CustomList" cascade />
</div>
<div class="col-2">
<div >
<n-cascader v-model:value="CascaderData.deptCascaderValue" clearable placeholder="选择部门/人员" check-strategy="all"
value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
:options="EmployeeList" cascade children-field="ChildList" @update:value="getDept" />
</div>
<div class="col-2">
<vt-custom-btn ref="vtBtn" :page-code="pageCode" :columns="columns" @empty-where="deleteWhereHandler(0)"
<div>
<vt-custom-btn ref="vtBtn" :page-code="pageCode" :columns="columns" @empty-where="deleteWhereHandler(0)" class="full-height"
@update-where="updateWhereHandler"></vt-custom-btn>
<!-- <q-btn class="q-ml-md q-px-md" color="dark" label="重置" dense outline @click="deleteWhereHandler(1)"></q-btn> -->
<q-btn class="q-ml-md q-px-md" color="dark" label="重置" dense outline @click="deleteWhereHandler(1)"></q-btn>
</div>
<div class="col-2">
<q-btn-dropdown label="导入" dense color="primary">
<q-btn-dropdown label="导入" color="primary">
<q-list>
<q-item>
<q-btn unelevated dense label="导入个人客户" @click="showImport=true" />
......@@ -46,7 +46,7 @@
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown label="导出" color="primary" dense class="q-ml-md">
<q-btn-dropdown label="导出" color="primary" class="q-ml-md">
<q-list>
<q-item>
<q-btn unelevated dense label="导出个人客户" />
......@@ -69,7 +69,7 @@
<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-btn-dropdown label="导出" outline style="background-color: #fff; color: #606266" class="q-ml-md">
<q-list>
<q-item>
<q-btn unelevated dense label="导出客户" />
......@@ -193,13 +193,16 @@
} from 'naive-ui'
import dayjs from 'dayjs'
import message from '@/utils/message'
import { Dialog } from 'quasar'
import {
Dialog
} from 'quasar'
import customerService from '@/api/customer'
import vtCustomBtn from '../common/customWhere/vtCustomBtn.vue'
import labelgroup from '@/components/customer/label-group.vue'
import importComponents from '@/components/common/import.vue'
import departmentStaff from '@/components/common/departmentStaff.vue'
export default {
emits: ['update'],
props: {
/**
* @description 模式:0为未选择表格内容模式,1为选中了表格内容模式
......@@ -358,6 +361,34 @@
}
ctx.emit('update')
}
const updateWhereHandler = params => {
console.log(365, params)
msg.AddCondition=params.AddCondition
msg.SelectList = params.SelectList
ctx.emit('update')
}
const deleteWhereHandler = type => {
msg.SelectList = []
msg.AddCondition = 0
//重置
if (type == 1) {
vtBtn.value.clearWhereHandler()
SeletObj.selectVal=""
msg.CorpName = ''
msg.WeChatName = ''
msg.CustomerName = ''
msg.CustomerMobile = ''
msg.FriendSTime = ''
msg.FriendETime = ''
msg.CreateSTime = ''
msg.CreateETime = ''
msg.EmpId = 0
TimeObj.timeRange = null,
CascaderData.deptCascaderValue=null,
CascaderData.customerCascaderValue=""
}
ctx.emit('update')
}
const data = reactive({
isshowlabel: false, //设置标签弹窗
showTransfer: false, //转移客户弹窗
......@@ -442,13 +473,13 @@
}
customerService.delCustomerInfo(delMsg).then(res => {
message.successMsg(res.data.Message)
ctx.emit('update:select',[])
ctx.emit('update:select', [])
ctx.emit('update')
})
})
}
const closeSel = ()=>{
ctx.emit('update:select',[])
const closeSel = () => {
ctx.emit('update:select', [])
}
return {
updatePage,
......@@ -478,8 +509,58 @@
AbandonMsg,
TransferMsg,
closeSel,
updateWhereHandler,
deleteWhereHandler,
}
}
}
</script>
<style scoped>
:deep(.n-base-selection-label) {
width: 160px;
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
border: none !important;
}
:deep(.n-base-selection-input) {
display: flex;
align-items: center;
border: none !important;
}
:deep(.n-input) {
height: 100%;
border: none;
display: flex;
align-items: center;
}
:deep(.n-base-selection-tags) {
width: 160px;
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
}
.select-navs {
background-color: #f6f6f6;
border-radius: 4px;
}
.bottom-slot {
border-top: 1px solid #ccc;
margin-top: 20px;
padding-top: 35px;
}
.add-dep-left {
white-space: nowrap;
min-width: 76px;
line-height: 36px;
}
:deep(.q-btn){
height: 100%;
}
</style>
\ No newline at end of file
......@@ -363,7 +363,7 @@
})
} else {
addMsg.value = [{
Id: '标签',
Id: 0,
Name: '标签',
Type: 1,
Direction: '',
......@@ -395,7 +395,7 @@
const getCustomerStageList = () => {
customerSetService.getCustomerStageList({}).then(res => {
let obj: params = {
Id: '客户阶段',
Id: -1,
Name: '客户阶段',
Type: 3,
IsCustom: 3,
......@@ -403,7 +403,7 @@
}
filedList.value.unshift(obj)
let obj2: params = {
Id: '标签',
Id: 0,
Name: '标签',
Type: 4,
IsCustom: 2
......@@ -442,17 +442,17 @@
// 禁用标签
let changeLabel = () => {
let find: any = addMsg.value.find(e => {
return e.Id == '标签'
return e.Name == '标签'
})
if (find) {
filedList.value.map(_e => {
if (_e.Id == '标签') {
if (_e.Name == '标签') {
_e.disable = true
}
})
} else {
filedList.value.map(_e => {
if (_e.Id == '标签') {
if (_e.Name == '标签') {
_e.disable = false
}
})
......
......@@ -11,6 +11,7 @@ interface dataParams {
defaultConditionList: Array<any>
editMsg: any
peopleNum: number
[key:string]:any
}
const msg = () => {
......@@ -21,7 +22,6 @@ const msg = () => {
}
const condition = ref<any>(null)
const data = reactive<dataParams>({
showDialog: false,
shape: 0,
dataTree: [],
......@@ -35,7 +35,12 @@ const data = reactive<dataParams>({
RuleAllotWay: 1, //分配方式 1依次轮流 2随机分配
ConditionList: [] //条件列表
},
peopleNum: 0
peopleNum: 0,
selectOptionList:[],
})
const whereData = reactive({
list: [],
condition:1,
})
const jumpBeforePage = () => {
router.push({
......@@ -126,24 +131,43 @@ const editRuleModule = () => {
const setCustomerClueRuleInfo = () => {
console.log(data.editMsg.ConditionList)
const flag = condition.value.checkRule(data.editMsg.ConditionList)
console.log(94, flag)
if (!flag) return
if (data.editMsg.DeptList.length == 0 && data.editMsg.EmpList.length == 0) {
message.warnMsg('适用部门/成员')
return
}
// customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
// message.successMsg(res.data.Message)
// setTimeout(() => {
// router.push({
// path: '/customerSetup',
// query: {
// type: 'clue'
// }
// })
// }, 2000)
// })
// const flag = condition.value.checkRule(data.editMsg.ConditionList)
// console.log(94, flag)
// if (!flag) return
// if (data.editMsg.DeptList.length == 0 && data.editMsg.EmpList.length == 0) {
// message.warnMsg('适用部门/成员')
// return
// }
customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
message.successMsg(res.data.Message)
setTimeout(() => {
router.push({
path: '/customerSetup',
query: {
type: 'clue'
}
})
}, 2000)
})
}
const getCustomerFiledList = () => {
customerSetService
.getCustomerFiledList({
Enable: 1
})
.then(res => {
data.selectOptionList=[]
res.data.Data.map(e => {
const obj = {
name: e.Name,
value: e.Name,
data: e,
IsCustom: 1
}
data.selectOptionList.push(obj)
})
console.log(160,data.selectOptionList)
})
}
return {
msg,
......@@ -156,7 +180,9 @@ const editRuleModule = () => {
setCustomerClueRuleInfo,
getCondition,
getdpt,
getNum
getNum,
whereData,
getCustomerFiledList
}
}
......
<template>
<div class="q-pa-md customer">
<customerHead v-model:select="data.selected" :EmployeeList="data.EmployeeList" @update="updatePage"/>
<q-page padding style="background-color: #fff; border-radius: 10px">
<div class="page-content" style="margin-top: 20px">
<div class="page-content">
<div class="q-mb-md">
<customerHead v-model:select="data.selected" :columns="data.allColumns" :EmployeeList="data.EmployeeList"
@update="updatePage" />
</div>
<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"
......@@ -10,7 +14,6 @@
<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>
......@@ -67,9 +70,9 @@
import CustomerModule from '@/module/customer/customerModule'
import customRight from '@/components/customer/customRight.vue'
import visibleColumns from '@/components/common/visibleColumns.vue'
import customerHead from '@/components/customer/customerHead.vue'
export default defineComponent({
components: {
......@@ -81,7 +84,7 @@
useMeta({
title: '客户',
})
let {
getCustomerList,
getWayList,
......@@ -101,9 +104,9 @@
CustomerId.value = item.row.Id
isShowCustom.value = true
}
provide('msg',msg)
const updatePage=()=>{
msg.PageIndex=1
provide('msg', msg)
const updatePage = () => {
msg.PageIndex = 1
getCustomerList()
}
onMounted(() => {
......@@ -158,44 +161,4 @@
.customer_Wechat {
color: #9999a8;
}
:deep(.n-base-selection-label) {
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
border: none !important;
}
:deep(.n-base-selection-input) {
height: 40px;
display: flex;
align-items: center;
border: none !important;
}
:deep(.n-input) {
height: 100%;
border: none;
display: flex;
align-items: center;
}
:deep(.n-base-selection-tags) {
height: 40px;
background-color: rgba(0, 0, 0, 0.05);
}
.select-navs {
background-color: #f6f6f6;
border-radius: 4px;
}
.bottom-slot{
border-top: 1px solid #ccc;
margin-top: 20px;
padding-top: 35px;
}
.add-dep-left{
white-space: nowrap;
min-width: 76px;
line-height: 36px;
}
</style>
</style>
\ No newline at end of file
......@@ -10,7 +10,7 @@
indicator-color="primary"
narrow-indicator
>
<q-tab name="yewumoshi" label="业务模式" />
<q-tab name="model" label="业务模式" />
<q-tab name="field" label="客户字段" />
<q-tab name="label" label="标签" />
<q-tab name="clue" label="线索分配规则" />
......@@ -18,6 +18,7 @@
<q-tab name="operation" label="客户操作" />
</q-tabs>
<div class="container fit">
<businessModel v-if="tab == 'model'"></businessModel>
<customer-Field v-if="tab == 'field'"></customer-Field>
<clue-rule v-if="tab == 'clue'"></clue-rule>
<customer-phase v-if="tab == 'phase'"></customer-phase>
......@@ -29,6 +30,7 @@
</template>
<script lang="ts">
import businessModel from './components/businessModel.vue'
import customerField from './components/customerField.vue'
import clueRule from './components/clueRule.vue'
import customerPhase from './components/customerPhase.vue'
......@@ -44,6 +46,7 @@ import {
export default defineComponent({
components: {
businessModel,
customerField,
clueRule,
customerPhase,
......
......@@ -11,12 +11,13 @@
<div class="content-block">
<div class="fission-title">选择待分配客户</div>
<div class="fission-subtitle">当待分配客户符合以下条件时</div>
<requestGroup
<!-- <requestGroup
v-model:addCondition="editMsg.RuleSelectType"
:defaultData="defaultConditionList"
ref="condition"
@change="getCondition"
/>
/> -->
<where :data="whereData" :columns="selectOptionList"/>
</div>
<div class="content-block mt20">
<div class="fission-title">分配给以下部门/成员</div>
......@@ -78,13 +79,15 @@ import {
toRefs,
onMounted
} from 'vue'
import requestGroup from '@/components/customer/request-group.vue'
// import requestGroup from '@/components/customer/request-group.vue'
import departmentStaff from '@/components/common/departmentStaff.vue'
import editRuleModule from '@/module/editor/editRuleModule'
import where from '@/components/common/customWhere/where.vue'
export default defineComponent({
components: {
requestGroup,
departmentStaff
// requestGroup,
departmentStaff,
where
},
setup() {
let {
......@@ -99,6 +102,8 @@ export default defineComponent({
getCondition,
getdpt,
getNum,
whereData,
getCustomerFiledList,
} = editRuleModule();
onMounted(() => {
if (msg().RuleId > 0) {
......@@ -113,6 +118,7 @@ export default defineComponent({
data.defaultArray = []
}
getEmployeeData()
getCustomerFiledList()
})
return {
jumpBeforePage,
......@@ -122,7 +128,8 @@ export default defineComponent({
setCustomerClueRuleInfo,
getCondition,
getdpt,
getNum
getNum,
whereData
}
}
......
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