Commit 6934f678 authored by 罗超's avatar 罗超

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

parents 0406a55a 043ea0aa
...@@ -10,7 +10,7 @@ export default defineComponent({ ...@@ -10,7 +10,7 @@ export default defineComponent({
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('./css/font.sass') @import url('./css/font.sass')
@import url('//at.alicdn.com/t/font_2930340_uvse4eempkh.css') @import url('//at.alicdn.com/t/font_2930340_s3kedu8od4.css')
@import url('./css/table.sass') @import url('./css/table.sass')
.svg-icon-primary g [fill] .svg-icon-primary g [fill]
transition: fill 0.3s ease transition: fill 0.3s ease
......
<template> <template>
<div class="page-search row items-center" v-if="select.length==0"> <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=" flex wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div >
<q-input filled v-model="SeletObj.selectVal" clearable dense @clear="clearSelectWay" <q-input filled v-model="SeletObj.selectVal" clearable dense @clear="clearSelectWay"
@update:model-value="getSelectWay" placeholder="请输入"> @update:model-value="getSelectWay" placeholder="请输入">
<template #before> <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 <q-select filled @update:model-value="getSelectWay" option-value="Id" option-label="Name" dense
v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options /> v-model="SeletObj.selectWay" :options="TypeList" emit-value map-options />
</div> </div>
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
class="full-height" @update:value='changeTimeRange' /> class="full-height" @update:value='changeTimeRange' />
</n-config-provider> </n-config-provider>
</div> </div>
<div class="col-2"> <div >
<n-cascader v-model:value="CascaderData.customerCascaderValue" clearable placeholder="客户筛选" <n-cascader v-model:value="CascaderData.customerCascaderValue" clearable placeholder="客户筛选"
check-strategy="child" size="large" :show-path="false" max-tag-count="responsive" multiple check-strategy="child" size="large" :show-path="false" max-tag-count="responsive" multiple
:options="CustomList" cascade /> :options="CustomList" cascade />
</div> </div>
<div class="col-2"> <div >
<n-cascader v-model:value="CascaderData.deptCascaderValue" clearable placeholder="选择部门/人员" check-strategy="all" <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" value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
:options="EmployeeList" cascade children-field="ChildList" @update:value="getDept" /> :options="EmployeeList" cascade children-field="ChildList" @update:value="getDept" />
</div> </div>
<div class="col-2"> <div>
<vt-custom-btn ref="vtBtn" :page-code="pageCode" :columns="columns" @empty-where="deleteWhereHandler(0)" <vt-custom-btn ref="vtBtn" :page-code="pageCode" :columns="columns" @empty-where="deleteWhereHandler(0)" class="full-height"
@update-where="updateWhereHandler"></vt-custom-btn> @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>
<div class="col-2"> <div class="col-2">
<q-btn-dropdown label="导入" dense color="primary"> <q-btn-dropdown label="导入" color="primary">
<q-list> <q-list>
<q-item> <q-item>
<q-btn unelevated dense label="导入个人客户" @click="showImport=true" /> <q-btn unelevated dense label="导入个人客户" @click="showImport=true" />
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</q-item> </q-item>
</q-list> </q-list>
</q-btn-dropdown> </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-list>
<q-item> <q-item>
<q-btn unelevated dense label="导出个人客户" /> <q-btn unelevated dense label="导出个人客户" />
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<q-btn style="background-color: #fff; color: #606266" unelevated outline label="转移" class="q-ml-md" <q-btn style="background-color: #fff; color: #606266" unelevated outline label="转移" class="q-ml-md"
@click="showDialog('showTransfer')" /> @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-list>
<q-item> <q-item>
<q-btn unelevated dense label="导出客户" /> <q-btn unelevated dense label="导出客户" />
...@@ -193,13 +193,16 @@ ...@@ -193,13 +193,16 @@
} from 'naive-ui' } from 'naive-ui'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import message from '@/utils/message' import message from '@/utils/message'
import { Dialog } from 'quasar' import {
Dialog
} from 'quasar'
import customerService from '@/api/customer' import customerService from '@/api/customer'
import vtCustomBtn from '../common/customWhere/vtCustomBtn.vue' import vtCustomBtn from '../common/customWhere/vtCustomBtn.vue'
import labelgroup from '@/components/customer/label-group.vue' import labelgroup from '@/components/customer/label-group.vue'
import importComponents from '@/components/common/import.vue' import importComponents from '@/components/common/import.vue'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
export default { export default {
emits: ['update'],
props: { props: {
/** /**
* @description 模式:0为未选择表格内容模式,1为选中了表格内容模式 * @description 模式:0为未选择表格内容模式,1为选中了表格内容模式
...@@ -358,6 +361,34 @@ ...@@ -358,6 +361,34 @@
} }
ctx.emit('update') 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({ const data = reactive({
isshowlabel: false, //设置标签弹窗 isshowlabel: false, //设置标签弹窗
showTransfer: false, //转移客户弹窗 showTransfer: false, //转移客户弹窗
...@@ -442,13 +473,13 @@ ...@@ -442,13 +473,13 @@
} }
customerService.delCustomerInfo(delMsg).then(res => { customerService.delCustomerInfo(delMsg).then(res => {
message.successMsg(res.data.Message) message.successMsg(res.data.Message)
ctx.emit('update:select',[]) ctx.emit('update:select', [])
ctx.emit('update') ctx.emit('update')
}) })
}) })
} }
const closeSel = ()=>{ const closeSel = () => {
ctx.emit('update:select',[]) ctx.emit('update:select', [])
} }
return { return {
updatePage, updatePage,
...@@ -478,8 +509,58 @@ ...@@ -478,8 +509,58 @@
AbandonMsg, AbandonMsg,
TransferMsg, TransferMsg,
closeSel, closeSel,
updateWhereHandler,
deleteWhereHandler,
} }
} }
} }
</script> </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
...@@ -77,7 +77,15 @@ ...@@ -77,7 +77,15 @@
show.value = val show.value = val
} }
) )
let selectList = ref(props.list) let selectList = ref(props.list)
watch(
() => props.list,
val => {
selectList.value = val
getLabelList()
}
)
let LableList = ref([]) let LableList = ref([])
const goclose = () => {//关闭弹窗 const goclose = () => {//关闭弹窗
ctx.emit('update:modelValue',false) ctx.emit('update:modelValue',false)
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
onMounted onMounted
} from 'vue' } from 'vue'
import customerSetService from '@/api/customerSet' import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer'
import labelgroup from './label-group.vue' import labelgroup from './label-group.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { import {
...@@ -317,21 +318,15 @@ ...@@ -317,21 +318,15 @@
} }
case 4: { case 4: {
//多选 //多选
console.log('多选',e)
e.labelType = 4 e.labelType = 4
if (e.Id == '标签') {
e.StartValue = ''
} else {
if (e.StartValue) {
e.StartValue = e.StartValue.split(',').map(e => Number(e))
} else {
e.StartValue = []
}
}
e.directionList = directionList1 e.directionList = directionList1
if (find.OptionsList) { if (find.OptionsList) {
e.OptionsList = find.OptionsList e.OptionsList = find.OptionsList
} }
if(e.Name=='标签'&&e.StartValue){
getLabelByIds(e.StartValue)
}
break break
} }
case 5: { case 5: {
...@@ -363,7 +358,7 @@ ...@@ -363,7 +358,7 @@
}) })
} else { } else {
addMsg.value = [{ addMsg.value = [{
Id: '标签', Id: 0,
Name: '标签', Name: '标签',
Type: 1, Type: 1,
Direction: '', Direction: '',
...@@ -395,7 +390,7 @@ ...@@ -395,7 +390,7 @@
const getCustomerStageList = () => { const getCustomerStageList = () => {
customerSetService.getCustomerStageList({}).then(res => { customerSetService.getCustomerStageList({}).then(res => {
let obj: params = { let obj: params = {
Id: '客户阶段', Id: -1,
Name: '客户阶段', Name: '客户阶段',
Type: 3, Type: 3,
IsCustom: 3, IsCustom: 3,
...@@ -403,7 +398,7 @@ ...@@ -403,7 +398,7 @@
} }
filedList.value.unshift(obj) filedList.value.unshift(obj)
let obj2: params = { let obj2: params = {
Id: '标签', Id: 0,
Name: '标签', Name: '标签',
Type: 4, Type: 4,
IsCustom: 2 IsCustom: 2
...@@ -417,7 +412,7 @@ ...@@ -417,7 +412,7 @@
} }
const addsList = () => { const addsList = () => {
let obj: params = { let obj: params = {
Id: 0, Id: filedList.value[2].Id,
Name: '', Name: '',
Type: '', Type: '',
Direction: '', Direction: '',
...@@ -442,17 +437,17 @@ ...@@ -442,17 +437,17 @@
// 禁用标签 // 禁用标签
let changeLabel = () => { let changeLabel = () => {
let find: any = addMsg.value.find(e => { let find: any = addMsg.value.find(e => {
return e.Id == '标签' return e.Name == '标签'
}) })
if (find) { if (find) {
filedList.value.map(_e => { filedList.value.map(_e => {
if (_e.Id == '标签') { if (_e.Name == '标签') {
_e.disable = true _e.disable = true
} }
}) })
} else { } else {
filedList.value.map(_e => { filedList.value.map(_e => {
if (_e.Id == '标签') { if (_e.Name == '标签') {
_e.disable = false _e.disable = false
} }
}) })
...@@ -600,6 +595,7 @@ ...@@ -600,6 +595,7 @@
} }
return flag return flag
} }
watch( watch(
() => [...addMsg.value], () => [...addMsg.value],
val => { val => {
...@@ -622,6 +618,13 @@ ...@@ -622,6 +618,13 @@
deep: true deep: true
} }
) )
const getLabelByIds = ids => {
customerService.getLabelListByIds(ids).then(res => {
if (res.data && res.data.Data) {
lableList.value = res.data.Data
}
})
}
onMounted(() => { onMounted(() => {
//进入页面就调用 //进入页面就调用
setTimeout(() => { setTimeout(() => {
...@@ -648,7 +651,8 @@ ...@@ -648,7 +651,8 @@
changeDate, changeDate,
changeRange, changeRange,
changeAddCondition, changeAddCondition,
checkRule checkRule,
getLabelByIds,
} }
} }
}) })
......
...@@ -11,6 +11,7 @@ interface dataParams { ...@@ -11,6 +11,7 @@ interface dataParams {
defaultConditionList: Array<any> defaultConditionList: Array<any>
editMsg: any editMsg: any
peopleNum: number peopleNum: number
[key:string]:any
} }
const msg = () => { const msg = () => {
...@@ -21,7 +22,6 @@ const msg = () => { ...@@ -21,7 +22,6 @@ const msg = () => {
} }
const condition = ref<any>(null) const condition = ref<any>(null)
const data = reactive<dataParams>({ const data = reactive<dataParams>({
showDialog: false, showDialog: false,
shape: 0, shape: 0,
dataTree: [], dataTree: [],
...@@ -35,7 +35,8 @@ const data = reactive<dataParams>({ ...@@ -35,7 +35,8 @@ const data = reactive<dataParams>({
RuleAllotWay: 1, //分配方式 1依次轮流 2随机分配 RuleAllotWay: 1, //分配方式 1依次轮流 2随机分配
ConditionList: [] //条件列表 ConditionList: [] //条件列表
}, },
peopleNum: 0 peopleNum: 0,
selectOptionList:[],
}) })
const jumpBeforePage = () => { const jumpBeforePage = () => {
router.push({ router.push({
...@@ -96,7 +97,6 @@ const editRuleModule = () => { ...@@ -96,7 +97,6 @@ const editRuleModule = () => {
return '2-' + e.Id return '2-' + e.Id
}) })
data.defaultArray = [...Dep, ...Emp] data.defaultArray = [...Dep, ...Emp]
console.log(d.ConditionList, 'ConditionList')
}) })
} }
//获取部门数据 //获取部门数据
...@@ -124,27 +124,19 @@ const editRuleModule = () => { ...@@ -124,27 +124,19 @@ const editRuleModule = () => {
} }
// 新增,修改 // 新增,修改
const setCustomerClueRuleInfo = () => { const setCustomerClueRuleInfo = () => {
customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
console.log(data.editMsg.ConditionList) message.successMsg(res.data.Message)
const flag = condition.value.checkRule(data.editMsg.ConditionList) setTimeout(() => {
console.log(94, flag) router.push({
if (!flag) return path: '/customerSetup',
if (data.editMsg.DeptList.length == 0 && data.editMsg.EmpList.length == 0) { query: {
message.warnMsg('适用部门/成员') type: 'clue'
return }
} })
// customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => { }, 2000)
// message.successMsg(res.data.Message) })
// setTimeout(() => {
// router.push({
// path: '/customerSetup',
// query: {
// type: 'clue'
// }
// })
// }, 2000)
// })
} }
return { return {
msg, msg,
condition, condition,
...@@ -156,7 +148,7 @@ const editRuleModule = () => { ...@@ -156,7 +148,7 @@ const editRuleModule = () => {
setCustomerClueRuleInfo, setCustomerClueRuleInfo,
getCondition, getCondition,
getdpt, getdpt,
getNum getNum,
} }
} }
......
<template> <template>
<div class="q-pa-md customer"> <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"> <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" <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" 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" v-model:pagination="pagination" selection="multiple" v-model:selected="data.selected"
...@@ -10,7 +14,6 @@ ...@@ -10,7 +14,6 @@
<template v-slot:body-cell-CustomerName="props"> <template v-slot:body-cell-CustomerName="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<div class="cutomer_Header"> <div class="cutomer_Header">
<div class="customer_Img"> <div class="customer_Img">
<img :src="props.row.WeChatPhoto" style="width: 100%; height: 100%" /> <img :src="props.row.WeChatPhoto" style="width: 100%; height: 100%" />
</div> </div>
...@@ -67,9 +70,9 @@ ...@@ -67,9 +70,9 @@
import CustomerModule from '@/module/customer/customerModule' import CustomerModule from '@/module/customer/customerModule'
import customRight from '@/components/customer/customRight.vue' import customRight from '@/components/customer/customRight.vue'
import visibleColumns from '@/components/common/visibleColumns.vue' import visibleColumns from '@/components/common/visibleColumns.vue'
import customerHead from '@/components/customer/customerHead.vue' import customerHead from '@/components/customer/customerHead.vue'
export default defineComponent({ export default defineComponent({
components: { components: {
...@@ -81,7 +84,7 @@ ...@@ -81,7 +84,7 @@
useMeta({ useMeta({
title: '客户', title: '客户',
}) })
let { let {
getCustomerList, getCustomerList,
getWayList, getWayList,
...@@ -101,9 +104,9 @@ ...@@ -101,9 +104,9 @@
CustomerId.value = item.row.Id CustomerId.value = item.row.Id
isShowCustom.value = true isShowCustom.value = true
} }
provide('msg',msg) provide('msg', msg)
const updatePage=()=>{ const updatePage = () => {
msg.PageIndex=1 msg.PageIndex = 1
getCustomerList() getCustomerList()
} }
onMounted(() => { onMounted(() => {
...@@ -158,44 +161,4 @@ ...@@ -158,44 +161,4 @@
.customer_Wechat { .customer_Wechat {
color: #9999a8; color: #9999a8;
} }
</style>
:deep(.n-base-selection-label) { \ No newline at end of file
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>
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="q-gutter-lg"> <div class="q-gutter-lg">
<q-radio <q-radio
v-model="configMsg.ClueType" v-model="configMsg.ClueType"
:val="1" :val="2"
label="自动分配" label="自动分配"
@update:model-value="configChange" @update:model-value="configChange"
></q-radio> ></q-radio>
<q-radio <q-radio
v-model="configMsg.ClueType" v-model="configMsg.ClueType"
:val="2" :val="1"
label="手动分配" label="手动分配"
@update:model-value="configChange" @update:model-value="configChange"
></q-radio> ></q-radio>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
indicator-color="primary" indicator-color="primary"
narrow-indicator narrow-indicator
> >
<q-tab name="yewumoshi" label="业务模式" /> <q-tab name="model" label="业务模式" />
<q-tab name="field" label="客户字段" /> <q-tab name="field" label="客户字段" />
<q-tab name="label" label="标签" /> <q-tab name="label" label="标签" />
<q-tab name="clue" label="线索分配规则" /> <q-tab name="clue" label="线索分配规则" />
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<q-tab name="operation" label="客户操作" /> <q-tab name="operation" label="客户操作" />
</q-tabs> </q-tabs>
<div class="container fit"> <div class="container fit">
<businessModel v-if="tab == 'model'"></businessModel>
<customer-Field v-if="tab == 'field'"></customer-Field> <customer-Field v-if="tab == 'field'"></customer-Field>
<clue-rule v-if="tab == 'clue'"></clue-rule> <clue-rule v-if="tab == 'clue'"></clue-rule>
<customer-phase v-if="tab == 'phase'"></customer-phase> <customer-phase v-if="tab == 'phase'"></customer-phase>
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import businessModel from './components/businessModel.vue'
import customerField from './components/customerField.vue' import customerField from './components/customerField.vue'
import clueRule from './components/clueRule.vue' import clueRule from './components/clueRule.vue'
import customerPhase from './components/customerPhase.vue' import customerPhase from './components/customerPhase.vue'
...@@ -44,6 +46,7 @@ import { ...@@ -44,6 +46,7 @@ import {
export default defineComponent({ export default defineComponent({
components: { components: {
businessModel,
customerField, customerField,
clueRule, clueRule,
customerPhase, customerPhase,
......
...@@ -81,10 +81,12 @@ import { ...@@ -81,10 +81,12 @@ import {
import requestGroup from '@/components/customer/request-group.vue' import requestGroup from '@/components/customer/request-group.vue'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
import editRuleModule from '@/module/editor/editRuleModule' import editRuleModule from '@/module/editor/editRuleModule'
// import where from '@/components/common/customWhere/where.vue'
export default defineComponent({ export default defineComponent({
components: { components: {
requestGroup, requestGroup,
departmentStaff departmentStaff,
// where
}, },
setup() { setup() {
let { let {
...@@ -122,7 +124,7 @@ export default defineComponent({ ...@@ -122,7 +124,7 @@ export default defineComponent({
setCustomerClueRuleInfo, setCustomerClueRuleInfo,
getCondition, getCondition,
getdpt, getdpt,
getNum getNum,
} }
} }
......
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