Commit 2d0b6e60 authored by 罗超's avatar 罗超

客户操作页面

parent 3e995e0d
......@@ -67,7 +67,7 @@
<template>
<div class="requestgroup">
<div :style="{ position: 'relative', 'padding-left': addMsg.length > 1 ? '40px' : '0' }">
<div class="row" v-for="(x, y) in addMsg" :key="y" style="margin-bottom: 8px">
<div class="row no-wrap" v-for="(x, y) in addMsg" :key="y" style="margin-bottom: 8px">
<!-- name -->
<q-select outlined v-model="x.Id" :options="filedList" dense class="my-special-class" label="请选择客户信息"
option-value="Id" option-label="Name" option-disable="disable" emit-value map-options
......
<template>
<div class="q-mt-md q-pa-md CustomerOperation flex">
<div class="customer-operation-category">
<div v-for="item in leftList" :key="item.Id" :class="{ active: curItem == item.Id }" class="customer-operation-category--item" @click="changeActive(item)">{{ item.Name }}</div>
<div v-for="item in leftList" :key="item.Id" :class="{ active: curItem == item.Id }"
class="customer-operation-category--item" @click="changeActive(item)">{{ item.Name }}</div>
</div>
<div class="customer-operation-content">
<div v-if="curItem == 1" class="row">
......@@ -45,27 +46,54 @@
<div class="row">
<div class="collaborator-title">放弃后审核:</div>
<div class="col-10">
<div class="flex items-center"><q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
<div class="flex items-center">
<q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
</div>
</div>
<div class="row">
<div class="collaborator-title" style="padding-top: 15px">放弃原因:</div>
<div class="col-10">
<draggable v-model="data.AbandonReasonList" tag="div" item-key="Id">
<template #item="{ element }">
<template #item="{ element,index }">
<div class="flex items-center">
<i class="iconfont icon-drag" style="font-size: 20px; color: #777"></i>
<div class="AbandonReasonItem flex items-center">{{ element }}</div>
<n-popover trigger="hover">
<template #trigger>
<q-icon name="warning" />
<i class="iconfont icon-edit_light" style="font-size: 20px; color: #111" @click="editAbandonReason(element,index)"></i>
</template>
<span>编辑</span>
</n-popover>
<n-popover trigger="hover">
<template #trigger>
<i class="iconfont icon-delete_light q-ml-md" style="font-size: 20px; color: #111"></i>
</template>
<span>删除</span>
</n-popover>
</div>
</template>
</draggable>
<div class="flex items-center q-pl-sm"><q-btn color="primary" label="添加" unelevated class="q-ml-lg q-mr-md" />已设/可设上限:5/10</div>
<div class="flex items-center q-pl-sm">
<q-btn color="primary" label="添加" unelevated class="q-ml-lg q-mr-md" @click="AbandonReasonDialog=true" />
已设/可设上限:{{data.AbandonReasonList.length}}/10</div>
<q-dialog v-model="AbandonReasonDialog">
<q-card>
<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-py-lg" style="width: 460px;max-width: 600px;">
<n-input maxlength="10" size="large" v-model:value="AbandonReasonText" show-count clearable placeholder="请输入放弃原因"/>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="取消" color="primary" v-close-popup />
<q-btn unelevated label="确定" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</div>
</div>
......@@ -179,25 +207,31 @@
</div>
</div>
</div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1" labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1"
labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
</div>
</template>
<script lang="ts">
import { ref, toRefs, reactive, defineComponent, onMounted } from 'vue'
import customerService from '@/api/customer'
// import customerService2 from '@/api/customer2'
import departmentStaff from '@/components/common/departmentStaff.vue'
import requestGroup from '@/components/customer/request-group.vue'
import draggable from 'vuedraggable'
export default defineComponent({
import {
ref,
toRefs,
reactive,
defineComponent,
onMounted
} from 'vue'
import customerService from '@/api/customer'
// import customerService2 from '@/api/customer2'
import departmentStaff from '@/components/common/departmentStaff.vue'
import requestGroup from '@/components/customer/request-group.vue'
import draggable from 'vuedraggable'
export default defineComponent({
components: {
departmentStaff,
requestGroup,
draggable
},
setup() {
const leftList = ref([
{
const leftList = ref([{
Id: 1,
Name: '领取公海客户'
},
......@@ -242,6 +276,10 @@ export default defineComponent({
AbandonType: 1
},
showDptDialog: false,
AbandonReasonDialog: false, //放弃原因弹窗
AbandonReasonText:"",//放弃原因
AbandonReasonIndex:0,//放弃原因index
AbandonReasonType:0,// 修改类型 0:新增,1:编辑
defaultDpt: [],
DptDataTree: []
})
......@@ -268,7 +306,7 @@ export default defineComponent({
})
})
}
const getChildList = (ChildList: Array<any>) => {
const getChildList = (ChildList: Array < any > ) => {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
......@@ -288,6 +326,16 @@ export default defineComponent({
console.log('set', res.data.Data)
})
}
const editAbandonReason=(val,index)=>{
data.AbandonReasonDialog=true
data.AbandonReasonText=val,
data.AbandonReasonIndex=index
console.log(332,val,index)
}
const changeAbandonReason=()=>{
// data.data.AbandonReasonList[data.]
// console.log(332,val,index)
}
onMounted(() => {
getDptTree()
getConfig()
......@@ -299,17 +347,20 @@ export default defineComponent({
...toRefs(data),
getdpt,
checkedPublicGetDept,
setCustomerConfig
setCustomerConfig,
editAbandonReason,
changeAbandonReason
}
}
})
})
</script>
<style lang="scss" scoped>
.CustomerOperation {
.CustomerOperation {
background-color: rgb(243, 246, 249);
}
}
.customer-operation-category {
.customer-operation-category {
margin-right: 10px;
width: 200px;
flex: none;
......@@ -331,17 +382,17 @@ export default defineComponent({
background-color: #eaf0ff;
color: #3470ff;
}
}
}
.customer-operation-content {
.customer-operation-content {
background: #fff;
flex: 1;
border-radius: 8px;
padding: 25px;
overflow: auto;
}
}
.AbandonReasonItem {
.AbandonReasonItem {
width: 453px;
height: 50px;
line-height: 50px;
......@@ -350,13 +401,15 @@ export default defineComponent({
border-radius: 5px;
border: 1px solid #d7d7d7;
margin: 10px;
}
.collaborator-title {
}
.collaborator-title {
min-width: 80px;
line-height: 40px;
text-align: right;
margin-right: 10px;
font-weight: 600;
white-space: nowrap;
}
}
</style>
......@@ -250,7 +250,15 @@
.customer_Wechat {
color: #9999a8;
}
.n-base-selection-label{
height: 56px;
::v-deep .n-base-selection-label{
height: 54px;
background-color: rgba(0, 0, 0, 0.05);
border: none !important;
}
::v-deep .n-base-selection-input{
height: 54px;
display: flex;
align-items: center;
border: none !important;
}
</style>
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