no message

This commit is contained in:
小陌 2023-07-10 15:54:42 +08:00
parent 1bc6608634
commit 3bc05b0317
8 changed files with 309 additions and 749 deletions

View File

@ -1,11 +1,11 @@
<template>
<div
:class="{'is-select':select}"
class="xr-menu-item">
class="x-menu-item">
<i
:style="{backgroundColor: select ? iconColor || '#2362FB' : '#edf2f6'}"
:class="['xr-menu-item__icon', iconClass]" />
<span class="xr-menu-item__label">{{ label }}</span>
:class="['x-menu-item__icon', iconClass]" />
<span class="x-menu-item__label">{{ label }}</span>
<el-badge
v-if="num > 0"
:max="99"
@ -16,7 +16,7 @@
<script>
export default {
//
name: 'XrMenuItem',
name: 'XMenuItem',
components: {},
props: {
iconClass: String,
@ -38,7 +38,7 @@ export default {
</script>
<style lang="scss" scoped>
.xr-menu-item {
.x-menu-item {
padding: 12px 20px;
position: relative;
cursor: pointer;
@ -47,7 +47,7 @@ export default {
display: inline-block;
font-size: 12px;
padding: 6px;
/* border-radius: $xr-border-radius-base;*/
border-radius: 4px;
background-color: #edf2f6;
color: #8a94a6;;
}
@ -59,19 +59,19 @@ export default {
}
&.is-select {
.xr-menu-item__icon {
/* background-color: $xr-color-primary;*/
.x-menu-item__icon {
/* background-color: $x-color-primary;*/
color: white;
}
}
}
.xr-menu-item.is-select,
.xr-menu-item:hover {
.x-menu-item.is-select,
.x-menu-item:hover {
background-color: #f6f8fa;
}
.xr-menu-item::before {
.x-menu-item::before {
content: ' ';
position: absolute;
left: 0;
@ -82,7 +82,7 @@ background-color: #f6f8fa;
opacity: 0;
}
.xr-menu-item.is-select::before {
.x-menu-item.is-select::before {
opacity: 1;
}

View File

@ -1,24 +1,24 @@
<template>
<div>
<xr-menu-item
<x-menu-item
v-for="(item, index) in list"
:key="index"
:label="item.label"
:name="item.name"
:icon-color="item.iconColor"
:icon-class="item.iconClass"
@click.native="menuClick(index)"/>
@click="menuClick(index)"/>
</div>
</template>
<script>
import XrMenuItem from './XrMenuItem'
import XMenuItem from './XMenuItem'
export default {
//
name: 'XrMenu',
name: 'XMenu',
components: {
XrMenuItem
XMenuItem
},
props: {
value: {

View File

@ -114,7 +114,11 @@
async getMenu(){
this.menuLoading = true
// var res = await config.menuApiObj.get()
// this.menu = res.data
var res = {
data:[]
}
this.menu = res.data
this.menuLoading = false
},
//

View File

@ -64,6 +64,9 @@
scEcharts,
scFilterBar
},
props: {
name: { type: String, default: "" },
},
data() {
return {
dialog: {
@ -90,13 +93,19 @@
],
statList:[],
chartoption: {},
tablename: this.$route.meta.tablename,
groupFilterText:''
}
},
mounted() {
if (this.name) {
this.tablename = this.name || this.$route.meta.tablename;
}
//
if(this.$route.meta.tablename) {
this.$api.system.table.get(this.$route.meta.tablename, { cache: this.$route.meta.tablecache || 0 }).then((res) => {
if(this.tablename) {
this.$api.system.table.get(this.tablename, { cache: this.$route.meta.tablecache || 0 }).then((res) => {
if (res.code == 200) {
Object.assign(this.$data, res.data);
}

View File

@ -1,12 +1,20 @@
<template>
<el-container>
<el-aside width="200px" v-loading="showGrouploading">
<el-aside width="180px" v-loading="showGrouploading">
<el-container>
<el-header>
<el-input placeholder="输入关键字进行过滤" v-model="groupFilterText" clearable></el-input>
</el-header>
<el-main class="nopadding">
<el-tree ref="group" class="menu" node-key="id" :data="group" :current-node-key="''" :highlight-current="true" :expand-on-click-node="false" :filter-node-method="groupFilterNode" @node-click="groupClick"></el-tree>
<x-menu-item
v-for="(item, index) in leftSides"
:key="index"
:label="item.name"
:num="item.num"
:icon-class="item.iconClass"
:icon-color="item.color"
:select="leftType==item.infoType"
@click="sideClick(item)"/>
</el-main>
</el-container>
</el-aside>
@ -60,10 +68,12 @@
<script>
import saveDialog from './save'
import XMenuItem from '@/components/XMenu/XMenuItem'
export default {
name: 'user',
components: {
XMenuItem,
saveDialog
},
data() {
@ -75,6 +85,104 @@
groupFilterText: '',
group: [],
selection: [],
leftSides: [
{
name: '今日需联系线索',
color: '#2362FB',
iconClass: 'wk wk-leads',
infoType: 'todayLeads',
num: 10,
hidden: false
},
{
name: '今日需联系客户',
color: '#2362FB',
iconClass: 'wk wk-customer',
infoType: 'todayCustomer',
num: 0,
hidden: false
},
{
name: '今日需联系商机',
color: '#2362FB',
iconClass: 'wk wk-business',
infoType: 'todayBusiness',
num: 0,
hidden: false
},
{
name: '分配给我的线索',
color: '#704AFD',
iconClass: 'wk wk-leads',
infoType: 'followLeads',
num: 0,
hidden: false
},
{
name: '分配给我的客户',
color: '#19B5F6',
iconClass: 'wk wk-s-seas',
infoType: 'followCustomer',
num: 0,
hidden: false
},
{
name: '待进入公海的客户',
color: '#26D4DA',
iconClass: 'wk wk-seas',
infoType: 'putInPoolRemind',
num: 0,
hidden: false
},
{
name: '待审核合同',
color: '#FD5B4A',
iconClass: 'wk wk-contract',
infoType: 'checkContract',
num: 0,
hidden: false
},
{
name: '待审核回款',
color: '#FFB940',
iconClass: 'wk wk-receivables',
infoType: 'checkReceivables',
num: 0,
hidden: false
},
{
name: '待回款提醒',
color: '#27BA4A',
iconClass: 'wk wk-bell',
infoType: 'remindReceivablesPlan',
num: 0,
hidden: false
},
{
name: '即将到期的合同',
color: '#FF7A38',
iconClass: 'wk wk-contract',
infoType: 'endContract',
num: 0,
hidden: false
},
{
name: '待回访合同',
color: '#ff9232',
iconClass: 'wk wk-house',
infoType: 'returnVisitRemind',
num: 0,
hidden: false
},
{
name: '待审核发票',
color: '#ff9232',
iconClass: 'wk wk-invoice',
infoType: 'checkInvoice',
num: 0,
hidden: false
}
],
search: {
name: null
}

View File

@ -1,663 +0,0 @@
<template>
<div class="ec-container">
<div class="title">
<i
:class="['title-icon', iconData.iconClass]"
:style="{ backgroundColor: iconData.color }" />{{ infoTitle }}
<el-tooltip
v-if="infoTips"
:content="infoTips"
effect="dark"
placement="top">
<i class="wk wk-help wk-help-tips"/>
</el-tooltip>
</div>
<div class="option-bar">
<div v-if="selectionList.length == 0">
<el-select
v-if="showOptions"
v-model="optionsType"
@change="refreshList">
<el-option
v-for="item in options"
:key="item.value"
:label="item.name"
:value="item.value"/>
</el-select>
<el-select
v-if="showSubType"
v-model="isSubType"
:style="{'margin-left': showOptions ? '10px' : 0}"
style="width: 120px;"
@change="refreshList">
<el-option
v-for="item in [{name: '我的', value: 1}, {name: '我下属的', value: 2}]"
:key="item.value"
:label="item.name"
:value="item.value"/>
</el-select>
<el-button
v-if="showFilterView"
style="margin-left: 10px;"
type="primary"
class="filter-button el-button--margin "
icon="wk wk-screening"
@click="getFilterFieldInfo">高级筛选</el-button>
<filter-form
:field-list="filterFieldList"
:dialog-visible.sync="showFilter"
:obj="filterObj"
:crm-type="crmType"
:save-scene="false"
@filter="handleFilter"/>
<el-button
:disabled="!canMark"
class="el-button--margin "
icon="wk wk-tag"
style="margin-left: 10px;"
type="primary" plain @click="allMarkReadClick">全部标记已处理</el-button>
</div>
<flexbox
v-else
class="selection-bar">
<div class="selected—title">已选中<span class="selected—count">{{ selectionList.length }}</span></div>
<flexbox class="selection-items-box">
<el-button
v-for="(item, index) in selectionButtonList"
:icon="item.icon"
:key="index"
type="primary"
@click.native="selectionBarClick(item.type)">{{ item.name }}</el-button>
</flexbox>
</flexbox>
</div>
<filter-content
v-if="filterObj.form && filterObj.form.length > 0"
:obj="filterObj"
@delete="handleDeleteField"/>
<el-table
v-loading="loading"
id="crm-table"
:data="list"
:height="tableHeight"
:cell-class-name="cellClassName"
class="n-table--border"
stripe
border
highlight-current-row
style="width: 100%"
@row-click="handleRowClick"
@selection-change="handleSelectionChange">
<el-table-column
:selectable="selectionDisabled"
show-overflow-tooltip
type="selection"
align="center"
width="55"/>
<el-table-column
v-for="(item, index) in fieldList"
:key="index"
:prop="item.prop"
:label="item.label"
:width="item.width"
show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="item.prop == 'deal_status'">
<i :class="scope.row[item.prop] | dealIcon"/>
<span>{{ scope.row[item.prop] | dealName }}</span>
</template>
<template v-else-if="item.prop == 'is_lock' && crmType === 'customer'">
<i
v-if="scope.row.is_lock == 1"
class="wk wk-circle-password customer-lock"/>
</template>
<template v-else-if="item.prop == 'check_status'">
<span :style="getStatusStyle(scope.row.check_status)" class="status-mark"/>
<span>{{ getCRMStatusName(scope.row.check_status) }}</span>
</template>
<template v-else-if="item.prop == 'invoice_type'">
{{ fieldFormatter(scope.row, scope.column, scope.row[scope.column.property], item) }}
</template>
<wk-field-view
v-else
:props="item"
:form_type="item.form_type"
:value="scope.row[scope.column.property]"
>
<template slot-scope="{ data }">
{{ fieldFormatter(scope.row, scope.column, scope.row[scope.column.property], item) }}
</template>
</wk-field-view>
<!-- <template v-else>
{{ fieldFormatter(scope.row, scope.column) }}
</template> -->
</template>
</el-table-column>
<el-table-column :resizable="false"/>
</el-table>
<div class="p-contianer">
<el-pagination
:current-page="currentPage"
:page-sizes="pageSizes"
:page-size.sync="pageSize"
:total="total"
class="p-bar"
background
layout="prev, pager, next, sizes, total, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</div>
</template>
<script>
// import crmTypeModel from '@/views/crm/model/crmTypeModel'
// import { filterIndexfieldsAPI } from '@/api/crm/common'
// import { crmLeadsSetFollowAPI } from '@/api/crm/leads'
// import { crmCustomerSetFollowAPI } from '@/api/crm/customer'
// import {
// crmMessagAllDealAPI,
// crmMessagzealByIdAPI
// } from '@/api/crm/message'
// import MessageTableMixin from '../mixins/MessageTable'
// import FilterForm from '@/views/crm/components/FilterForm'
// import FilterContent from '@/views/crm/components/FilterForm/FilterContent'
// import WkFieldView from '@/components/NewCom/WkForm/WkFieldView'
// import { invoiceFilterFields } from '../../invoice/js/fields'
export default {
/** 客户管理 的待审核系统 */
name: 'CRMMessage',
components: {
// FilterForm,
// FilterContent,
// CRMAllDetail,
// WkFieldView
},
filters: {
dealIcon(statu) {
return statu == '已成交' ? 'wk wk-success deal-suc' : 'wk wk-close deal-un'
},
dealName(statu) {
return statu == '已成交' ? '已成交' : '未成交'
}
},
// mixins: [MessageTableMixin],
props: {
// crm
crmType: {
type: String,
default: ''
},
// crm
infoType: {
type: String,
default: ''
},
infoTitle: {
type: String,
default: ''
},
infoTips: {
type: String,
default: ''
},
//
iconData: Object,
//
show: Boolean,
//
model: Number
},
data() {
return {
optionsType: 0,
isSubType: 1, //
/** 高级筛选 */
showFilter: false, //
filterFieldList: [],
filterObj: { form: [] }, //
/** 勾选数据操作 */
selectionList: [], //
/** 控制详情展示 */
rowID: '', //
rowType: '', //
showDview: false
}
},
computed: {
//
showFollow() {
if (this.infoType == 'followLeads' || this.infoType == 'followCustomer') {
return true
}
return false
},
//
selectionButtonList() {
const temps = this.showFollow ? [{
name: '已跟进',
type: 'follow',
icon: 'wk wk-edit'
}] : []
temps.push({
name: '标记已处理',
type: 'mark-deal',
icon: 'wk wk-tag'
})
return temps
},
//
showFilterView() {
if (this.crmType == 'receivables_plan') {
return false
}
return true
},
//
showCheckStatus() {
if (this.crmType == 'contract' || this.crmType == 'receivables') {
return true
}
return false
},
//
showPoolDay() {
if (this.crmType == 'customer') {
return true
}
return false
},
// /
showSubType() {
if (
this.infoType == 'todayCustomer' ||
this.infoType == 'todayBusiness' ||
this.infoType == 'todayLeads' ||
this.infoType == 'putInPoolRemind' ||
this.infoType == 'returnVisitRemind'
) {
return true
}
return false
},
//
options() {
if (this.infoType == 'todayCustomer' ||
this.infoType == 'todayBusiness' ||
this.infoType == 'todayLeads') {
return [
{ name: '今日需联系', value: 1 },
{ name: '已逾期', value: 2 },
{ name: '已联系', value: 3 }
]
} else if (
this.infoType == 'followLeads' ||
this.infoType == 'followCustomer'
) {
return [{ name: '待跟进', value: 1 }, { name: '已跟进', value: 2 }]
} else if (
this.infoType == 'checkContract' ||
this.infoType == 'checkReceivables' ||
this.infoType == 'checkInvoice'
) {
return [{ name: '待审核', value: 1 }, { name: '已审核', value: 2 }]
} else if (this.infoType == 'remindReceivablesPlan') {
return [
{ name: '待回款', value: 1 },
{ name: '已回款', value: 2 },
{ name: '已逾期', value: 3 }
]
} else if (this.infoType == 'endContract') {
return [{ name: '即将到期', value: 1 }, { name: '已到期', value: 2 }]
}
return []
},
/**
* 能标记
*/
canMark() {
if (this.options.length) {
if (this.showSubType && this.showOptions) {
return this.optionsType == 1 && this.isSubType == 1
}
if (this.showSubType) {
return this.isSubType == 1
}
if (this.showOptions) {
return this.optionsType == 1
}
return false
}
return true
}
},
watch: {
show() {
if (this.showOptions && this.options.length > 0) {
this.optionsType = this.options[0].value
}
this.initTableHead()
}
},
mounted() {
if (this.showOptions && this.options.length > 0) {
this.optionsType = this.options[0].value
}
this.initTableHead()
},
methods: {
/**
* 初始化表头数据
*/
initTableHead() {
if (this.show) {
this.currentPage = 1
if (this.fieldList.length == 0) {
this.getFieldList()
} else {
this.getList(false)
this.$store.dispatch('GetMessageNum')
}
}
},
/**
* 刷新列表
*/
refreshList() {
this.currentPage = 1
if (this.fieldList.length > 0) {
this.getList()
} else {
this.getFieldList()
}
},
/**
* 勾选数据
*/
handleSelectionChange(val) {
this.selectionList = val //
},
/**
* 勾选后的操作
*/
selectionBarClick(type) {
if (type == 'follow') {
this.$confirm('您确定此操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const request = {
followLeads: crmLeadsSetFollowAPI,
followCustomer: crmCustomerSetFollowAPI
}[this.infoType]
request({
type: 'crm_' + this.crmType,
type_id: this.selectionList
.map(item => item[this.crmType + '_id'])
}).then(res => {
this.$message.success('操作成功')
this.$parent.requestNumCount()
this.$emit('on-handle', {
type: 'follow',
value: this.selectionList.length,
infoType: this.infoType
})
})
.catch(() => {})
})
.catch(() => {})
} else if (type == 'mark-deal') {
const params = { type: this.infoType }
params.type_id = this.selectionList
.map(item => {
let temp = []
const fieldKey = this.crmType === 'receivables_plan' ? 'plan_id' : `${this.crmType}_id`
// temp.typeId = item[fieldKey]
temp = item[fieldKey]
// id
// if (this.infoType == 'putInPoolRemind') {
// temp.poolIds = item.poolIds
// }
return temp
})
crmMessagzealByIdAPI(params).then(res => {
this.$message.success('操作成功')
this.getList()
this.$parent.requestNumCount()
}).catch(() => {})
}
},
/**
* 获取高级筛选字段数据后展示
*/
getFilterFieldInfo() {
if (this.crmType == 'invoice') {
this.filterFieldList = invoiceFilterFields
this.showFilter = true
} else {
filterIndexfieldsAPI({
// types: crmTypeModel[this.crmType]
})
.then(res => {
this.filterFieldList = res.data || []
this.showFilter = true
})
.catch(() => {})
}
},
/**
* 选择筛选字段
*/
handleFilter(form) {
this.filterObj = form
this.showFilter = false
this.updateTableHeight()
this.refreshList()
},
/**
* 删除筛选字段
*/
handleDeleteField(data) {
this.filterObj = data.obj
this.updateTableHeight()
this.refreshList()
},
/**
* 通过回调控制class
*/
cellClassName({ row, column, rowIndex, columnIndex }) {
if (
(column.property === 'name' && this.crmType != 'contract') ||
column.property === 'number' ||
column.property === 'leads_name' ||
column.property === 'customer_name' ||
column.property === 'business_name' ||
column.property === 'contacts_name' ||
(column.property === 'num' && this.crmType != 'receivables_plan') ||
column.property === 'visitNumber' ||
column.property === 'invoice_apple_number' ||
column.property === 'contract_name'
) {
return 'can-visit--underline'
} else {
return ''
}
},
/**
* 全部标记为已读
*/
allMarkReadClick() {
crmMessagAllDealAPI({
// model: this.model,
isSub: this.isSubType == 1 ? 0 : 2,
type: this.infoType
}).then(res => {
this.$message.success('操作成功')
this.$parent.requestNumCount()
this.getList()
}).catch(() => {})
},
/**
* 不能进行勾选操作
*/
selectionDisabled() {
return this.canMark
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/*@import '../../styles/table.scss';*/
/** 场景和筛选 */
.filtrate-button {
cursor: pointer;
margin-left: 10px;
display: inline-block;
&-img {
vertical-align: middle;
margin: 0 5px;
width: 12px;
}
}
.filtrate-button:hover {
/* color: $xr-color-primary;*/
}
.ec-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.title {
padding: 10px 20px;
font-size: 14px;
color: #333;
.title-icon {
display: inline-block;
font-size: 12px;
padding: 6px;
/* border-radius: $xr-border-radius-base;*/
color: white;
margin-right: 10px;
}
.wk-help {
margin-left: 5px;
}
}
.option-bar {
padding: 15px 20px;
}
/** 勾选操作 */
.selection-bar {
font-size: 12px;
height: 35px;
color: #777;
.selectedtitle {
flex-shrink: 0;
padding-right: 20px;
color: #333;
.selectedcount {
/* color: $xr-color-primary;*/
}
}
}
.selection-items-box {
overflow-x: auto;
overflow-y: hidden;
padding: 0 15px;
.el-button {
color: #666;
/* background-color: $xr--background-color-base;*/
/* border-color: $xr--background-color-base;*/
font-size: 12px;
height: 28px;
border-radius: 14px;
i {
font-size: 12px;
margin-right: 5px;
}
}
.el-button--primary:hover {
/* background: $xr-color-primary;*/
/* border-color: $xr-color-primary;*/
color: #ffffff;
}
.el-button + .el-button {
margin-left: 15px;
}
}
.n-table--border {
/* border-top: 1px solid $xr-border-line-color;*/
}
.el-button--primary.is-plain {
background-color: white;
}
.el-button--primary.is-plain:focus,
.el-button--primary.is-plain:active,
.el-button--primary.is-plain:hover {
/* color: $xr-color-primary;*/
}
//
.el-button--margin {
i {
margin-right: 5px;
}
}
</style>

View File

@ -0,0 +1,153 @@
<template>
<div class="ec-container">
<!-- <div class="title">
<i :class="['title-icon', info.iconClass]" :style="{ backgroundColor: info.color }" />{{ info.name }}
<el-tooltip v-if="info.tips" :content="info.tips" effect="dark" placement="top"> <i class="wk wk-help wk-help-tips"/> </el-tooltip>
</div> -->
<xTable name="url"></xTable>
</div>
</template>
<script>
import xTable from '@/views/system/table'
export default {
name: 'Message',
props: {
info: { type: Object, default: () => {} }
},
components: {
xTable,
},
data() {
return {
selectionList: [], //
}
},
computed: {
},
watch: {
},
mounted() {
},
methods: {
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.filtrate-button {
cursor: pointer;
margin-left: 10px;
display: inline-block;
&-img {
vertical-align: middle;
margin: 0 5px;
width: 12px;
}
}
.filtrate-button:hover {
/* color: $xr-color-primary;*/
}
.ec-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.title {
padding: 10px 20px;
font-size: 14px;
color: #333;
.title-icon {
display: inline-block;
font-size: 12px;
padding: 6px;
/* border-radius: $xr-border-radius-base;*/
color: white;
margin-right: 10px;
}
.wk-help {
margin-left: 5px;
}
}
.option-bar {
padding: 15px 20px;
}
/** 勾选操作 */
.selection-bar {
font-size: 12px;
height: 35px;
color: #777;
.selectedtitle {
flex-shrink: 0;
padding-right: 20px;
color: #333;
.selectedcount {
/* color: $xr-color-primary;*/
}
}
}
.selection-items-box {
overflow-x: auto;
overflow-y: hidden;
padding: 0 15px;
.el-button {
color: #666;
/* background-color: $xr--background-color-base;*/
/* border-color: $xr--background-color-base;*/
font-size: 12px;
height: 28px;
border-radius: 14px;
i {
font-size: 12px;
margin-right: 5px;
}
}
.el-button--primary:hover {
/* background: $xr-color-primary;*/
/* border-color: $xr-color-primary;*/
color: #ffffff;
}
.el-button + .el-button {
margin-left: 15px;
}
}
.n-table--border {
/* border-top: 1px solid $xr-border-line-color;*/
}
.el-button--primary.is-plain {
background-color: white;
}
.el-button--primary.is-plain:focus,
.el-button--primary.is-plain:active,
.el-button--primary.is-plain:hover {
/* color: $xr-color-primary;*/
}
//
.el-button--margin {
i {
margin-right: 5px;
}
}
</style>

View File

@ -9,7 +9,7 @@
v-loading="loading"
class="message-content">
<div class="message-body-side">
<xr-menu-item
<x-menu-item
v-for="(item, index) in showLeftSides"
:key="index"
:label="item.name"
@ -20,18 +20,7 @@
@click="sideClick(item)"/>
</div>
<div class="message-body-content">
<!-- <c-r-m-message
v-for="(item, index) in showLeftSides"
v-show="leftType==item.infoType"
:key="index"
:crm-type="item.crmType"
:info-type="item.infoType"
:info-title="item.name"
:info-tips="item.tips"
:model="item.model"
:show="leftType==item.infoType"
:icon-data="item"
@on-handle="messageHandle"/> -->
<xTable name="OfferCollege"></xTable>
</div>
</div>
</div>
@ -39,158 +28,119 @@
</template>
<script>
// import CRMMessage from './compenents/CRMMessage' //
// import { mapGetters } from 'vuex'
// import { objDeepCopy } from '@/utils'
import XrMenuItem from '@/components/XrMenu/XrMenuItem'
import XMenuItem from '@/components/XMenu/XMenuItem'
import xTable from '@/views/system/table'
export default {
/** 客户管理 的 消息列表 */
name: 'Message',
name: 'trajectory',
components: {
// CRMMessage,
XrMenuItem,
xTable,
XMenuItem,
},
data() {
return {
loading: false,
leftType: '',
/**
* model 1今日需联系客户 2分配给我的线索 3分配给我的客户 4待进入公海的客户 5待审核合同 6待审核回款 7待回款提醒 8即将到期的合同 9待回访合同 10待审核发票
*/
info: {},
leftSides: [
{
name: '今日需联系线索',
crmType: 'leads',
color: '#2362FB',
iconClass: 'wk wk-leads',
infoType: 'todayLeads',
model: 11,
num: 0,
tips: '下次跟进时间为今日的线索',
num: 10,
hidden: false
},
{
name: '今日需联系客户',
crmType: 'customer',
color: '#2362FB',
iconClass: 'wk wk-customer',
infoType: 'todayCustomer',
model: 1,
num: 0,
tips: '下次跟进时间为今日的客户',
hidden: false
},
{
name: '今日需联系商机',
crmType: 'business',
color: '#2362FB',
iconClass: 'wk wk-business',
infoType: 'todayBusiness',
model: 12,
num: 0,
tips: '下次跟进时间为今日的商机',
hidden: false
},
{
name: '分配给我的线索',
crmType: 'leads',
color: '#704AFD',
iconClass: 'wk wk-leads',
infoType: 'followLeads',
model: 2,
num: 0,
tips: '转移之后未跟进的线索',
hidden: false
},
{
name: '分配给我的客户',
crmType: 'customer',
color: '#19B5F6',
iconClass: 'wk wk-s-seas',
infoType: 'followCustomer',
model: 3,
num: 0,
tips: '转移、领取、分配之后未跟进的客户,默认显示自己负责的客户',
hidden: false
},
{
name: '待进入公海的客户',
crmType: 'customer',
color: '#26D4DA',
iconClass: 'wk wk-seas',
infoType: 'putInPoolRemind',
model: 4,
num: 0,
tips: '',
hidden: false
},
{
name: '待审核合同',
crmType: 'contract',
color: '#FD5B4A',
iconClass: 'wk wk-contract',
infoType: 'checkContract',
model: 5,
num: 0,
tips: '',
hidden: false
},
{
name: '待审核回款',
crmType: 'receivables',
color: '#FFB940',
iconClass: 'wk wk-receivables',
infoType: 'checkReceivables',
model: 6,
num: 0,
tips: '',
hidden: false
},
{
name: '待回款提醒',
crmType: 'receivables_plan',
color: '#27BA4A',
iconClass: 'wk wk-bell',
infoType: 'remindReceivablesPlan',
model: 7,
num: 0,
tips: '',
hidden: false
},
{
name: '即将到期的合同',
crmType: 'contract',
color: '#FF7A38',
iconClass: 'wk wk-contract',
infoType: 'endContract',
model: 8,
num: 0,
tips: '根据“合同到期时间”及设置的“提前提醒天数”提醒',
hidden: false
},
{
name: '待回访合同',
crmType: 'contract',
color: '#ff9232',
iconClass: 'wk wk-house',
infoType: 'returnVisitRemind',
model: 9,
num: 0,
tips: '',
hidden: false
},
{
name: '待审核发票',
crmType: 'invoice',
color: '#ff9232',
iconClass: 'wk wk-invoice',
infoType: 'checkInvoice',
model: 10,
num: 0,
tips: '',
hidden: false
}
]
@ -198,8 +148,6 @@ export default {
},
computed: {
// ...mapGetters(['messageNum']),
showLeftSides() {
return this.leftSides.filter(item => {
return !item.hidden
@ -238,6 +186,8 @@ export default {
// .catch(() => {
// this.loading = false
// })
this.refreshNum()
},
/**
@ -264,8 +214,6 @@ export default {
*/
messageHandle(data) {
if (data.type == 'follow') {
// const copyNum = objDeepCopy(this.messageNum)
const copyNum={}
const num = parseInt(copyNum[data.infoType]) - data.value
copyNum[data.infoType] = num > 0 ? num : 0
@ -277,6 +225,7 @@ export default {
* 侧边点击
*/
sideClick(item) {
this.info = item
this.leftType = item.infoType
}
}