Commit 7836c081 by 前端

Merge branch 'wuwx_dev_v2.8.0' into 'v2.8.0'

Wuwx dev v2.8.0

See merge request !302
2 parents ae2c20b2 505e782b
...@@ -378,6 +378,28 @@ const getMaterialListApi = params => { ...@@ -378,6 +378,28 @@ const getMaterialListApi = params => {
sign: true sign: true
}) })
} }
// 更新客户群发客户列表
const renewDetailList = params => {
params.method = `${path}update.merchant`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 客户群发统计
const renewStatistic = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { export default {
customerList, customerList,
...@@ -416,5 +438,7 @@ export default { ...@@ -416,5 +438,7 @@ export default {
queryCrowdtree, queryCrowdtree,
followerEcho, followerEcho,
getGroupListApi, getGroupListApi,
getMaterialListApi getMaterialListApi,
renewDetailList,
renewStatistic
} }
...@@ -121,7 +121,14 @@ ...@@ -121,7 +121,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="title">数据统计</div> <div class="data">
<div class="titles">数据统计</div>
<div style="cursor:pointer;" @click="refreshData">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div>
<div class="statistics-info"> <div class="statistics-info">
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
...@@ -201,7 +208,9 @@ export default { ...@@ -201,7 +208,9 @@ export default {
condition: {} condition: {}
}, },
statistic: {}, statistic: {},
limitUserList: [] limitUserList: [],
time: '',
timeId: Function
} }
}, },
watch: { watch: {
...@@ -216,6 +225,7 @@ export default { ...@@ -216,6 +225,7 @@ export default {
mounted() { mounted() {
this.getCustomerDetail(this.id) this.getCustomerDetail(this.id)
this.getStatistic() this.getStatistic()
this.refreshData()
// console.log(this.basicInfo.condition, '----') // console.log(this.basicInfo.condition, '----')
}, },
computed: { computed: {
...@@ -242,6 +252,20 @@ export default { ...@@ -242,6 +252,20 @@ export default {
this.eventBus.$emit('update', previewList) this.eventBus.$emit('update', previewList)
}) })
}, },
refreshData() {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
const { id } = this
this.$apis.customerTransform.renewStatistic({ id }).then(res => {
if (res.code == 0) {
this.getStatistic()
this.time = res.data.createdTime
this.$emit('getStaffList')
this.$emit('getCustomerList')
}
})
}, 1500)
},
getStatistic() { getStatistic() {
const { id, form } = this const { id, form } = this
if (form == 'customer') { if (form == 'customer') {
...@@ -418,4 +442,18 @@ export default { ...@@ -418,4 +442,18 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.titles {
font-size: 16px;
font-weight: 600;
color: #333;
margin-right: 10px;
}
.data {
padding: 20px 0 17px 20px;
border-bottom: 1px solid #d8d8d8;
display: flex;
align-items: center;
font-size: 14px;
color: #5850FF
}
</style> </style>
<template> <template>
<div> <div>
<BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'"></BasicInof> <BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'" @getStaffList="getStaffList" @getCustomerList="getCustomerList"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">员工详情</div> <div class="title">员工详情</div>
......
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton> <GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton>
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div> <div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<div class="renew">
<div style="cursor:pointer;" @click="refreshData('1')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable :key="key" ref="customer" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf"> <GLTable :key="key" ref="customer" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf">
...@@ -46,6 +53,13 @@ ...@@ -46,6 +53,13 @@
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton> <GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton>
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div> <div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<div class="renews">
<div style="cursor:pointer;" @click="refreshData('2')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="times">更新于 {{times}}</span>
</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable :key="groupKey" ref="customerGroup" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf"> <GLTable :key="groupKey" ref="customerGroup" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf">
...@@ -82,6 +96,9 @@ export default { ...@@ -82,6 +96,9 @@ export default {
5: '链接' 5: '链接'
} }
return { return {
timeId: Function,
time:'',
times:'',
ATT_TYPE, ATT_TYPE,
activeIndex: 1, activeIndex: 1,
// 表格按钮 // 表格按钮
...@@ -314,20 +331,39 @@ export default { ...@@ -314,20 +331,39 @@ export default {
}, },
mounted() { mounted() {
// this.wxTips() // this.wxTips()
this.refreshData('1')
}, },
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
}, },
methods: { methods: {
refreshData(type) {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
this.$apis.customerTransform.renewDetailList({}).then(res => {
if(res.code == '0'){
if(type == 1) {
this.time = res.data.createdTime
this.$refs.customer.refreshTable()
} else if(type == 2) {
this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable()
}
}
})
}, 1500)
},
switchMenu(val) { switchMenu(val) {
this.$nextTick(() => { this.$nextTick(() => {
this.activeIndex = val this.activeIndex = val
if (val == 1) { if (val == 1) {
this.key = new Date() this.key = new Date()
if (this.$refs.customer) this.$refs.customer.refreshTable() if (this.$refs.customer) this.$refs.customer.refreshTable()
this.refreshData('1')
} else { } else {
this.groupKey = new Date() this.groupKey = new Date()
if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable() if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable()
this.refreshData('2')
} }
}) })
}, },
...@@ -448,6 +484,13 @@ export default { ...@@ -448,6 +484,13 @@ export default {
color: #999; color: #999;
margin-left: 20px; margin-left: 20px;
} }
.renew,.renews {
display: flex;
position: absolute;
right: 44px;
font-size: 14px;
color: #5850FF
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!