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

1

parent fd2cea4a
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
"@types/lockr": "^0.8.7", "@types/lockr": "^0.8.7",
"@types/lodash": "^4.14.175", "@types/lodash": "^4.14.175",
"@types/webpack-env": "^1.16.2", "@types/webpack-env": "^1.16.2",
"ant-design-vue": "^2.2.8",
"axios": "^0.21.1", "axios": "^0.21.1",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-plus": "^1.2.0-beta.3", "dayjs": "^1.10.7",
"katex": "^0.13.18", "katex": "^0.13.18",
"lockr": "^0.9.0-beta.0", "lockr": "^0.9.0-beta.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
......
...@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) { ...@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot) // app boot file (/src/boot)
// --> boot files are part of "main.js" // --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files // https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp', 'antDesign','naiveUI'], boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp','naiveUI'],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: ['app.scss','svg.scss'], css: ['app.scss','svg.scss'],
......
...@@ -10,6 +10,6 @@ export default defineComponent({ ...@@ -10,6 +10,6 @@ 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_5n2w0eo4056.css') @import url('//at.alicdn.com/t/font_2930340_at4xv6vjdh.css')
@import url('./css/table.sass') @import url('./css/table.sass')
</style> </style>
import { boot } from 'quasar/wrappers'
import Antd from 'ant-design-vue'
// import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'ant-design-vue/dist/antd.css'
export default boot(({ app }) => {
// Set Antd instance on app
app.use(Antd)
// app.use(ElementPlus)
})
import { boot } from 'quasar/wrappers' import { boot } from 'quasar/wrappers'
import naive from 'naive-ui' import naive from 'naive-ui'
export default boot(({ app }) => { export default boot(({ app }) => {
// Set naive instance on app // Set naive instance on app
app.use(naive) app.use(naive)
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
<q-input v-model="msg.Remark" maxlength="1000" type="textarea" placeholder="请填写跟进记录" /> <q-input v-model="msg.Remark" maxlength="1000" type="textarea" placeholder="请填写跟进记录" />
<div class="file_box"> <div class="file_box">
<div class="img_list"> <div class="img_list">
<div v-for="(e,i) in msg.ImageList" :key="i" class="img_box"> <div v-for="(e, i) in msg.ImageList" :key="i" class="img_box">
<img :src="e" class="img" /> <img :src="e" class="img" />
<q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)"/> <q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)" />
</div> </div>
</div> </div>
<div class="file_list"> <div class="file_list">
<div v-for="(e,i) in msg.FileList" :key="i" class="flex items-center file_box"> <div v-for="(e, i) in msg.FileList" :key="i" class="flex items-center file_box">
<div class="flex items-center"> <div class="flex items-center">
附件: 附件:
<span style="color:#333">{{ e.FileName }}</span> <span style="color: #333">{{ e.FileName }}</span>
({{ e.size }}) ({{ e.size }})
</div> </div>
<div class="del_btn" @click="delFile(i)">删除</div> <div class="del_btn" @click="delFile(i)">删除</div>
...@@ -25,40 +25,23 @@ ...@@ -25,40 +25,23 @@
</div> </div>
</div> </div>
<div class="file_Space"> <div class="file_Space">
<div style="display:flex;align-items:center;"> <div style="display: flex; align-items: center">
<div> <div>
<a-upload <n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.imageList"
accept="image/*" :custom-request="customUploadImg">
v-model:file-list="data.imageList" <i style="font-size: 25px; cursor: pointer" class="iconfont icon-picture"></i>
name="file" </n-upload>
:multiple="true"
:show-upload-list="false"
:customRequest="customUploadImg"
>
<i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i>
</a-upload>
</div> </div>
<div style="margin-left:8px;"> <div style="margin-left: 8px">
<a-upload <n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.fileList"
v-model:file-list="data.fileList" :custom-request="customUploadFile">
name="file" <i style="font-size: 20px; cursor: pointer" class="iconfont icon-paperclip"></i>
:multiple="true" </n-upload>
:show-upload-list="false"
:customRequest="customUploadFile"
>
<i style="font-size:20px;cursor:pointer;" class="iconfont icon-paperclip"></i>
</a-upload>
</div> </div>
</div> </div>
<div> <div>
<q-btn <q-btn color="myInput" text-color="#000" size="sm" @click="data.isShowEdit = false" label="取消" />
color="myInput" <q-btn color="primary" style="margin-left: 10px" size="sm" @click="save" label="确定" />
text-color="#000"
size="sm"
@click="data.isShowEdit = false"
label="取消"
/>
<q-btn color="primary" style="margin-left:10px;" size="sm" @click="save" label="确定" />
</div> </div>
</div> </div>
</div> </div>
...@@ -66,52 +49,59 @@ ...@@ -66,52 +49,59 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { import {
reactive, reactive,
inject inject
} from 'vue' } from 'vue'
import customer2 from '@/api/customer2' import customer2 from '@/api/customer2'
import massage from "@/utils/message" import massage from '@/utils/message'
import { UploadSelfFile } from '@/utils/upload' import {
interface dataParam { UploadSelfFile
} from '@/utils/upload'
interface dataParam {
[key: string]: any [key: string]: any
} }
export default { export default {
setup(props,ctx) { setup(props, ctx) {
let msg = reactive<dataParam>({ let msg = reactive < dataParam > ({
CustomerId: inject('CustomerId'), CustomerId: inject('CustomerId'),
Remark: "", Remark: '',
ImageList: [], ImageList: [],
FileList: [] FileList: []
}) })
const data = reactive<dataParam>({ const data = reactive < dataParam > ({
isShowEdit: false, isShowEdit: false,
fileList: [], fileList: [],
imageList: [] imageList: []
}) })
let customUploadImg = (file) => { let customUploadImg = file => {
UploadSelfFile('/horse', file.file, (res) => { console.log(82,file)
msg.ImageList.push(res.FileUrl ) UploadSelfFile('/horse', file.file.file, res => {
msg.ImageList.push(res.FileUrl)
}) })
} }
let customUploadFile = (file) => { let customUploadFile = file => {
UploadSelfFile('/horse', file.file, (res) => { UploadSelfFile('/horse', file.file.file, res => {
msg.FileList.push({ FileName: res.FileName, FileUrl: res.FileUrl, size: res.Size }) msg.FileList.push({
FileName: res.FileName,
FileUrl: res.FileUrl,
size: res.Size
})
}) })
} }
const delImg=(i)=>{ const delImg = i => {
msg.ImageList.splice(i,1) msg.ImageList.splice(i, 1)
} }
const delFile=(i)=>{ const delFile = i => {
msg.FileList.splice(i,1) msg.FileList.splice(i, 1)
} }
const save = () => { const save = () => {
customer2.setCustomerTripFollowUpInfo(msg).then((res)=>{ customer2.setCustomerTripFollowUpInfo(msg).then(res => {
massage.successMsg(res.data.Message) massage.successMsg(res.data.Message)
msg.Remark="" msg.Remark = ''
msg.ImageList=[] msg.ImageList = []
msg.FileList=[] msg.FileList = []
ctx.emit("success") ctx.emit('success')
}) })
} }
...@@ -126,34 +116,39 @@ export default { ...@@ -126,34 +116,39 @@ export default {
save save
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.editer_input { .editer_input {
padding: 5px 0; padding: 5px 0;
} }
.myInput { .myInput {
background-color: #f6f6f6 !important; background-color: #f6f6f6 !important;
} }
.file_box {
.file_box {
margin-top: 5px; margin-top: 5px;
.img_list { .img_list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.img_box { .img_box {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin: 10px; margin: 10px;
position: relative; position: relative;
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
object-fit: cover; object-fit: cover;
} }
.del_icon { .del_icon {
font-size: 18px; font-size: 18px;
position: absolute; position: absolute;
...@@ -163,10 +158,12 @@ export default { ...@@ -163,10 +158,12 @@ export default {
} }
} }
} }
.file_list { .file_list {
.file_box { .file_box {
font-size: 14px; font-size: 14px;
color: #9696a6; color: #9696a6;
.del_btn { .del_btn {
margin-left: 10px; margin-left: 10px;
padding-left: 5px; padding-left: 5px;
...@@ -176,19 +173,21 @@ export default { ...@@ -176,19 +173,21 @@ export default {
} }
} }
} }
} }
.file_Space {
.file_Space {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 10px; margin-top: 10px;
align-items: center; align-items: center;
} }
.q-field__control { .q-field__control {
background-color: #f6f6f6 !important; background-color: #f6f6f6 !important;
} }
.q-field--filled .q-field__control:hover:before { .q-field--filled .q-field__control:hover:before {
opacity: 0; opacity: 0;
} }
</style> </style>
<style> <style>
.my-special-class { .my-special-class {
width: 200px; width: 200px;
margin-right: 6px; margin-right: 6px;
} }
.input_label { .input_label {
width: 200px; width: 200px;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
...@@ -15,32 +15,32 @@ ...@@ -15,32 +15,32 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
} }
.right_select { .right_select {
width: 40px; width: 40px;
position: absolute; position: absolute;
left: 0; left: 0;
top: 20px; top: 20px;
} }
.border_top { .border_top {
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
width: 29px; width: 29px;
border-bottom: none; border-bottom: none;
border-right: none; border-right: none;
margin-left: 12px; margin-left: 12px;
} }
.border-bottom { .border-bottom {
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
width: 29px; width: 29px;
border-top: none; border-top: none;
border-right: none; border-right: none;
margin-left: 12px; margin-left: 12px;
} }
.right_select .border_mid div { .right_select .border_mid div {
width: 23px; width: 23px;
height: 23px; height: 23px;
text-align: center; text-align: center;
...@@ -49,146 +49,72 @@ ...@@ -49,146 +49,72 @@
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
background: #d8d8d8; background: #d8d8d8;
} }
.right_select .border_mid .checked { .right_select .border_mid .checked {
background: #333 !important; background: #333 !important;
color: #fff !important; color: #fff !important;
} }
.tag-select-input { .tag-select-input {
padding: 4px 10px; padding: 4px 10px;
border-radius: 5px; border-radius: 5px;
background-color: #f6f6f6; background-color: #f6f6f6;
font-size: 14px; font-size: 14px;
} }
</style> </style>
<template> <template>
<div class="requestgroup"> <div class="requestgroup">
<div :style="{ 'position': 'relative', 'padding-left': addMsg.length > 1 ? '40px' : '0' }"> <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" v-for="(x, y) in addMsg" :key="y" style="margin-bottom: 8px">
<!-- name --> <!-- name -->
<q-select <q-select outlined v-model="x.Id" :options="filedList" dense class="my-special-class" label="请选择客户信息"
outlined option-value="Id" option-label="Name" option-disable="disable" emit-value map-options
v-model="x.Id" @update:model-value="changeName($event, y)" />
:options="filedList"
dense
class="my-special-class"
label="请选择客户信息"
option-value="Id"
option-label="Name"
option-disable="disable"
emit-value
map-options
@update:model-value="changeName($event, y)"
/>
<!-- Direction --> <!-- Direction -->
<q-select <q-select v-if="x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == ''" outlined v-model="x.Direction"
v-if="x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == ''" :options="x.directionList" dense label="请选择" class="my-special-class" option-value="Id" option-label="Name"
outlined emit-value map-options />
v-model="x.Direction"
:options="x.directionList"
dense
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
<div class="cascader" v-if="x.Type == 3"> <div class="cascader" v-if="x.Type == 3">
<a-cascader <n-cascader v-model:value="birthday" clearable placeholder="请选择" check-strategy="child" multiple
v-model:value="birthday" style="width:200px" size="large" max-tag-count="responsive" :options="dateOptions" expand-trigger="hover"
:options="dateOptions" @update:value="changeDate($event, y)" />
placeholder="请选择"
expandTrigger="hover"
size="large"
@change="changeDate($event, y)"
/>
</div> </div>
<div v-if="x.Type == 4"> <div v-if="x.Type == 4">
<a-range-picker <n-config-provider :locale="zhCN" :date-locale="dateZhCN">
style="width:auto" <n-date-picker v-model:value="x.rangeArr" type="datetimerange" size="large" separator="至"
v-model:value="x.rangeArr" clearable @update:value="changeRange($event,y)"/>
size="large" </n-config-provider>
:locale="locale"
format="YYYY/MM/DD HH:mm:ss"
showTime
@change="changeRange($event, y)"
/>
</div> </div>
<!-- StartValue --> <!-- StartValue -->
<div <div v-if="x.Name == '标签' && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
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" <div style="display: flex" v-if="lableList && lableList.length > 0">
@click="showlabel(x, y)"
>
<div style="display: flex;" v-if="lableList && lableList.length > 0">
<div class="text-clamp-1 tag-select-input">{{ lableList[0].Name }}</div> <div class="text-clamp-1 tag-select-input">{{ lableList[0].Name }}</div>
<div <div v-if="lableList.length > 1" class="tag-select-input" style="margin-left: 5px">
v-if="lableList.length > 1" {{ lableList.length - 1 }}+</div>
class="tag-select-input"
style="margin-left: 5px;"
>{{ lableList.length - 1 }}+</div>
</div> </div>
</div> </div>
<div <div v-if="(x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == '') && x.Name !== '标签'">
v-if="(x.Type === 1 || x.Type === 2 || x.Type === 5 || x.Type == '') && x.Name !== '标签'"
>
<div v-if="x.labelType == 3"> <div v-if="x.labelType == 3">
<q-select <q-select v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == ''" outlined v-model="x.StartValue"
v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == ''" :options="x.OptionsList" dense :multiple="x.labelType == 4" label="请选择" class="my-special-class"
outlined option-value="Id" option-label="Name" emit-value map-options />
v-model="x.StartValue"
:options="x.OptionsList"
dense
:multiple="x.labelType == 4"
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
</div> </div>
<div v-else-if="x.labelType == 4"> <div v-else-if="x.labelType == 4">
<q-select <q-select v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == ''" outlined
v-if="x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == ''" v-model="x.StartValue" :options="x.OptionsList" dense :multiple="true" label="请选择"
outlined class="my-special-class" option-value="Id" option-label="Name" emit-value map-options />
v-model="x.StartValue"
:options="x.OptionsList"
dense
:multiple="true"
label="请选择"
class="my-special-class"
option-value="Id"
option-label="Name"
emit-value
map-options
/>
</div> </div>
<div v-else-if="x.labelType == 1 || x.labelType == 2 || x.labelType == 7"> <div v-else-if="x.labelType == 1 || x.labelType == 2 || x.labelType == 7">
<q-input <q-input
v-if="x.Type == 1 && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')" v-if="x.Type == 1 && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
outlined outlined v-model="x.StartValue" label="请输入" dense />
v-model="x.StartValue" <q-input v-if="x.Type == 2 && (x.Direction == 1 || x.Direction == 2 || x.Direction == '')" outlined
label="请输入" v-model="x.StartValue" label="请输入" dense />
dense <q-input v-if="x.Type == 5 || x.Type == ''" outlined v-model="x.StartValue" label="请输入" dense />
/>
<q-input
v-if="x.Type == 2 && (x.Direction == 1 || x.Direction == 2 || x.Direction == '')"
outlined
v-model="x.StartValue"
label="请输入"
dense
/>
<q-input
v-if="x.Type == 5 || x.Type == ''"
outlined
v-model="x.StartValue"
label="请输入"
dense
/>
</div> </div>
<div v-else> <div v-else>
<q-input outlined label="请输入" dense /> <q-input outlined label="请输入" dense />
...@@ -196,86 +122,64 @@ ...@@ -196,86 +122,64 @@
</div> </div>
<!-- 新增和删除 --> <!-- 新增和删除 -->
<div style="display: flex;align-items: center;"> <div style="display: flex; align-items: center">
<img <img src="../../assets/images/customer/delete.png" v-if="addMsg.length > 1"
src="../../assets/images/customer/delete.png" style="width: 20px; height: 20px; margin-left: 10px" @click="deleteadd(y)" />
v-if="addMsg.length > 1" <img src="../../assets/images/customer/add.png" v-if="addMsg.length == y + 1 && addMsg.length < 10"
style="width: 20px;height: 20px;margin-left: 10px;" style="width: 20px; height: 20px; margin-left: 10px" @click="addsList()" />
@click="deleteadd(y)"
/>
<img
src="../../assets/images/customer/add.png"
v-if="addMsg.length == y + 1 && addMsg.length < 10"
style="width: 20px;height: 20px;margin-left: 10px;"
@click="addsList()"
/>
</div> </div>
</div> </div>
<div class="right_select" v-if="addMsg.length > 1"> <div class="right_select" v-if="addMsg.length > 1">
<div <div class="border_top" :style="{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }"></div>
class="border_top"
:style="{ height: ((addMsg.length * 48 - 8 - 46 - 40) / 2) + 'px' }"
></div>
<div class="border_mid"> <div class="border_mid">
<div <div class="and" :class="{ checked: addCondition == 1 }" @click="changeAddCondition(1)">且</div>
class="and" <div class="no" :class="{ checked: addCondition == 2 }" @click="changeAddCondition(2)">或</div>
:class="{ 'checked': addCondition == 1 }"
@click="changeAddCondition(1)"
>且</div>
<div
class="no"
:class="{ 'checked': addCondition == 2 }"
@click="changeAddCondition(2)"
>或</div>
</div> </div>
<div <div class="border-bottom" :style="{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }"></div>
class="border-bottom"
:style="{ height: ((addMsg.length * 48 - 8 - 46 - 40) / 2) + 'px' }"
></div>
</div> </div>
</div> </div>
<labelgroup <labelgroup v-if="isshowlabel" :list="lableList" @close="isshowlabel = false" @submit="getlabel"></labelgroup>
v-if="isshowlabel"
:list="lableList"
@close="isshowlabel = false"
@submit="getlabel"
></labelgroup>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
ref, ref,
watch, watch,
onMounted onMounted
} from 'vue' } from 'vue'
import customerService from '@/api/customer' 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 locale from 'ant-design-vue/es/date-picker/locale/zh_CN'; import {
import { Notify } from 'quasar' Notify
interface params { } from 'quasar'
import {
zhCN,
dateZhCN
} from 'naive-ui'
interface params {
Name: number | string Name: number | string
IsCustom: number IsCustom: number
Type: number | string Type: number | string
labelType?: number | string labelType ? : number | string
Id?: number | string Id ? : number | string
Direction?: string | number Direction ? : string | number
StartValue?: string | Array<any> StartValue ? : string | Array < any >
EndValue?: string EndValue ? : string
disable?: boolean disable ? : boolean
directionList?: Array<any> directionList ? : Array < any >
OptionsList?: Array<any> OptionsList ? : Array < any >
isSelect?: boolean isSelect ? : boolean
rangeArr?: Array<any> rangeArr ? : Array < any > | null
} }
interface dateParams { interface dateParams {
value: string | number value: string | number
label: string label: string
children?: Array<dateParams> children ? : Array < dateParams >
} }
const format = "YYYY/MM/DD HH:mm:ss" const format = 'YYYY/MM/DD HH:mm:ss'
export default defineComponent({ export default defineComponent({
props: { props: {
addCondition: { addCondition: {
type: Number, type: Number,
...@@ -287,30 +191,30 @@ export default defineComponent({ ...@@ -287,30 +191,30 @@ export default defineComponent({
} }
}, },
components: { components: {
labelgroup, labelgroup
}, },
setup(props, ctx) { setup(props, ctx) {
let birthday = ref([])//只有一个 let birthday = ref([]) //只有一个
let lableList = ref<Array<any>>([]) //标签的数组//只有一个 let lableList = ref < Array < any >> ([]) //标签的数组//只有一个
let filedList = ref<Array<params>>([]); //客户字段数组 let filedList = ref < Array < params >> ([]) //客户字段数组
let addMsg = ref<Array<any>>([]) //筛选数组 let addMsg = ref < Array < any >> ([]) //筛选数组
let isshowlabel = ref(false) //标签弹出显示 let isshowlabel = ref(false) //标签弹出显示
let selectindex = ref(0) //现在筛选数组 索引 let selectindex = ref(0) //现在筛选数组 索引
//日期数组 //日期数组
let dateOptions = ref<Array<dateParams>>([]) let dateOptions = ref < Array < dateParams >> ([])
let year: any = new Date().getFullYear() let year: any = new Date().getFullYear()
for (let i = 1; i <= 12; i++) { for (let i = 1; i <= 12; i++) {
let obj: dateParams = { let obj: dateParams = {
value: i < 10 ? '0' + i : i, value: i < 10 ? '0' + i : '' + i,
label: i + '月', label: i + '月',
children: [] children: []
} }
let day = new Date(year, i, 0).getDate() let day = new Date(year, i, 0).getDate()
for (let d = 1; d <= day; d++) { for (let d = 1; d <= day; d++) {
obj.children?.push({ obj.children?.push({
value: d < 10 ? '0' + d : d, value: (i < 10 ? '0' + i : '' + i) + '-' + (d < 10 ? '0' + d : '' + d),
label: d + '号', label: d + '号'
}) })
} }
dateOptions.value.push(obj) dateOptions.value.push(obj)
...@@ -318,86 +222,105 @@ export default defineComponent({ ...@@ -318,86 +222,105 @@ export default defineComponent({
const directionList1 = [{ const directionList1 = [{
Id: 1, Id: 1,
Name: '包含所有' Name: '包含所有'
}, { },
{
Id: 2, Id: 2,
Name: '包含任意' Name: '包含任意'
}, { },
{
Id: 3, Id: 3,
Name: '不包含' Name: '不包含'
}, { },
{
Id: 4, Id: 4,
Name: '为空' Name: '为空'
}, { },
{
Id: 5, Id: 5,
Name: '不为空' Name: '不为空'
},] }
]
const directionList2 = [{ const directionList2 = [{
Id: 1, Id: 1,
Name: '等于' Name: '等于'
}, { },
{
Id: 2, Id: 2,
Name: '不等于' Name: '不等于'
}, { },
{
Id: 3, Id: 3,
Name: '为空' Name: '为空'
}, { },
{
Id: 4, Id: 4,
Name: '不为空' Name: '不为空'
}, { },
{
Id: 5, Id: 5,
Name: '模糊' Name: '模糊'
},] }
]
const directionList5 = [{ const directionList5 = [{
Id: 1, Id: 1,
Name: '等于' Name: '等于'
}, { },
{
Id: 2, Id: 2,
Name: '大于' Name: '大于'
}, { },
{
Id: 3, Id: 3,
Name: '大于等于' Name: '大于等于'
}, { },
{
Id: 4, Id: 4,
Name: '小于' Name: '小于'
}, { },
{
Id: 5, Id: 5,
Name: '小于等于' Name: '小于等于'
},] }
]
const init = () => { const init = () => {
console.log('init', props.defaultData) console.log('init', props.defaultData)
if (props.defaultData && props.defaultData.length > 0) { if (props.defaultData && props.defaultData.length > 0) {
addMsg.value = [] addMsg.value = []
props.defaultData.map((e: any) => { props.defaultData.map((e: any) => {
let find: any = filedList.value.find((_e) => { let find: any = filedList.value.find(_e => {
return _e.Id == e.Id return _e.Id == e.Id
}) })
if (find && find.OptionsList) { if (find && find.OptionsList) {
e.OptionsList = find.OptionsList e.OptionsList = find.OptionsList
} }
switch (find.Type) { switch (find.Type) {
case 1: {//单行文本 case 1: {
//单行文本
e.labelType = 1 e.labelType = 1
e.directionList = directionList2 e.directionList = directionList2
break; break
} }
case 2: {//多行文本 case 2: {
//多行文本
e.labelType = 2 e.labelType = 2
e.directionList = directionList2 e.directionList = directionList2
break; break
} }
case 3: {//单选 case 3: {
//单选
e.labelType = 3 e.labelType = 3
e.directionList = directionList2 e.directionList = directionList2
e.StartValue = Number(e.StartValue) e.StartValue = Number(e.StartValue)
if (find.OptionsList) { if (find.OptionsList) {
e.OptionsList = find.OptionsList e.OptionsList = find.OptionsList
} }
break; break
} }
case 4: {//多选 case 4: {
//多选
e.labelType = 4 e.labelType = 4
if (e.Id == "标签") { if (e.Id == '标签') {
e.StartValue='' e.StartValue = ''
} else { } else {
if (e.StartValue) { if (e.StartValue) {
e.StartValue = e.StartValue.split(',').map(e => Number(e)) e.StartValue = e.StartValue.split(',').map(e => Number(e))
...@@ -410,28 +333,31 @@ export default defineComponent({ ...@@ -410,28 +333,31 @@ export default defineComponent({
if (find.OptionsList) { if (find.OptionsList) {
e.OptionsList = find.OptionsList e.OptionsList = find.OptionsList
} }
break; break
} }
case 5: {//日期 case 5: {
//日期
e.labelType = 5 e.labelType = 5
if (e.StartValue) { if (e.StartValue) {
birthday.value = e.StartValue.split('-') birthday.value = e.StartValue.split(',')
} else { } else {
birthday.value = [] birthday.value = []
} }
console.log(5, e.StartValue) console.log(5, e.StartValue)
break; break
} }
case 6: {//日期时间范围 case 6: {
//日期时间范围
e.labelType = 6 e.labelType = 6
e.rangeArr = [e.StartValue, e.EndValue] e.rangeArr = [Date.parse(e.StartValue), Date.parse(e.EndValue)]
console.log(6, e.StartValue) console.log(6, e.StartValue)
break; break
} }
case 7: {//数值 case 7: {
//数值
e.labelType = 7 e.labelType = 7
e.directionList = directionList5 e.directionList = directionList5
break; break
} }
} }
addMsg.value.push(e) addMsg.value.push(e)
...@@ -449,19 +375,22 @@ export default defineComponent({ ...@@ -449,19 +375,22 @@ export default defineComponent({
}] }]
} }
} }
let changeAddCondition = (val) => { let changeAddCondition = val => {
ctx.emit('update:addCondition', val) ctx.emit('update:addCondition', val)
} }
const getCustomerFiledList = () => { const getCustomerFiledList = () => {
customerService.getCustomerFiledList({ customerService
.getCustomerFiledList({
Enable: 1 Enable: 1
}).then((res) => { })
.then(res => {
let data = res.data.Data let data = res.data.Data
filedList.value = data; filedList.value = data
filedList.value.forEach((x) => { // IsCustom 是否自定义字段 1是 2标签 3阶段 filedList.value.forEach(x => {
// IsCustom 是否自定义字段 1是 2标签 3阶段
x.IsCustom = 1 x.IsCustom = 1
}) })
getCustomerStageList(); //获取客户阶段 getCustomerStageList() //获取客户阶段
}) })
} }
const getCustomerStageList = () => { const getCustomerStageList = () => {
...@@ -481,10 +410,11 @@ export default defineComponent({ ...@@ -481,10 +410,11 @@ export default defineComponent({
IsCustom: 2 IsCustom: 2
} }
filedList.value.unshift(obj2) filedList.value.unshift(obj2)
console.log("标签", filedList.value) console.log('标签', filedList.value)
}) })
} }
const deleteadd = (index) => { //删除addMsg某一项 const deleteadd = index => {
//删除addMsg某一项
addMsg.value.splice(index, 1) addMsg.value.splice(index, 1)
} }
const addsList = () => { const addsList = () => {
...@@ -502,46 +432,46 @@ export default defineComponent({ ...@@ -502,46 +432,46 @@ export default defineComponent({
} }
const showlabel = (x, y) => { const showlabel = (x, y) => {
selectindex.value = y; selectindex.value = y
isshowlabel.value = true isshowlabel.value = true
} }
const getlabel = (list) => { const getlabel = list => {
isshowlabel.value = false; isshowlabel.value = false
lableList.value = list lableList.value = list
addMsg.value[selectindex.value].StartValue = list.map(e => e.Id).toString() addMsg.value[selectindex.value].StartValue = list.map(e => e.Id).toString()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// 禁用标签 // 禁用标签
let changeLabel = () => { let changeLabel = () => {
let find: any = addMsg.value.find((e) => { let find: any = addMsg.value.find(e => {
return e.Id == '标签' return e.Id == '标签'
}) })
if (find) { if (find) {
filedList.value.map((_e) => { filedList.value.map(_e => {
if (_e.Id == '标签') { if (_e.Id == '标签') {
_e.disable = true _e.disable = true
} }
}) })
} else { } else {
filedList.value.map((_e) => { filedList.value.map(_e => {
if (_e.Id == '标签') { if (_e.Id == '标签') {
_e.disable = false _e.disable = false
} }
}) })
} }
//禁用生日 //禁用生日
let find2: any = addMsg.value.find((e) => { let find2: any = addMsg.value.find(e => {
return e.Id == 17 return e.Id == 17
}) })
console.log('生日2', find2) console.log('生日2', find2)
if (find2) { if (find2) {
filedList.value.map((_e) => { filedList.value.map(_e => {
if (_e.Id == 17) { if (_e.Id == 17) {
_e.disable = true _e.disable = true
} }
}) })
} else { } else {
filedList.value.map((_e) => { filedList.value.map(_e => {
if (_e.Id == 17) { if (_e.Id == 17) {
_e.disable = false _e.disable = false
} }
...@@ -555,47 +485,51 @@ export default defineComponent({ ...@@ -555,47 +485,51 @@ export default defineComponent({
addMsg.value[y].EndValue = '' addMsg.value[y].EndValue = ''
switch (val) { switch (val) {
case "标签": { case '标签': {
addMsg.value[y].IsCustom = 2 addMsg.value[y].IsCustom = 2
break; break
} }
case "客户阶段": { case '客户阶段': {
addMsg.value[y].IsCustom = 3 addMsg.value[y].IsCustom = 3
break; break
} }
default: { default: {
addMsg.value[y].IsCustom = 1 addMsg.value[y].IsCustom = 1
} }
} }
let find: any = filedList.value.find((e) => { let find: any = filedList.value.find(e => {
return e.Id == val return e.Id == val
}) })
if (find) { if (find) {
addMsg.value[y].Name = find.Name addMsg.value[y].Name = find.Name
} }
switch (find.Type) { switch (find.Type) {
case 1: {//单行文本 case 1: {
//单行文本
addMsg.value[y].labelType = 1 addMsg.value[y].labelType = 1
addMsg.value[y].directionList = directionList2 addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2 addMsg.value[y].Type = 2
break; break
} }
case 2: {//多行文本 case 2: {
//多行文本
addMsg.value[y].labelType = 2 addMsg.value[y].labelType = 2
addMsg.value[y].directionList = directionList2 addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2 addMsg.value[y].Type = 2
break; break
} }
case 3: {//多选 case 3: {
//多选
addMsg.value[y].labelType = 3 addMsg.value[y].labelType = 3
addMsg.value[y].directionList = directionList2 addMsg.value[y].directionList = directionList2
addMsg.value[y].Type = 2 addMsg.value[y].Type = 2
if (find.OptionsList) { if (find.OptionsList) {
addMsg.value[y].OptionsList = find.OptionsList addMsg.value[y].OptionsList = find.OptionsList
} }
break; break
} }
case 4: {//多选 case 4: {
//多选
addMsg.value[y].labelType = 4 addMsg.value[y].labelType = 4
addMsg.value[y].StartValue = [] addMsg.value[y].StartValue = []
addMsg.value[y].directionList = directionList1 addMsg.value[y].directionList = directionList1
...@@ -603,39 +537,42 @@ export default defineComponent({ ...@@ -603,39 +537,42 @@ export default defineComponent({
if (find.OptionsList) { if (find.OptionsList) {
addMsg.value[y].OptionsList = find.OptionsList addMsg.value[y].OptionsList = find.OptionsList
} }
break; break
} }
case 5: {//日期 case 5: {
//日期
addMsg.value[y].labelType = 5 addMsg.value[y].labelType = 5
addMsg.value[y].Type = 3 addMsg.value[y].Type = 3
break; break
} }
case 6: {//日期时间范围 case 6: {
//日期时间范围
addMsg.value[y].labelType = 6 addMsg.value[y].labelType = 6
addMsg.value[y].Type = 4 addMsg.value[y].Type = 4
addMsg.value[y].rangeArr = [] addMsg.value[y].rangeArr = null
break; break
} }
case 7: {//数值 case 7: {
//数值
addMsg.value[y].labelType = 7 addMsg.value[y].labelType = 7
addMsg.value[y].directionList = directionList5 addMsg.value[y].directionList = directionList5
addMsg.value[y].Type = 5 addMsg.value[y].Type = 5
break; break
} }
} }
} }
let changeDate = (value, y) => { let changeDate = (value, y) => {
console.log(500, value, y) addMsg.value[y].StartValue = value.toString();
addMsg.value[y].StartValue = value.join('-')
} }
let changeRange = (val, y) => { let changeRange = (val, y) => {
let a = dayjs(val[0]._d).format(format) const newVal=JSON.parse(JSON.stringify(val))
let b = dayjs(val[1]._d).format(format) const s= dayjs(newVal[0]).format(format)
console.log(a, b) const e= dayjs(newVal[1]).format(format)
addMsg.value[y].StartValue = a console.log(570,val,s,e)
addMsg.value[y].EndValue = b addMsg.value[y].StartValue = s
} addMsg.value[y].EndValue = e
const checkRule = (val: Array<params>) => { }
const checkRule = (val: Array < params > ) => {
let flag = false let flag = false
flag = val.every(e => { flag = val.every(e => {
if (e.Type == 1) { if (e.Type == 1) {
...@@ -644,7 +581,6 @@ export default defineComponent({ ...@@ -644,7 +581,6 @@ export default defineComponent({
} else { } else {
return !!e.Id && e.Direction return !!e.Id && e.Direction
} }
} else if (e.Type == 2) { } else if (e.Type == 2) {
if (e.Direction == 1 || e.Direction == 2) { if (e.Direction == 1 || e.Direction == 2) {
return !!e.Id && !!e.StartValue return !!e.Id && !!e.StartValue
...@@ -658,7 +594,6 @@ export default defineComponent({ ...@@ -658,7 +594,6 @@ export default defineComponent({
} else { } else {
return e.Id && e.Direction && e.StartValue return e.Id && e.Direction && e.StartValue
} }
}) })
if (!flag) { if (!flag) {
Notify.create({ Notify.create({
...@@ -669,9 +604,11 @@ export default defineComponent({ ...@@ -669,9 +604,11 @@ export default defineComponent({
} }
return flag return flag
} }
watch(() => [...addMsg.value], (val) => { watch(
() => [...addMsg.value],
val => {
changeLabel() changeLabel()
let newVal: Array<params> = [] let newVal: Array < params > = []
val.map((e: params) => { val.map((e: params) => {
let item: params = JSON.parse(JSON.stringify(e)) let item: params = JSON.parse(JSON.stringify(e))
if (e.OptionsList) { if (e.OptionsList) {
...@@ -680,23 +617,25 @@ export default defineComponent({ ...@@ -680,23 +617,25 @@ export default defineComponent({
if (e.directionList) { if (e.directionList) {
delete item.directionList delete item.directionList
} }
if (item.labelType === 4 && Array.isArray(item.StartValue)) {
item.StartValue = item.StartValue.join(',')
}
delete item.labelType delete item.labelType
newVal.push(item) newVal.push(item)
}) })
console.log('change', newVal) console.log('change', newVal)
ctx.emit('change', newVal) ctx.emit('change', newVal)
}, { deep: true }) }, {
onMounted(() => { //进入页面就调用 deep: true
}
)
onMounted(() => {
//进入页面就调用
setTimeout(() => { setTimeout(() => {
init() init()
}, 2000) }, 2000)
getCustomerFiledList(); //获取客户字段 getCustomerFiledList() //获取客户字段
}) })
return { return {
zhCN,
dateZhCN,
birthday, birthday,
dateOptions, dateOptions,
getCustomerFiledList, getCustomerFiledList,
...@@ -712,37 +651,41 @@ export default defineComponent({ ...@@ -712,37 +651,41 @@ export default defineComponent({
changeName, changeName,
changeDate, changeDate,
changeRange, changeRange,
locale,
changeAddCondition, changeAddCondition,
checkRule checkRule
} }
} }
})
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .ant-cascader-picker { ::v-deep .ant-cascader-picker {
border-radius: 4px; border-radius: 4px;
border-color: rgb(0 0 0 / 24%); border-color: rgb(0 0 0 / 24%);
overflow: hidden; overflow: hidden;
} }
</style> </style>
<style> <style>
/*修改滚动条样式*/ /*修改滚动条样式*/
ul::-webkit-scrollbar { ul::-webkit-scrollbar {
width: 6px; width: 6px;
height: 10px; height: 10px;
/**/ /**/
} }
ul::-webkit-scrollbar-track {
ul::-webkit-scrollbar-track {
background: rgb(239, 239, 239); background: rgb(239, 239, 239);
border-radius: 3px; border-radius: 3px;
} }
ul::-webkit-scrollbar-thumb {
ul::-webkit-scrollbar-thumb {
background: #bfbfbf; background: #bfbfbf;
border-radius: 10px; border-radius: 10px;
} }
ul::-webkit-scrollbar-thumb:hover {
ul::-webkit-scrollbar-thumb:hover {
background: #333; background: #333;
} }
</style> </style>
<template> <template>
<div class="q-mt-md q-pa-md CustomerOperation flex"> <div class="q-mt-md q-pa-md CustomerOperation flex">
<div class="customer-operation-category"> <div class="customer-operation-category">
<div v-for="item in leftList" :key="item.Id" :class="{ active: curItem == item.Id }" <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>
class="customer-operation-category--item" @click="changeActive(item)">{{ item.Name }}</div>
</div> </div>
<div class="customer-operation-content"> <div class="customer-operation-content">
<div v-if="curItem == 1" class="row"> <div v-if="curItem == 1" class="row">
<div class="col-2 content-left">领取公海客户:</div> <div class="collaborator-title">领取公海客户:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.IsPublicAudit" :true-value="1" :false-value="2" /> <q-toggle v-model="data.IsPublicAudit" :true-value="1" :false-value="2" />
...@@ -14,7 +13,7 @@ ...@@ -14,7 +13,7 @@
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.PublicGetDept" false-value="-1" />以下部门允许领取公海客户 <q-toggle v-model="data.PublicGetDept" false-value="-1" />以下部门允许领取公海客户
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" unelevated label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div> </div>
<div> <div>
<div v-for="item in items" :key="item.id">{{ item }}</div> <div v-for="item in items" :key="item.id">{{ item }}</div>
...@@ -23,7 +22,7 @@ ...@@ -23,7 +22,7 @@
</div> </div>
<div v-if="curItem == 2"> <div v-if="curItem == 2">
<div class="row"> <div class="row">
<div class="col-2 content-left">可放弃客户:</div> <div class="collaborator-title">可放弃客户:</div>
<div class="col-10"> <div class="col-10">
<div class="q-gutter-sm"> <div class="q-gutter-sm">
<q-radio v-model="data.AbandonType" :val="1" label="全部客户" /> <q-radio v-model="data.AbandonType" :val="1" label="全部客户" />
...@@ -35,41 +34,47 @@ ...@@ -35,41 +34,47 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-2 content-left">可操作员工:</div> <div class="collaborator-title">可操作员工:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海 <q-toggle v-model="data.AbandonDept" false-value="-1" />以下部门允许将客户放弃到公海
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-2 content-left">放弃后审核:</div> <div class="collaborator-title">放弃后审核:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center"><q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
<q-toggle v-model="data.AbandonAudit" false-value="-1" />开启后,员工放弃客户时需要企微端设置的部门上级审批,审批同意后才可放弃。</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-2 content-left" style="padding-top: 15px">放弃原因:</div> <div class="collaborator-title" style="padding-top: 15px">放弃原因:</div>
<div class="col-10"> <div class="col-10">
<draggable v-model="data.AbandonReasonList" tag="div" item-key="Id"> <draggable v-model="data.AbandonReasonList" tag="div" item-key="Id">
<template #item="{ element }"> <template #item="{ element }">
<div class="flex items-center"> <div class="flex items-center">
<i class="iconfont icon-drag" style="font-size: 20px; color: #777"></i> <i class="iconfont icon-drag" style="font-size: 20px; color: #777"></i>
<div class="AbandonReasonItem flex items-center">{{ element }}</div> <div class="AbandonReasonItem flex items-center">{{ element }}</div>
<n-popover trigger="hover">
<template #trigger>
<q-icon name="warning" />
</template>
<span>编辑</span>
</n-popover>
</div> </div>
</template> </template>
</draggable> </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> </div>
</div> </div>
</div> </div>
<div v-if="curItem == 3" class="row"> <div v-if="curItem == 3" class="row">
<div class="col-2 content-left">申请成为协作人:</div> <div class="collaborator-title">申请成为协作人:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人 <q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div> </div>
<div> <div>
<div v-for="item in items" :key="item.id">{{ item }}</div> <div v-for="item in items" :key="item.id">{{ item }}</div>
...@@ -77,11 +82,11 @@ ...@@ -77,11 +82,11 @@
</div> </div>
</div> </div>
<div v-if="curItem == 4" class="row"> <div v-if="curItem == 4" class="row">
<div class="col-2 content-left">添加协作人:</div> <div class="collaborator-title">添加协作人:</div>
<div class="col-10"> <div class="col-10">
<div class="flex items-center"> <div class="flex items-center">
<q-toggle v-model="data.AddTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人 <q-toggle v-model="data.AddTeamDept" :true-value="1" :false-value="0" />以下部门允许申请成为协作人
<q-btn color="primary" label="修改" size="xs" class="q-ml-lg" @click="checkedPublicGetDept" /> <q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div> </div>
<div> <div>
<div v-for="item in items" :key="item.id">{{ item }}</div> <div v-for="item in items" :key="item.id">{{ item }}</div>
...@@ -91,32 +96,108 @@ ...@@ -91,32 +96,108 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="curItem == 5">
<div class="row">
<div class="collaborator-title">转移客户:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
以下部门允许转移客户
<q-btn color="primary" label="修改" unelevated size="xs" class="q-ml-lg" @click="checkedPublicGetDept" />
</div>
</div>
</div>
<div class="row">
<div class="collaborator-title">转移范围:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
转移客户时允许选择的范围
<q-btn color="primary" label="设置" unelevated size="xs" class="q-ml-lg" />
</div>
</div>
</div>
</div>
<div class="row" v-if="curItem == 6">
<div class="collaborator-title">删除客户跟进记录:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,允许员工删除自己填写的客户跟进记录
</div>
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,仅允许添加跟进记录后
<q-input outlined v-model="data.text" dense type="number" :min="0" style="width: 100px; margin: 0 10px" />
分钟内删除
</div>
</div>
</div>
<div v-if="curItem == 7">
<div class="row">
<div class="collaborator-title">签到拜访限制:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,仅企业客户允许签到拜访
</div>
</div> </div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1" </div>
labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" /> <div class="row">
<div class="collaborator-title">签到拜访拍照:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
开启后,签到拜访时必须拍照
</div>
</div>
</div>
</div>
<div v-if="curItem == 8">
<div class="row">
<div class="collaborator-title" style="min-width: 140px">创建企业时查重方式:</div>
<div class="col-10">
<div class="q-gutter-sm">
<q-radio v-model="data.AbandonType" :val="1" label="模糊查重" />
<q-radio v-model="data.AbandonType" :val="2" label="精准查重 " />
</div>
</div>
</div>
<div class="row">
<div class="collaborator-title" style="min-width: 140px">创建企业客户:</div>
<div class="col-10">
<div class="flex items-center">
<q-toggle v-model="data.ApplyForTeamDept" :true-value="1" :false-value="0" />
仅支持通过工商信息库来创建企业
</div>
</div>
</div>
</div>
<div v-if="curItem == 9">
<div class="row flex justify-end">
<q-btn color="primary" label="添加自定义字段" unelevated />
</div>
</div>
</div>
<departmentStaff v-model="showDptDialog" :defaultArray="defaultDpt" nodeKey="newId" :showType="1" labelKey="DeptName" childrenKey="ChildList" strategy="leaf" :treeData="DptDataTree" @select="getdpt" />
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { import { ref, toRefs, reactive, defineComponent, onMounted } from 'vue'
ref, import customerService from '@/api/customer'
toRefs, // import customerService2 from '@/api/customer2'
reactive, import departmentStaff from '@/components/common/departmentStaff.vue'
defineComponent, import requestGroup from '@/components/customer/request-group.vue'
onMounted import draggable from 'vuedraggable'
} from 'vue' export default defineComponent({
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: { components: {
departmentStaff, departmentStaff,
requestGroup, requestGroup,
draggable draggable
}, },
setup() { setup() {
const leftList = ref([{ const leftList = ref([
{
Id: 1, Id: 1,
Name: '领取公海客户' Name: '领取公海客户'
}, },
...@@ -187,7 +268,7 @@ ...@@ -187,7 +268,7 @@
}) })
}) })
} }
const getChildList = (ChildList: Array < any > ) => { const getChildList = (ChildList: Array<any>) => {
ChildList.forEach(x => { ChildList.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) {
...@@ -221,15 +302,14 @@ ...@@ -221,15 +302,14 @@
setCustomerConfig setCustomerConfig
} }
} }
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.CustomerOperation { .CustomerOperation {
background-color: rgb(243, 246, 249); background-color: rgb(243, 246, 249);
} }
.customer-operation-category { .customer-operation-category {
margin-right: 10px; margin-right: 10px;
width: 200px; width: 200px;
flex: none; flex: none;
...@@ -251,23 +331,17 @@ ...@@ -251,23 +331,17 @@
background-color: #eaf0ff; background-color: #eaf0ff;
color: #3470ff; color: #3470ff;
} }
} }
.customer-operation-content { .customer-operation-content {
background: #fff; background: #fff;
flex: 1; flex: 1;
border-radius: 8px; border-radius: 8px;
padding: 25px; padding: 25px;
overflow: auto; overflow: auto;
} }
.content-left {
line-height: 40px;
font-weight: 600;
white-space: nowrap;
}
.AbandonReasonItem { .AbandonReasonItem {
width: 453px; width: 453px;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
...@@ -276,6 +350,13 @@ ...@@ -276,6 +350,13 @@
border-radius: 5px; border-radius: 5px;
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
margin: 10px; margin: 10px;
} }
.collaborator-title {
min-width: 80px;
line-height: 40px;
text-align: right;
margin-right: 10px;
font-weight: 600;
white-space: nowrap;
}
</style> </style>
...@@ -99,22 +99,10 @@ ...@@ -99,22 +99,10 @@
<q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input> <q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input>
</div> </div>
<div class="col-3"> <div class="col-3">
<!-- <selectTree
:treeData="data.EmployeeList"
:defaultArray="data.defaultArray"
nodeKey="newId"
:multiple="false"
labelKey="DeptName"
childrenKey="ChildList"
tipText="选择部门/人员"
@getChild="getChild"
></selectTree>-->
<n-cascader v-model:value="data.CascaderValue" clearable placeholder="选择部门/人员" check-strategy="all" <n-cascader v-model:value="data.CascaderValue" 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="data.EmployeeList" cascade children-field="ChildList" :options="data.EmployeeList" cascade children-field="ChildList"
@update:value="CascaderUpdateValue" /> @update:value="CascaderUpdateValue" />
<!-- <Cascader :options="data.EmployeeList" optionLabel="DeptName" optionValue="newId" optionChildren="ChildList"
label="选择部门/人员" :multiple="true" /> -->
</div> </div>
<div class="col-3"> <div class="col-3">
<q-btn color="primary" size="sm" label="导入" /> <q-btn color="primary" size="sm" label="导入" />
...@@ -160,14 +148,10 @@ ...@@ -160,14 +148,10 @@
onMounted onMounted
} from 'vue' } from 'vue'
import CustomerModule from '@/module/customer/customerModule' import CustomerModule from '@/module/customer/customerModule'
// import selectTree from '@/components/common/selectTree.vue'
import customRight from '@/components/common/customRight.vue' import customRight from '@/components/common/customRight.vue'
// import Cascader from "@/components/common/Cascader.vue"
export default defineComponent({ export default defineComponent({
components: { components: {
// selectTree,
customRight, customRight,
// Cascader
}, },
setup() { setup() {
let { let {
......
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