Commit 0406a55a authored by 罗超's avatar 罗超

临时提交

parent 77822a16
......@@ -35,7 +35,52 @@ export enum ScaleType {
/**
* @description 是否为默认的字段
*/
export enum ColumnDefaultState{
export enum ColumnDefaultState {
'Yes' = 1,
'No' = 0
}
\ No newline at end of file
}
/**
* @description 线索状态处理
*/
export enum ClueStatus {
/**
* @description 有效线索
*/
'Effective' = 1,
/**
* @description 无效线索
*/
'Invalid' = 2,
/**
* @description 待回访
*/
'Return' = 3,
/**
* @description 直接分配
*/
'Direct' = 4,
/**
* @description 重置无效线索
*/
'Override' = 5
}
/**
* @description 线索分配方式
*/
export enum ClueDistribution {
/**
* @description 手动
*/
Manual = 1,
/**
* @description 自动
*/
Auto = 2
}
......@@ -23,4 +23,9 @@ export default defineComponent({
fill: #ddd !important
.all-borders
border:1px solid #ddd
.svg-icon-darkgrey g [fill]
transition: fill 0.3s ease
fill: #999 !important
.group-select .q-field__control
padding-left: 0px !important
</style>
import Axios from './axios'
import { HttpResponse } from '@/@types'
interface ClueParams {
ClueState:number
ClueState: number
PageIndex: number
PageSize: number
pageCount: number
......@@ -31,6 +31,22 @@ class clueService {
data
})
}
//设置线索状态
static async setCustomerClueState(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/SetCustomerClueState', {
method: 'post',
responseType: 'json',
data
})
}
//设置线索状态
static async getClueRuleStatus(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetClueRuleStatus', {
method: 'post',
responseType: 'json',
data
})
}
}
export { ClueParams }
......
<template>
<div class="row q-mx-md relative-position vt-header-box">
<div class="row q-mx-md relative-position vt-header-box" v-if="!selectColumns || selectColumns.length==0">
<search-box v-model="queryMsg.searchKey" @blur="reloadDataHandler"></search-box>
<q-input class="q-ml-md" outlined dense v-model="queryMsg.formatCreateDateRange" placeholder="创建时间" readonly>
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
......@@ -9,30 +9,24 @@
<vt-custom-btn v-if="allColumn && allColumn.length > 0" ref="vtBtn" :page-code="pageCode" :columns="allColumn" @empty-where="deleteWhereHandler(0)" @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>
</div>
<select-card></select-card>
</template>
<script>
import searchBox from '../common/searchBox.vue'
import { formatDateTime } from '@/utils/tools'
import vtCustomBtn from '../common/customWhere/vtCustomBtn.vue'
import { reactive, computed, ref } from 'vue'
import { reactive, ref, inject } from 'vue'
import { GetLabelObject, GetChannelObject } from '@/utils/customColumn'
import selectCard from './selectCard.vue'
export default {
props: {
/**
* @description 模式:0为未选择表格内容模式,1为选中了表格内容模式
*/
mode: {
type: Number,
default: 0 | 1
},
/**
* @description 列数组
*/
columns: Array
},
components: { searchBox, vtCustomBtn },
components: { searchBox, vtCustomBtn, selectCard },
setup(props, context) {
const allColumn = ref(props.columns)
allColumn.value.splice(0,0,GetLabelObject())
......@@ -58,9 +52,7 @@ export default {
AddCondition: 1
})
const modelType = computed(() => {
return props.mode
})
const selectColumns = inject("selectList")
const updateCreateRange = e => {
if (e.from && e.to) {
......@@ -122,7 +114,7 @@ export default {
pushRelaodHandler()
}
return { queryMsg, modelType, allColumn, updateCreateRange, optionsFn, vtBtn, qDateProxy, pageCode, updateWhereHandler, deleteWhereHandler, reloadDataHandler }
return { queryMsg, selectColumns, allColumn, updateCreateRange, optionsFn, vtBtn, qDateProxy, pageCode, updateWhereHandler, deleteWhereHandler, reloadDataHandler }
}
}
</script>
......
<template>
<q-card v-if="selectList && selectList.length > 0" class="row items-center bg-grey-2 q-px-md" style="height: 40px; border-radius: 4px" flat>
<div class="text-subtitle1 col">已选中 {{ selectList.length }}</div>
<div class="flex items-center">
<q-btn class="q-px-md" color="dark" label="有效线索" dense outline @click="setCuleStatusHandler(ClueStatus.Effective)"></q-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>
<q-btn class="q-ml-md q-px-md" color="dark" dense outline @click="deleteWhereHandler(1)">
<span>直接分配</span>
<svg-icon icon="Code/Question-circle.svg" :size="20" color="svg-icon-darkgrey">
<q-tooltip anchor="bottom middle" max-width="200px" class="bg-white text-dark shadow-3" self="top middle" :offset="[1, 5]">
<div class="f12">
以下原因可能导致分配失败:<br />
① 存在撞单的客户;<br />
② 被分配的员工已有该客户;<br />
③ 员工的私库已达到上限;<br />
④ 客户已存在于公海;<br />
⑤ 员工已经有该手机号的客户;<br />
⑥ 撞单,其它员工已存在该手机号的客户;<br />
⑦ 公海已存在该手机号的客户;<br />
</div>
</q-tooltip>
</svg-icon>
</q-btn>
<q-separator vertical class="q-ml-md"></q-separator>
<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="negative" label="彻底删除" dense outline @click="deleteWhereHandler(1)"></q-btn>
<svg-icon icon="Code/Error-circle.svg" size="20" color="svg-icon-darkgrey q-ml-md cursor-pointer" tips="清除选中" @click="clearSelectListHandler"></svg-icon>
</div>
</q-card>
</template>
<script>
import { inject, ref, reactive, toRefs } from 'vue'
import svgIcon from '../global/svg-icon.vue'
import clueService from '@/api/clue'
import customerSetService from '@/api/customerSet'
import message from '@/utils/message'
import { ClueDistribution, ClueStatus } from '@/@types/enumHelper'
import { useQuasar } from 'quasar'
export default {
components: { svgIcon },
setup() {
const selectList = inject('selectList')
const ruleConfig = ref(null)
const $q = useQuasar()
const data = reactive({
loading: false,
ClueStatus
})
const dataRefs = toRefs(data)
customerSetService.getCustomerClueRuleConfig({}).then(r => {
if (r.data && r.data.Data) {
ruleConfig.value = r.data.Data
}
})
const deleteWhereHandler = () => {
console.log('....')
}
const clearSelectListHandler = () => {
selectList.value = []
}
const setCuleStatusHandler = status => {
if (selectList.value && selectList.value.length > 0) {
let tempIds = ''
selectList.value.forEach(x => (tempIds += `,${x.Id}`))
console.log(status,ClueStatus.Effective,ruleConfig.value.ClueType)
if (status == ClueStatus.Effective) {
convertToEffectiveHandler(tempIds)
}
} else {
message.warnMsg('未选中任何线索')
}
}
const convertToEffectiveHandler = tempIds => {
let data = {
CustomerIds: tempIds,
Type: ClueStatus.Effective,
EmpIds: ''
}
if (ruleConfig.value.ClueType == ClueDistribution.Manual) {
//
} else {
$q.dialog({
title: '删除提示',
html: '是否确认把所选线索认定为“有效线索”?确认后所选线索将会被转为“待分配客户”中。<span style="color:#FF7373">(当前已开启自动分配模式,将直接根据设定的规则分配客户)</span>',
cancel: true,
persistent: true
}).onOk(() => {
dataRefs.value.loading = true
})
}
}
return { selectList, deleteWhereHandler, clearSelectListHandler, setCuleStatusHandler, ...dataRefs }
}
}
</script>
<style></style>
......@@ -14,12 +14,12 @@
<div class="row">
<q-btn dense flat color="primary" @click="editorHandler(x.Id)">
<div class="row items-center">
<svg-icon style="margin-top: 6px" icon="Design/Edit.svg" size="16" color="svg-icon-primary"></svg-icon>
<svg-icon icon="Design/Edit.svg" size="16" color="svg-icon-primary"></svg-icon>
<span class="q-ml-sm">编辑</span>
</div>
</q-btn>
<q-btn dense flat color="negative" class="q-ml-md" @click="deleteHandler(x.Id)">
<svg-icon style="margin-top: 6px" icon="Home/Trash.svg" size="16" color="svg-icon-negative"></svg-icon>
<svg-icon icon="Home/Trash.svg" size="16" color="svg-icon-negative"></svg-icon>
<span class="q-ml-sm">删除</span>
</q-btn>
</div>
......
......@@ -20,7 +20,7 @@
<div class="col" v-else>
<q-inner-loading label="加载中..." class="f12"></q-inner-loading>
</div>
<div class="q-ml-sm" style="margin-bottom: -7px">
<div class="q-ml-sm">
<svg-icon icon="Navigation/Angle-down.svg" color="svg-icon-grey" size="18" v-if="!checkModel.model || checkModel.model.length == 0"></svg-icon>
<svg-icon icon="Code/Error-circle.svg" color="svg-icon-grey" class="cursor-pointer" @click.stop="checkModel.clearLabelHandler" size="18" v-if="checkModel.model && checkModel.model.length > 0"></svg-icon>
</div>
......
<template>
<span>
<span style="margin-bottom:-6px">
<inline-svg :class="[`${color}`]" :src="require(`@/assets/svg/${icon}`)" :width="svgSize" :height="svgSize" :fill="svgColor" :stroke="svgColor" :title="tips" :aria-label="tips"></inline-svg>
<slot></slot>
</span>
</template>
......
......@@ -54,6 +54,8 @@ const ClueModule = () => {
AddCondition: 0 //查询条件
})
const selected=ref([])
const data = reactive({
columns: [
{
......@@ -72,7 +74,6 @@ const ClueModule = () => {
],
showColumns: ['Sys_CustomerName', 'CreateTime'],
allColumns: [{ name: '创建时间', value: 'CreateTime', visible: true, data: {}, IsCustom: 0 }],
selected: [],
dataList: [],
WayList: [],
EmployeeList: [],
......@@ -129,6 +130,6 @@ const ClueModule = () => {
getCluerList()
}
return { useTab, msg, data, getCluerList, TypeList, SeletObj, reloadListHandler }
return { useTab, msg, data, getCluerList, TypeList, SeletObj, reloadListHandler,selected }
}
export default ClueModule
......@@ -7,10 +7,10 @@
<q-tab :name="3" label="无效线索" />
<q-tab :name="4" label="已转客户" />
</q-tabs>
<clue-head :columns="data.allColumns" @reload-data="reloadListHandler" v-if="data.allColumns.length>0"></clue-head>
<clue-head :columns="data.allColumns" @reload-data="reloadListHandler" v-if="data.allColumns.length > 0"></clue-head>
<div class="page-content q-mt-lg col full-width">
<q-table :rows="data.dataList" :loading="data.dataLoding" :columns="data.columns" :visible-columns="data.showColumns" flat class="sticky-tow-column-table full-height sticky-right-column-table" row-key="Id" no-data-label="暂无相关数据" selection="multiple" v-if="data.colLoadingFinish" separator="none" style="max-width: 100%">
<q-table :rows="data.dataList" :loading="data.dataLoding" v-model:selected="selected" :columns="data.columns" :visible-columns="data.showColumns" flat class="sticky-tow-column-table full-height sticky-right-column-table" row-key="Id" no-data-label="暂无相关数据" selection="multiple" v-if="data.colLoadingFinish" separator="none" style="max-width: 100%">
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount" :input="true" />
</template>
......@@ -41,11 +41,11 @@
</template>
<template v-slot:header-cell-sys_setting="props">
<q-th class="mysetting" :props="props">
<i class="iconfont icon-tiaojieqi cursor-pointer" style="font-size: 20px">
<svg-icon icon="Layout/Layout-4-blocks.svg" class="cursor-pointer" size="20" color="svg-icon-primary" tips="自定义列">
<q-popup-proxy>
<visible-columns v-model="data.showColumns" :allCol="data.allColumns"></visible-columns>
</q-popup-proxy>
</i>
</svg-icon>
</q-th>
</template>
</q-table>
......@@ -54,28 +54,30 @@
</div>
</template>
<script lang="ts">
import { toRefs, defineComponent, onMounted } from 'vue'
import { toRefs, defineComponent, onMounted, provide } from 'vue'
import ClueModule from '@/module/customer/clueModule'
import visibleColumns from '@/components/common/visibleColumns.vue'
import ClueHead from '@/components/customer/clueHead.vue'
import ClueHead from '@/components/clue/clueHead.vue'
import useMetaModule from '@/module/meta/metaModule'
let { setTitle } = useMetaModule()
setTitle('线索管理')
export default defineComponent({
components: { visibleColumns, ClueHead },
setup() {
let { useTab, getCluerList, msg, data, SeletObj,reloadListHandler } = ClueModule()
let { useTab, getCluerList, msg, data,selected, SeletObj, reloadListHandler } = ClueModule()
let [tab] = useTab()
onMounted(() => {
getCluerList()
})
provide('selectList', selected)
return {
tab,
msg,
getCluerList,
data,
selected,
reloadListHandler,
...toRefs(SeletObj)
}
......
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