Commit 3cbadd41 authored by 罗超's avatar 罗超

1

parent a927beb9
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-select <q-select
filled filled
dense
option-value="Id" option-value="Id"
size="sm" size="sm"
v-model="cutomMsg.Value" v-model="cutomMsg.Value"
...@@ -67,7 +68,7 @@ ...@@ -67,7 +68,7 @@
:options="data.customData" :options="data.customData"
emit-value emit-value
map-options map-options
label="请选择客户阶段" placeholder="请选择客户阶段"
/> />
</div> </div>
</div> </div>
...@@ -110,7 +111,7 @@ ...@@ -110,7 +111,7 @@
</div> </div>
<div class="edit_content"> <div class="edit_content">
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-input filled v-model="item.Value" placeholder="请输入要修改的值"></q-input> <q-input filled dense v-model="item.Value" placeholder="请输入要修改的值"></q-input>
</div> </div>
</div> </div>
</div> </div>
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
</div> </div>
<div class="edit_content"> <div class="edit_content">
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-input filled v-model="item.Value" maxlength="50" placeholder="请输入要修改的值"></q-input> <q-input filled dense v-model="item.Value" maxlength="50" placeholder="请输入要修改的值"></q-input>
</div> </div>
</div> </div>
</div> </div>
...@@ -184,6 +185,7 @@ ...@@ -184,6 +185,7 @@
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-select <q-select
filled filled
dense
option-value="Id" option-value="Id"
size="sm" size="sm"
v-model="item.Value" v-model="item.Value"
...@@ -191,7 +193,7 @@ ...@@ -191,7 +193,7 @@
:options="item.OptionsList" :options="item.OptionsList"
emit-value emit-value
map-options map-options
label="请选择" placeholder="请选择"
/> />
</div> </div>
</div> </div>
...@@ -230,6 +232,7 @@ ...@@ -230,6 +232,7 @@
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-select <q-select
filled filled
dense
multiple multiple
use-chips use-chips
option-value="Id" option-value="Id"
...@@ -239,7 +242,7 @@ ...@@ -239,7 +242,7 @@
:options="item.OptionsList" :options="item.OptionsList"
emit-value emit-value
map-options map-options
label="请选择" placeholder="请选择"
/> />
</div> </div>
</div> </div>
...@@ -277,7 +280,7 @@ ...@@ -277,7 +280,7 @@
</div> </div>
<div class="edit_content"> <div class="edit_content">
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-input filled v-model="item.Value" mask="date" :rules="['date']"> <q-input filled dense v-model="item.Value" mask="date" :rules="['date']">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy
...@@ -330,7 +333,7 @@ ...@@ -330,7 +333,7 @@
</div> </div>
<div class="edit_content"> <div class="edit_content">
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-input filled v-model="item.Value" mask="date" :rules="['date']"> <q-input filled dense v-model="item.Value" mask="date" :rules="['date']">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy <q-popup-proxy
...@@ -383,7 +386,7 @@ ...@@ -383,7 +386,7 @@
</div> </div>
<div class="edit_content"> <div class="edit_content">
<div class="edit_info_wrap"> <div class="edit_info_wrap">
<q-input filled v-model="item.Value" maxlength="20" placeholder="数值"></q-input> <q-input filled dense v-model="item.Value" maxlength="20" placeholder="数值"></q-input>
</div> </div>
</div> </div>
</div> </div>
......
import { ref, reactive } from 'vue' import { reactive } from 'vue'
import customerSetService from '@/api/customerSet' import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer' // import customerService from '@/api/customer'
import router from '@/router/index' import router from '@/router/index'
import message from '@/utils/message' import message from '@/utils/message'
const msg = () => { const msg = () => {
const curQueryId = Number(router.currentRoute.value.query.Id) const curQueryId = Number(router.currentRoute.value.query.Id)
return { return {
RuleId: curQueryId RuleId: curQueryId
} }
} }
const condition = ref<any>(null)
const data = reactive<any>({ const data = reactive<any>({
step:1 step: 1,
text: '',
radio: 1,
showDeptDialog: false,
dataTree: [],
defaultDept:[],
}) })
const editMsg = reactive({
Id: 0,
Name: '打丧尸',
IsAllowRepeat: 1,
DeptList: [] as any,
EmpList: [] as any,
RecyclingType: 1,
ConditionList: [] as any,
NotRecycleTimeList: [] as any,
RemindDay: 0,
RemindType: 1,
LimitDay: 0,
PrivateLibraryType: ''
})
const jumpBeforePage = () => { const jumpBeforePage = () => {
router.push({ router.push({
path: '/customerSetup', path: '/customerSetup',
...@@ -25,78 +43,65 @@ const jumpBeforePage = () => { ...@@ -25,78 +43,65 @@ const jumpBeforePage = () => {
} }
const editRuleModule = () => { const editRuleModule = () => {
//获取分配客户条件
const getCondition = val => {
data.editMsg.ConditionList = [...val]
}
//获取已选部门成员 //获取已选部门成员
const getdpt = val => { const getdpt = val => {
data.showDialog = false editMsg.DeptList = []
data.editMsg.DeptList = []
data.editMsg.EmpList = []
val.map(e => { val.map(e => {
if (e.Id.slice(0, 1) == 1) { editMsg.DeptList.push({
data.editMsg.DeptList.push({ DeptId: e.Id,
DeptId: e.Id.slice(2), DeptName: e.DeptName
DeptName: e.Name })
})
} else {
data.editMsg.EmpList.push({
Id: e.Id.slice(2),
EmployeeName: e.Name
})
}
}) })
console.log(val, 'dpt') console.log(val, 'dpt')
} }
//获取已选人数 //获取已选人数
const getNum = n => { const getNum = (n) => {
data.peopleNum = n data.peopleNum = n
} }
//获取线索详情 //获取线索详情
const getDetail = () => { const getDetail = () => {
customerSetService.getCustomerClueRuleDetail(msg()).then(res => { customerSetService.getCustomerClueRuleDetail(msg()).then(res => {
const d = res.data.Data const d = res.data.Data
data.editMsg.DeptList = d.DeptList // data.editMsg.DeptList = d.DeptList
data.editMsg.EmpList = d.EmpList // data.editMsg.EmpList = d.EmpList
data.editMsg.ConditionList = d.ConditionList // data.editMsg.ConditionList = d.ConditionList
data.defaultConditionList = d.ConditionList // data.defaultConditionList = d.ConditionList
data.editMsg.RuleAllotWay = d.RuleAllotWay // data.editMsg.RuleAllotWay = d.RuleAllotWay
data.editMsg.RuleSelectType = d.RuleSelectType // data.editMsg.RuleSelectType = d.RuleSelectType
const Dep = d.DeptList.map(e => { data.defaultDept = d.DeptList.map(e => {
return '1-' + e.DeptId return e.DeptId
})
const Emp = d.EmpList.map(e => {
return '2-' + e.Id
}) })
data.defaultArray = [...Dep, ...Emp]
}) })
} }
const showDeptDig = () => {
data.showDeptDialog = true
}
//获取部门数据 //获取部门数据
const getEmployeeData = () => { const getEmployeeData = () => {
customerService.getEmployeeData({}).then(res => { customerSetService.getDeptTree({}).then(res => {
console.log(res.data.Data, '部门') console.log(res.data.Data, '部门')
data.dataTree = res.data.Data data.dataTree = res.data.Data
// 重组唯一id // 重组唯一id
if (data.dataTree.length == 0) return if (data.dataTree.length == 0) return
data.dataTree.forEach(x => { // data.dataTree.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId // x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) { // if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList) // getChildList(x.ChildList)
} // }
}) // })
})
}
const getChildList = (ChildList: Array<any>) => {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
}) })
} }
// const getChildList = (ChildList: Array<any>) => {
// ChildList.forEach(x => {
// x.newId = x.DataType + '-' + x.DeptId
// if (x.ChildList && x.ChildList.length > 0) {
// getChildList(x.ChildList)
// }
// })
// }
// 新增,修改 // 新增,修改
const setCustomerClueRuleInfo = () => { const setCustomerClueRuleInfo = () => {
customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => { customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
...@@ -114,15 +119,16 @@ const editRuleModule = () => { ...@@ -114,15 +119,16 @@ const editRuleModule = () => {
return { return {
msg, msg,
condition,
data, data,
editMsg,
getDetail, getDetail,
getEmployeeData, getEmployeeData,
jumpBeforePage, jumpBeforePage,
setCustomerClueRuleInfo, setCustomerClueRuleInfo,
getCondition,
getdpt, getdpt,
getNum, getNum,
//----------new---
showDeptDig,
} }
} }
......
...@@ -65,12 +65,12 @@ const editRuleModule = () => { ...@@ -65,12 +65,12 @@ const editRuleModule = () => {
if (e.Id.slice(0, 1) == 1) { if (e.Id.slice(0, 1) == 1) {
data.editMsg.DeptList.push({ data.editMsg.DeptList.push({
DeptId: e.Id.slice(2), DeptId: e.Id.slice(2),
DeptName: e.Name DeptName: e.DeptName
}) })
} else { } else {
data.editMsg.EmpList.push({ data.editMsg.EmpList.push({
Id: e.Id.slice(2), Id: e.Id.slice(2),
EmployeeName: e.Name EmployeeName: e.DeptName
}) })
} }
}) })
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</div> </div>
<q-btn text-color="accent" outline unelevated label="设置查重规则" @click="showRuleDig=true" /> <q-btn text-color="accent" outline unelevated label="设置查重规则" @click="showRuleDig=true" />
</div> </div>
<q-table class="sticky-right-column-table" :rows="list" flat :columns="columns" row-key="Id"> <q-table class="sticky-right-column-table" :rows="list" flat :columns="columns" hide-bottom row-key="Id">
<template v-slot:body-cell-range="props"> <template v-slot:body-cell-range="props">
<q-td :props="props"> <q-td :props="props">
<div v-for="(item,index) in props.row.DeptList" :key="index">{{item.DeptName}}</div> <div v-for="(item,index) in props.row.DeptList" :key="index">{{item.DeptName}}</div>
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
} }
.tipBox { .tipBox {
font-size: 12px; font-size: 13px;
line-height: 1.8; line-height: 1.8;
} }
......
...@@ -7,18 +7,71 @@ ...@@ -7,18 +7,71 @@
</q-breadcrumbs> </q-breadcrumbs>
<q-btn color="primary" label="完成" @click="setCustomerClueRuleInfo" /> <q-btn color="primary" label="完成" @click="setCustomerClueRuleInfo" />
</div> </div>
<div class="container"> <div class="editCustomerLib flex">
<q-stepper v-model="step" vertical color="primary" animated flat class="step-container"> <q-stepper v-model="step" vertical color="primary" animated flat header-nav class="step-container">
<q-step :name="1" title="基础设置" icon="settings" :done="step > 1" style="height: 100px;"> <q-step :name="1" title="基础设置" icon="settings" :done="step > 1" style="height: 125px;">
</q-step> </q-step>
<q-step :name="2" title="公海设置" icon="settings" :done="step > 2" style="height: 100px;"> <q-step :name="2" title="公海设置" icon="settings" :done="step > 2" style="height: 125px;">
</q-step> </q-step>
<q-step :name="3" title="私库规则" icon="settings" :done="step = 3" style="height: 100px;"> <q-step :name="3" title="私库规则" icon="settings" :done="step == 3" style="height: 125px;">
</q-step> </q-step>
</q-stepper> </q-stepper>
<div class="container">
<div v-if="step==1">
<div class="content-block">
<div class="block-title q-mb-sm">基础信息</div>
<div class="block-subtitle q-mb-xs"> 名称 <span style="color:#f00">*</span></div>
<q-input outlined dense v-model="editMsg.Name" clearable maxlength="8" placeholder="请输入客户库名称"
:suffix="editMsg.Name?`${editMsg.Name.length}/8`:'0/8'" class="q-mb-md" style="width:450px" />
<div class="block-subtitle q-mb-xs"> 是否允许重复客户 <span style="color:#f00">*</span></div>
<q-radio v-model="editMsg.IsAllowRepeat" :val="2" dense class="full-width q-mb-xs">
<div class="">
<span class="q-ml-sm"></span>
<span class="text-subTip q-ml-sm"> 不支持创建重复客户(一个客户只能被一个员工跟进)</span>
<n-popover trigger="hover" placement="top">
<template #trigger>
<q-icon name="help" size="xs" color="grey-4" />
</template>
<div class="tipBox">
特殊情况:由于员工扫码添加客户微信不可控,所以可也能造成<br />
重复客户的情况。针对这种场景,会有撞单提示,且支持向其他负责人<br />
申请共享客户,共享成功后,申请人的客户详情将被合并覆盖。
</div>
</n-popover>
</div>
</q-radio>
<q-radio v-model="editMsg.IsAllowRepeat" :val="1" dense>
<span class="q-ml-sm"></span>
<span class="text-subTip q-ml-sm"> 不支持创建重复客户(一个客户只能被一个员工跟进)</span>
</q-radio>
</div>
<div class="content-block q-mt-md">
<div class="block-title q-mb-sm">权限范围</div>
<div class="block-subtitle q-mb-xs"> 适用部门 <span style="color:#f00">*</span></div>
<div class="q-my-sm flex justify-between items-center">
<q-btn outline color="primary" label="选择部门/成员" @click="showDeptDig" />
<div class="flex align-center depart-title">
<span>已选:0人</span>
<div class="per"></div>
<span>有效账号数(已启用探马账号人数):0人</span>
</div>
</div>
<div class="Dept-box ">
<q-chip color="primary" v-for="(item,index) in editMsg.DeptList" :key="index" text-color="white"
icon="work">{{item.DeptName}}</q-chip>
</div>
</div>
</div>
<div class="q-mt-md">
<q-btn unelevated color="white" text-color="black" label="上一步" />
<q-btn unelevated color="accent" label="下一步" class="q-ml-md" />
</div>
</div>
</div> </div>
<departmentStaff v-model="showDialog" :defaultArray="defaultArray" nodeKey="newId" labelKey="DeptName" <departmentStaff v-model="showDeptDialog" :defaultArray="defaultDept" nodeKey="DeptId" :showType="1"
childrenKey="ChildList" strategy="leaf" :treeData="dataTree" @select="getdpt" @getNum="getNum" /> labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="dataTree" @select="getdpt"
@getNum="getNum" />
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -32,7 +85,6 @@ ...@@ -32,7 +85,6 @@
import editRuleModule from '@/module/customer/editor/editCustomerLibModule' import editRuleModule from '@/module/customer/editor/editCustomerLibModule'
export default defineComponent({ export default defineComponent({
components: { components: {
departmentStaff, departmentStaff,
}, },
setup() { setup() {
...@@ -40,30 +92,29 @@ ...@@ -40,30 +92,29 @@
jumpBeforePage, jumpBeforePage,
msg, msg,
data, data,
condition, editMsg,
getDetail, // getDetail,
getEmployeeData, getEmployeeData,
setCustomerClueRuleInfo, setCustomerClueRuleInfo,
getCondition,
getdpt, getdpt,
getNum, getNum,
showDeptDig,
} = editRuleModule(); } = editRuleModule();
onMounted(() => { onMounted(() => {
if (msg().RuleId > 0) { if (msg().RuleId > 0) {
// data.editMsg.Id = msg().RuleId // data.editMsg.Id = msg().RuleId
getDetail() // getDetail()
} }
getEmployeeData() getEmployeeData()
}) })
return { return {
jumpBeforePage, jumpBeforePage,
condition,
...toRefs(data), ...toRefs(data),
editMsg,
setCustomerClueRuleInfo, setCustomerClueRuleInfo,
getCondition,
getdpt, getdpt,
getNum, getNum,
showDeptDig
} }
} }
...@@ -87,18 +138,53 @@ ...@@ -87,18 +138,53 @@
background-color: #fff; background-color: #fff;
} }
.container { .editCustomerLib {
.step-container { .step-container {
width: 200px; width: 200px;
height:calc(100vh - 70px); height: calc(100vh - 70px);
padding: 40px; padding: 40px;
flex-shrink: 0; flex-shrink: 0;
border-right: 1px solid #d7d7d7; border-right: 1px solid #d7d7d7;
overflow-x: hidden; overflow-x: hidden;
}
.container {
width: 1087px;
margin: 50px auto 0;
padding-bottom: 50px;
.content-block {
width: 1087px;
padding: 30px 20px;
border-radius: 8px;
background-color: #fff;
.block-title {
font-size: 16px;
color: #000;
}
.block-subtitle {
font-size: 14px;
color: #000;
}
.inputTip {
color: #909399;
font-size: 12px;
}
}
} }
} }
.tipBox {
font-size: 14px;
line-height: 1.8;
}
.text-subTip {
color: #858598;
}
</style> </style>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="content-block mt20"> <div class="content-block mt20">
<div class="fission-title">分配给以下部门/成员</div> <div class="fission-title">分配给以下部门/成员</div>
<div class="fission-subtitle">适用部门/成员</div> <div class="fission-subtitle">适用部门/成员</div>
<div class="departs flex-between-center"> <div class="departs flex justify-between items-center">
<q-btn outline color="primary" label="选择部门/成员" @click="changeDialog" /> <q-btn outline color="primary" label="选择部门/成员" @click="changeDialog" />
<div class="flex align-center depart-title"> <div class="flex align-center depart-title">
<span>已选:{{ peopleNum }}</span> <span>已选:{{ peopleNum }}</span>
......
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