Commit 983b297a by yy

end

1 parent 9f1213b5
const plugins = ['@vue/babel-plugin-transform-vue-jsx']
// const plugins = ['@vue/babel-plugin-transform-vue-jsx']
// 生产环境移除console
if (process.env.NODE_ENV === 'production') { //在这判断 是否为 生产环境
plugins.push('transform-remove-console')
}
// if (process.env.NODE_ENV === 'production') { //在这判断 是否为 生产环境
// plugins.push('transform-remove-console')
// }
module.exports = {
plugins: plugins,
// plugins: plugins,
presets: ["@vue/cli-plugin-babel/preset"]
}
\ No newline at end of file
......@@ -132,7 +132,7 @@ const customerViewExport = params => {
//当日新增群客户数
const customerCustPage = params => {
params.method = 'entmicro.api.customer.base.page'
params.method = 'entmicro.api.customer.base.cust.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -172,7 +172,7 @@ const equityStatistical = params => {
}
//获取权益列表
const equityInfo = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
params.method = 'scrm.api.equity.merchant.order.list.with.page'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
......@@ -182,7 +182,7 @@ const equityInfo = params => {
}
//导出权益列表
const equityExport = params => {
params.method = 'scrm.api.equity.merchant.order.market.effect.export'
params.method = 'scrm.api.equity.merchant.order.list.with.page.export'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
......@@ -190,7 +190,90 @@ const equityExport = params => {
sign: true
})
}
//权益是否开通
const marketingOpen = params => {
params.method = 'scrm.api.equity.service.order.marketing.effect.check.open'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益提单是否开通
const serviceBillOpen = params => {
params.method = 'scrm.api.wwbench.serviceBill.isOpened'
return http({
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
//权益提单是否开通
const serviceBillStat = params => {
params.method = 'scrm.api.wwbench.serviceBill.stat'
return http({
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
//获取商城列表
const shopmallPage = params => {
params.method = 'scrm.api.shopmall.order.page'
return http({
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//导出商城列表
const shopmallExport = params => {
params.method = 'scrm.api.shopmall.order.exportForStatPage'
return http({
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//获取精品列表
const boutiquecoupon = params => {
params.method = 'scrm.api.boutiquecoupon.rop.router'
params.routerMethod = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//导出精品列表
const boutiquecouponExport = params => {
params.method = 'scrm.api.boutiquecoupon.rop.router'
params.routerMethod = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.exportForStatPage'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//精品是否开通
const isOpenSmartcarlife = params => {
params.method = 'scrm.api.boutiquecoupon.rop.router'
params.routerMethod = 'dj.api.serviceMerchant.isOpenSmartcarlife'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getChart,
getView,
......@@ -209,5 +292,13 @@ export default {
equityOrderStatistical,
equityStatistical,
equityExport,
equityInfo
equityInfo,
shopmallPage,
shopmallExport,
boutiquecoupon,
boutiquecouponExport,
marketingOpen,
isOpenSmartcarlife,
serviceBillOpen,
serviceBillStat
}
\ No newline at end of file
......@@ -103,7 +103,11 @@ img {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.count-item-question {
width: 14px;
height: 14px;
display: inline-block;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
......
......@@ -21,7 +21,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: 'mini-617412ec-bb97-45a9-98d2-cc985017c4e3-rop' } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......
......@@ -17,19 +17,46 @@ const render = (base, routes) => {
routes,
mode: 'history'
})
router.beforeEach((to, from, next) => {
let modelStatus = false;
let menuStatus = false;
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
menuStatus = true;
}
})
})
if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 1 && Vue.prototype.$globalState.session.accountLevel == 1) {
modelStatus = true;
}
if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 2 && Vue.prototype.$globalState.session.accountLevel == 4) {
modelStatus = true;
}
if (!sessionStorage.getItem('wxStatus') && (to.path == '/home/index' || to.path == '/ehome/index') && modelStatus) {
Vue.prototype.$apis.ww.getStatus({}).then((res) => {
if (res.status != 'SUCCESS') {
Vue.prototype.$history.push('/settings/enterpriseWechat/index')
sessionStorage.setItem('wxStatus', 1)
} else {
sessionStorage.setItem('wxAcess', 1)
next()
}
})
} else {
next();
}
})
// router.beforeEach((to, from, next) => {
// let modelStatus = false;
// let menuStatus = false;
// const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
// menu.forEach(item => {
// if (!item.children) {
// return
// }
// item.children.forEach(itm => {
// if (itm.path == '/enterpriseWechat/index') {
// menuStatus = true;
// }
// })
// let menu = JSON.parse(sessionStorage.getItem('SCRM_BASE_MENULIST'));
// let menuStatus = menu[0].children.find(item => {
// return item.path.indexOf('enterpriseWechat/index') != -1
// })
// if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 1 && Vue.prototype.$globalState.session.accountLevel == 1) {
// modelStatus = true;
......@@ -40,7 +67,7 @@ const render = (base, routes) => {
// if (!sessionStorage.getItem('wxStatus') && (to.path == '/home/index' || to.path == '/ehome/index') && modelStatus) {
// Vue.prototype.$apis.ww.getStatus({}).then((res) => {
// if (res.status != 'SUCCESS') {
// Vue.prototype.$history.push('/settings/enterpriseWechat/index')
// next('/enterpriseWechat/index')
// sessionStorage.setItem('wxStatus', 1)
// } else {
// sessionStorage.setItem('wxAcess', 1)
......@@ -50,7 +77,6 @@ const render = (base, routes) => {
// } else {
// next();
// }
// })
const vm = new Vue({
router,
......
......@@ -18,6 +18,6 @@ export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } })
// Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
// Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
}
\ No newline at end of file
......@@ -21,7 +21,7 @@ util.getBeforeDate = function (sign = '-') {
util.getBetweenDate = function (day, num, str = '-') {
var today = new Date(day);
var nowTime = today.getTime();
var ms = 24 * 3600 * 1000 * num;
var ms = 24 * 3600 * 1000 * (num - 1);
today.setTime(parseInt(nowTime - ms));
var oYear = today.getFullYear();
var oMoth = (today.getMonth() + 1).toString();
......@@ -45,7 +45,15 @@ util.getBeforeMonth = function (days) {
}
return arr;
}
util.getPrevMonth = function () {
let month = new Date().getMonth();
let year = new Date().getFullYear();
if(month == 0) {
year = year - 1
month = 12
}
return year + '年' + month + '月';
}
util.getCurrentMonthLast = function (date) {
var endDate = new Date(date);
var month = endDate.getMonth();
......
......@@ -14,7 +14,7 @@
<el-input v-model="tableSearchForm.followStaff" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button @click="handleSearch">重置</el-button>
<!-- <el-button @click="handleSearch">重置</el-button> -->
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</el-form-item>
......@@ -133,9 +133,7 @@ export default {
},
{
label: '来源',
prop: 'addWay',
addHtml: 'addWay',
minWidth: 100
prop: 'addWayName',
},
{
label: '是否加企微', //1. 加入,0.未加入
......@@ -151,8 +149,7 @@ export default {
},
{
label: '添加时间',
prop: 'addTime',
width: 98
prop: 'addTime'
}
]
},
......@@ -283,4 +280,35 @@ export default {
}
}
}
.entmicro {
// overflow: hidden;
// text-overflow: ellipsis;
// display: -webkit-box;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// text-align: left;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
&-tag {
display: inline-block;
}
&-hover {
max-height: 214px;
overflow: auto;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
.el-tag {
// margin-right: 10px;
max-width: 110px;
cursor: pointer;
background-color: #fff !important;
}
</style>
\ No newline at end of file
......@@ -2,14 +2,11 @@
<div class="square-main" v-loading="loading">
<el-dialog title="客户列表" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="群主">
<el-input v-model="tableSearchForm.groupHostName" placeholder="请输入客户名称"></el-input>
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="群聊昵称" v-if="!pStatus">
<el-input v-model="tableSearchForm.custGroupName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="管理员" v-if="!pStatus">
<el-input v-model="tableSearchForm.groupAdminName" placeholder="请输入客户名称"></el-input>
<el-form-item size="small" label="群聊昵称">
<el-input v-model="tableSearchForm.groupNickName" placeholder="请输入群聊昵称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button type="primary" @click="handleSearch">查询</el-button>
......@@ -17,19 +14,18 @@
</el-form-item>
</el-form>
<GLTable v-loading="loading" ref="tableEmp" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
{{ scope.scope.customerName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
</template>
<span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
......@@ -70,47 +66,37 @@ export default {
tableOption: false,
tableColumns: [
{
label: '群聊名称',
prop: 'custGroupName',
minWidth: 160
},
{
label: '当前成员总数',
prop: 'allMembers',
minWidth: 110
},
{
label: '当前客户数',
prop: 'totalCount',
minWidth: 90
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '当日新增入群客户数',
prop: 'newCustomerCount',
minWidth: 150
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 100
},
{
label: '当日新增退群客户数',
prop: 'delCustomerCount',
minWidth: 150
label: '手机号码',
prop: 'customerPhone'
},
{
label: '当前跟进员工数',
prop: 'staffs',
minWidth: 130
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '群主',
prop: 'groupHostName'
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '管理员',
prop: 'groupAdminName'
label: '邀请人',
prop: 'invitorName'
},
{
label: '创建时间',
prop: 'addTime',
width: 140
label: '入群时间',
prop: 'joinTime',
width: 95
}
]
},
......
......@@ -88,7 +88,7 @@ export default {
}
]
}
myChart.clear();
option && myChart.setOption(option)
}
}
......
......@@ -113,9 +113,9 @@
</div>
<el-dialog center :visible.sync="dialogVisible" width="30%" class="dialog-panel">
<span>您还没有门店,暂无数据,请先创建门店</span>
<span>您需先创建门店并且门店关联企业微信后,方可正常使用!</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="jumpStore">去创建</el-button>
<el-button type="primary" @click="jumpStore">去关联</el-button>
</span>
</el-dialog>
</div>
......@@ -139,7 +139,7 @@ export default {
radioOutput: '1',
custSortList: [],
monthArr: [],
monthValue: new Date().getFullYear() + '年' + new Date().getMonth() + '月',
monthValue: util.getPrevMonth(),
yearValue: new Date().getFullYear(),
summaryArr: [],
outputRank: [],
......@@ -163,6 +163,7 @@ export default {
tabRank() {
this.getSort()
},
//选择时间
tabOutput() {
if (this.radioOutput == 1) {
this.getOutput()
......@@ -174,6 +175,7 @@ export default {
this.getOutput(year[0] + '-' + month[0] + '-01', util.getCurrentMonthLast(year[0] + '-' + month[0]))
}
},
//产值
getOutput(dataStartDateStr, dataEndDateStr) {
this.$apis.home
.merchantRank({
......@@ -191,6 +193,7 @@ export default {
})
})
},
//排名
getSort() {
this.$apis.home
.getSort({
......
......@@ -109,7 +109,7 @@
<div class="config-box-h3 text-bettwn" style="margin-bottom: 20px">
<span>2.填写嘀加企微管家门店秘钥secret</span>
<div class="config-box-link">
<span @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustrate.html')">
<span @click="jumpUrl('http://img01.glsx.com.cn/upload/temporary/illustrate.html')">
查看如何获取
<i class="el-icon-d-arrow-right"></i>
</span>
......@@ -147,7 +147,7 @@
<div>
<div class="config-box-h3 text-bettwn">
<span>通讯录接收事件服务配置</span>
<span class="config-box-link" @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustration.html')">
<span class="config-box-link" @click="jumpUrl('http://img01.glsx.com.cn/upload/temporary/illustration.html')">
查看如何配置
<i class="el-icon-d-arrow-right"></i>
</span>
......@@ -300,7 +300,8 @@ export default {
window.open(url)
},
jumpHome() {
this.$router.push('/home/index?id=2')
const defaultPath = this.$globalState.session.defaultPath
this.$history.push(defaultPath)
},
jumpStore() {
this.$history.push('/settings/account/index')
......
......@@ -144,6 +144,7 @@ export default {
})
}
this.loading = false
this.$emit('handleSearch')
})
},
onSubmit() {
......
......@@ -3,7 +3,7 @@
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
<a class="follow-process-a" @click="jumpUrl('https://img01.glsx.com.cn/upload/temporary/process.html')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
......@@ -33,7 +33,7 @@
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp" @handleSearch="handleSearch"></add-sale>
</el-drawer>
</div>
</template>
......@@ -107,7 +107,8 @@ export default {
formatter: cellValue => {
return {
0: '是',
1: '否'
1: '否',
'': '否'
}[cellValue.isAddOutsider]
}
}
......@@ -126,8 +127,11 @@ export default {
}
},
methods: {
jumpUrl(url) {
window.open(url)
jumpUrl(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.click()
},
openDrawer() {
this.drawer = true
......@@ -214,7 +218,6 @@ export default {
this.$message({
showClose: true,
duration: 0,
type: 'warning',
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { margin: '0px 60px 0px 20px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
})
}
......
<template>
<div class="chart-home-panel scrm-box-f">
<div class="chart-home-left">
<div class="left-header">
<div class="view-l-title">
<div class="view-title-desc">
<span>累计提单数</span>
<div>
<div class="chart-home-panel scrm-box-f" v-if="marketOpen">
<div class="chart-home-left">
<div class="left-header">
<div class="view-l-title">
<div class="view-title-desc">
<span>累计提单数</span>
</div>
</div>
</div>
<div class="view-title-num">{{ totalBillNum }}</div>
<div class="view-title-num">
{{ totalBillNum }}
<span>单</span>
</div>
</div>
<div class="view-chart">
<output-echart echartId="echartId_2" lineType="2" :outputCircle="output" v-show="output"></output-echart>
<div class="view-chart-empty" v-show="!output">
<img src="@/assets/img/empty.png" />
<div>暂无数据</div>
</div>
</div>
</div>
<div class="view-chart">
<div class="view-chart-title">产值分析</div>
<output-echart echartId="echartId_2" lineType="2" :outputCircle="output"></output-echart>
<!-- <div class="view-chart-empty" v-show="!(output.boutiqueUpgradeTotalOutputValueRadio || output.shopmallTotalOutputValueRadio || output.otherTotalOutputValueRadio)">
<img src="@/assets/img/empty.png" />
<div>暂无数据</div>
</div> -->
<div class="chart-home-right">
<div class="summary-customer-panel">
<div class="summary-item">
<div class="summary-item-title">
<span>当日提单数</span>
</div>
<div class="summary-item-total">
<div>
{{ todayBillNum }}
<span>单</span>
</div>
<div class="summary-radio">
日环比:{{ billNumSequential | valueF }}
<i class="el-icon-caret-top" v-if="billNumSequential > 0"></i>
<i class="el-icon-caret-bottom" v-if="billNumSequential < 0"></i>
</div>
</div>
</div>
</div>
<linechart :echartData="serviceOrderTrendList"></linechart>
</div>
</div>
<div class="chart-home-right">
<div class="summary-customer-panel">
<div class="summary-item">
<div class="summary-item-title">
<span>当日提单数</span>
<div class="scrm-box-f scrm-euity-box" v-else>
<div class="chart-equity-panel">
<div class="equity-panel">
<div class="equity-panel-title">您暂未开通权益服务!</div>
<div class="equity-panel-desc">开通4S店会员权益服务,帮您新增产值100万/年</div>
</div>
<div class="equity-panel">
<img src="@/assets/img/home/equity.png" />
</div>
</div>
<div class="equity-step">
<div class="equity-step-title">开通流程:</div>
<div class="equity-step-panel">
<div class="equity-step-item">
<img src="@/assets/img/home/step1.png" class="equity-step-num" />
<div class="step-item-desc">联系嘀加权益业务经理,开通此业务</div>
<img src="@/assets/img/home/step.png" class="equity-step-next" />
</div>
<div class="summary-item-total">
<div>
{{ todayBillNum }}
<span>单</span>
</div>
<div class="summary-radio">
日环比:{{ billNumSequential }}%
<i class="el-icon-caret-top" v-if="billNumSequential > 0"></i>
<i class="el-icon-caret-bottom" v-if="billNumSequential < 0"></i>
</div>
<div class="equity-step-item">
<img src="@/assets/img/home/step2.png" class="equity-step-num" />
<div class="step-item-desc">确定合作细则,开通服务</div>
<img src="@/assets/img/home/step.png" class="equity-step-next" />
</div>
<div class="equity-step-item">
<img src="@/assets/img/home/step3.png" class="equity-step-num" />
<div class="step-item-desc">销售权益,您获得收益</div>
</div>
</div>
</div>
<linechart :echartData="serviceOrderTrendList"></linechart>
<el-popover placement="left" width="166" trigger="hover">
<div class="qrcode-img">
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/wangdy.png" />
<div class="qrcode-text">服务热线</div>
<div class="qrcode-num">134 8079 2980</div>
</div>
<div class="main-contact-panel" slot="reference">
<div class="contact-icon"><i class="el-icon-chat-dot-square"></i></div>
<div class="contact-desc">联系我们</div>
</div>
</el-popover>
</div>
</div>
</template>
......@@ -58,7 +103,8 @@ export default {
output: {},
totalBillNum: 0,
todayBillNum: 0,
billNumSequential: 0
billNumSequential: 0,
marketOpen: true
}
},
props: {
......@@ -71,19 +117,38 @@ export default {
this.getOutput()
}
},
filters: {
valueF(val) {
if(val == null) {
return '--'
}else {
return val + '%'
}
}
},
methods: {
//是否开通权益
async getOpen() {
this.marketOpen = await this.$apis.home.marketingOpen({ merchantId: this.$globalState.session.merchantId })
this.getOutput()
},
//产值
getOutput() {
this.$apis.home.equityOrderStatistical({ dataStartDateStr: util.getBetweenDate(this.summaryTimeFomat, 30), dataEndDateStr: this.summaryTimeFomat, merchantId: '44184606' }).then(res => {
this.output = res.servicePackageList
this.totalBillNum = res.totalBillNum
this.todayBillNum = res.todayBillNum
this.billNumSequential = res.billNumSequential
this.serviceOrderTrendList = res.serviceOrderTrendList
})
if (this.marketOpen) {
this.$apis.home.equityOrderStatistical({ dataStartDateStr: util.getBetweenDate(this.summaryTimeFomat, 30), dataEndDateStr: this.summaryTimeFomat, merchantId: this.$globalState.session.merchantId }).then(res => {
this.output = res.servicePackageList
this.totalBillNum = res.totalBillNum
this.todayBillNum = res.todayBillNum
this.billNumSequential = res.billNumSequential
this.serviceOrderTrendList = res.serviceOrderTrendList
})
}
}
},
beforeDestroy() {
},
mounted() {
this.getOutput()
this.getOpen()
}
}
</script>
......@@ -115,7 +180,7 @@ export default {
width: 80px;
height: auto;
font-size: 14px;
margin-top: 15px;
margin: 60px auto;
font-weight: 400;
color: #000000;
line-height: 22px;
......@@ -175,7 +240,7 @@ export default {
height: 50px;
line-height: 50px;
> span {
font-size: 26px;
font-size: 20px;
}
}
.view-title-jump {
......@@ -186,6 +251,76 @@ export default {
line-height: 20px;
}
}
.chart-equity-panel {
display: flex;
padding: 20px 20px 20px 0px;
align-items: center;
.equity-panel {
&:nth-child(1) {
width: 60%;
}
&:nth-child(2) {
width: 40%;
}
&-title {
font-size: 26px;
font-weight: 500;
color: #333333;
line-height: 30px;
text-align: center;
}
&-desc {
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
text-align: center;
margin-top: 20px;
}
img {
width: 312px;
height: auto;
}
}
}
.equity-step {
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 20px;
margin: 10px;
text-align: center;
}
&-panel {
display: flex;
justify-content: center;
width: 86%;
margin: 0 auto;
.equity-step-item {
height: 64px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
display: flex;
align-items: center;
.equity-step-num {
width: 32px;
height: 32px;
}
.step-item-desc {
margin: 0px 50px 0px 10px;
}
.equity-step-next {
width: 50px;
height: auto;
margin-right: 50px;
}
}
}
}
.summary-customer-panel {
display: flex;
.summary-item {
......@@ -275,4 +410,48 @@ export default {
}
}
}
.qrcode-img {
img {
width: 124px;
height: 124px;
margin-bottom: 10px;
}
.qrcode-text, .qrcode-num {
text-align: center;
color: #333;
font-size: 14px;
}
}
.scrm-euity-box {
position: relative;
.main-contact-panel {
cursor: pointer;
position: absolute;
bottom: 0px;
right: 0px;
width: 52px;
height: 142px;
background: #5850ff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
border-radius: 4px;
text-align: center;
padding: 16px 0px;
box-sizing: border-box;
.contact-desc {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
margin: 0 auto;
width: 20px;
}
.contact-icon {
margin-bottom: 6px;
font-size: 20px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
}
}
}
</style>
\ No newline at end of file
......@@ -2,14 +2,11 @@
<div class="square-main" v-loading="loading">
<el-dialog title="当日新增群客户数" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="群主">
<el-input v-model="tableSearchForm.groupHostName" placeholder="请输入客户名称"></el-input>
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="群聊昵称" v-if="!pStatus">
<el-input v-model="tableSearchForm.custGroupName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="管理员" v-if="!pStatus">
<el-input v-model="tableSearchForm.groupAdminName" placeholder="请输入客户名称"></el-input>
<el-form-item size="small" label="群聊昵称">
<el-input v-model="tableSearchForm.groupNickName" placeholder="请输入群聊昵称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button type="primary" @click="handleSearch">查询</el-button>
......@@ -17,19 +14,18 @@
</el-form-item>
</el-form>
<GLTable v-loading="loading" ref="tableEmp" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
{{ scope.scope.customerName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
</template>
<span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
......@@ -70,47 +66,37 @@ export default {
tableOption: false,
tableColumns: [
{
label: '群聊名称',
prop: 'custGroupName',
minWidth: 160
},
{
label: '当前成员总数',
prop: 'allMembers',
minWidth: 110
},
{
label: '当前客户数',
prop: 'totalCount',
minWidth: 90
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '当日新增入群客户数',
prop: 'newCustomerCount',
minWidth: 150
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 100
},
{
label: '当日新增退群客户数',
prop: 'delCustomerCount',
minWidth: 150
label: '手机号码',
prop: 'customerPhone'
},
{
label: '当前跟进员工数',
prop: 'staffs',
minWidth: 130
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '群主',
prop: 'groupHostName'
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '管理员',
prop: 'groupAdminName'
label: '邀请人',
prop: 'invitorName'
},
{
label: '创建时间',
prop: 'addTime',
width: 140
label: '入群时间',
prop: 'joinTime',
width: 95
}
]
},
......
......@@ -2,23 +2,20 @@
<div class="square-main" v-loading="loading">
<el-dialog title="当日新增门店服务套餐" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="订单编号">
<el-input v-model="tableSearchForm.outTradeNo" placeholder="请输入订单编号"></el-input>
</el-form-item>
<el-form-item size="small" label="手机号">
<el-input v-model="tableSearchForm.mobile" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<GLTable v-loading="loading" ref="tableEmp" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
{{ scope.scope.customerName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
<GLTable ref="tableEmp" class="table-img" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
</GLTable>
<span slot="footer" class="dialog-footer">
......@@ -29,22 +26,35 @@
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
const stateList = [
const orderStatusList = [
// 2: '待收货',
// 3: '已完成',
// 4: '售后中',
// 5: '退款失败',
// 6: '已经退款',
{
confId: 0,
confName: '待上架'
confId: 2,
confName: '待收货'
},
{
confId: 1,
confName: '在售中'
confId: 3,
confName: '已完成'
},
{
confId: 2,
confName: '已下架'
confId: 4,
confName: '售后中'
},
{
confId: 5,
confName: '退款失败'
},
{
confId: 6,
confName: '已退款'
}
]
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'customDetail',
data() {
......@@ -67,6 +77,7 @@ export default {
label: '删除好友'
}
],
getListApi: '',
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
......@@ -74,43 +85,38 @@ export default {
tableOption: false,
tableColumns: [
{
label: '套餐名称',
prop: 'packageName',
width: '180'
label: '订单编号',
prop: 'outTradeNo'
},
{
label: '套餐售价',
prop: 'packagePrice',
line: 1
label: '客户姓名',
prop: 'accountName'
},
{
label: '套餐总价',
prop: 'referencePrice'
label: '客户手机号',
prop: 'mobile'
},
{
label: '套餐内容',
prop: 'list',
addHtml: 'list'
label: '商品/套餐名称',
prop: 'packageName'
},
{
label: '说明',
prop: 'notes',
width: 160,
line: 4
label: '订单支付时间',
prop: 'createDate'
},
{
label: '状态',
prop: 'state',
width: '80',
label: '订单支付金额',
prop: 'realPayPrice'
},
{
label: '订单状态',
prop: 'orderStatus',
formatter: cellValue => {
return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName
return orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
}
}
]
},
baseDataList: {
stateList: stateList
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
staffName: [],
......@@ -131,9 +137,10 @@ export default {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
merchantId: this.$globalState.session.merchantId,
pageSize: this.$refs.tableEmp.page.pageSize,
pageNum: this.$refs.tableEmp.page.pageNum,
merchantId: this.$globalState.session.merchantId,
currentPage: this.$refs.tableEmp.page.pageNum,
orderType: 1,
startTime: this.startTime + ' 00:00:00',
endTime: this.endTime + ' 23:59:59'
}
......@@ -144,25 +151,26 @@ export default {
this.tableTotal = res.count
})
},
init(day) {
this.startTime = day
this.endTime = day
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.tableEmp.page.pageNum = 1
this.getFollower()
})
},
//导出
handleExport() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
merchantId: this.$globalState.session.merchantId,
orderType: 1,
startTime: this.startTime + ' 00:00:00',
endTime: this.endTime + ' 23:59:59'
}
this.$apis.home.equityExport(params).then(res => {
// util.openUrl(res)
util.openUrl(res)
})
},
init(day) {
this.startTime = day
this.endTime = day
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.tableEmp.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
......@@ -182,7 +190,7 @@ export default {
}, 300)
}
}
</script>
</script>
<style lang="scss" scoped>
.dialog-jump {
......@@ -217,4 +225,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
\ No newline at end of file
......@@ -141,7 +141,7 @@ export default {
this.loading = true
this.$apis.home.getCustomer(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableData = res.list
this.tableTotal = res.count
})
},
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="客户列表" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-dialog title="当日新增商城产值" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
<el-form-item size="small" label="订单编号">
<el-input v-model="tableSearchForm.orderCode" placeholder="请输入订单编号"></el-input>
</el-form-item>
<el-form-item size="small" label="状态" v-if="!pStatus">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="跟进员工" v-if="!staffIds">
<el-select v-model="staffId" placeholder="请选择">
<el-option v-for="item in staffName" :key="item.staffId" :label="item.staffName" :value="item.staffId"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="添加时间" v-if="timeStatus">
<el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-form-item size="small" label="手机号">
<el-input v-model="tableSearchForm.customerPhone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<!-- <GLTable ref="tableEmp" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="tableEmp" class="table-img" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
</GLTable> -->
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
</span>
......@@ -35,6 +26,61 @@
</template>
<script>
const orderStatusList = [
// 2: '待收货',
// 3: '已完成',
// 4: '售后中',
// 5: '退款失败',
// 6: '已经退款',
{
confId: 1,
confName: '待付款'
},
{
confId: 2,
confName: '已支付'
},
{
confId: 3,
confName: '已关闭'
},
{
confId: 4,
confName: '已发货'
},
{
confId: 5,
confName: '已收货'
},
{
confId: 6,
confName: '待发货'
},
{
confId: 7,
confName: '待安装'
},
{
confId: 8,
confName: '已安装'
},
{
confId: 9,
confName: '售后中'
},
{
confId: 10,
confName: '售后完成'
},
{
confId: 21,
confName: '待核销'
},
{
confId: 22,
confName: '已核销'
}
]
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
......@@ -67,66 +113,38 @@ export default {
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
line: 2
},
{
label: '缩略图',
prop: 'goodsImage',
addHtml: 'goodsImage'
label: '订单编号',
prop: 'orderCode'
},
{
label: '浏览量(次)',
name: 'goodsStatistics',
width: '180',
formatter: cellValue => {
return cellValue.goodsStatistics ? cellValue.goodsStatistics.viewAmount || '0' : '0'
}
},
{
label: '销量',
name: 'goodsStatistics',
formatter: cellValue => {
return cellValue.goodsStatistics ? cellValue.goodsStatistics.saleAmount || '0' : '0'
}
label: '客户姓名',
prop: 'customerName'
},
{
label: '零售价(元)',
name: 'retailPrice',
width: '180',
formatter: cellValue => {
return cellValue.retailPrice
}
label: '客户手机号',
prop: 'customerPhone'
},
{
label: '库存',
name: 'goodsStock',
label: '商品/套餐名称',
prop: 'orderGoods',
formatter: cellValue => {
return cellValue.goodsStock || '0'
return cellValue.orderGoods && cellValue.orderGoods.length > 0 ? cellValue.orderGoods[0].goodsName : ''
}
},
{
label: '创建日期',
prop: 'createdDate',
width: '180',
// formatter: cellValue => {
// return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
// }
label: '订单支付时间',
prop: 'payDate'
},
{
label: '商品状态',
name: 'goodsStatus',
// formatter: cellValue => {
// return this.baseData.goodsStatusList.find(item => item.confId == cellValue.goodsStatus).confName
// }
label: '订单支付金额',
prop: 'payPrice'
},
{
label: '带货来源',
name: 'goodsSource',
// formatter: cellValue => {
// return this.baseData.goodsSourceList.find(item => item.confId == cellValue.goodsSource).confName
// }
label: '订单状态',
prop: 'orderStatus',
formatter: cellValue => {
return orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
}
}
]
},
......@@ -138,7 +156,9 @@ export default {
selectEmp: [],
pStatus: null,
staffIds: null,
staffId: null
staffId: null,
startTime: null,
endTime: null
}
},
methods: {
......@@ -149,16 +169,31 @@ export default {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.tableEmp.page.pageSize,
pageNum: this.$refs.tableEmp.page.pageNum
currentPage: this.$refs.tableEmp.page.pageNum,
createdStartDateStr: this.startTime + ' 00:00:00',
createdEndDateStr: this.endTime + ' 23:59:59'
}
this.loading = true
this.$apis.home.getCustomer(params).then(res => {
this.$apis.home.shopmallPage(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableTotal = res.count
this.tableData = res.list
this.tableTotal = res.total
})
},
handleExport() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
createdStartDateStr: this.startTime + ' 00:00:00',
createdEndDateStr: this.endTime + ' 23:59:59'
}
this.loading = true
this.$apis.home.shopmallExport(params).then(res => {
util.openUrl(res)
})
},
init() {
init(day) {
this.startTime = day
this.endTime = day
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.tableEmp.page.pageNum = 1
......@@ -182,7 +217,7 @@ export default {
}, 300)
}
}
</script>
</script>
<style lang="scss" scoped>
.dialog-jump {
......@@ -217,4 +252,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -49,7 +49,11 @@ export default {
data: dateTime
},
yAxis: {
type: 'value'
type: 'value',
minInterval: 1,
},
tooltip: {
trigger: "axis",
},
grid: {
left: '3%',
......@@ -60,8 +64,10 @@ export default {
series: [
{
data: lineData,
smooth: true,
type: 'line',
symbol: 'none',
name: '提单数',
color: '#5850FF',
areaStyle: {
color: {
......@@ -88,6 +94,7 @@ export default {
}
option && myChart.setOption(option)
window.addEventListener('resize', myChart.resize)
}
}
}
......
......@@ -101,6 +101,7 @@ export default {
}
option && myChart.setOption(option)
window.addEventListener('resize', myChart.resize)
myChart.on('click', res => {
let url
switch (res.data.name) {
......@@ -150,7 +151,7 @@ export default {
itemWidth: 12,
data: packageName
},
color: ['#5850FF', '#64C0A2', '#FACD67', '#F7A7B3', '#34911A'],
color: ['#5850FF', '#64C0A2', '#FACD67', '#F7A7B3', '#34911A','#1E90FF','#800000','#2F4F4F','#00FF00','#FFEFD5','#F08080'],
series: [
{
name: '访问来源',
......
......@@ -5,16 +5,21 @@
<div class="summary-item-title">
<span>当日新增客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="统计截止时间当天,本商户的新增客户数,1个客户仅计算1次。">
<img src="@/assets/img/question.png" slot="reference" />
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="summary-item-total">
<div @click="handleEmpDetail(summaryTime, summaryTime)">
<div @click="handleEmpDetail('当日新增客户数', summaryTime, summaryTime)" v-if="this.$globalState.session.accountLevel != 4">
{{ newCustomerCount }}
<span>人</span>
</div>
<div class="summary-radio">
日环比:{{ totalCountDayToDayRadio }}%
<div v-if="this.$globalState.session.accountLevel == 4">
{{ newCustomerCount }}
<span>人</span>
</div>
<div class="summary-radio" :class="{ 'radio-green': totalCountDayToDayRadio > 0, 'radio-red': totalCountDayToDayRadio < 0 }">
日环比:
<span>{{ totalCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="totalCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="totalCountDayToDayRadio < 0"></i>
</div>
......@@ -28,16 +33,17 @@
<div class="summary-item-title">
<span>当日新增已加企微客户总数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,本商户的客户数之和,1个客户仅计算1次。">
<img src="@/assets/img/question.png" slot="reference" />
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="summary-item-total">
<div @click="handleEmpDetail(summaryTime, summaryTime, 1)">
<div @click="handleEmpDetail('当日新增已加企微客户总数', summaryTime, summaryTime, 1)">
{{ newEntmicroCount }}
<span>人</span>
</div>
<div class="summary-radio">
日环比:{{ entmicroCountDayToDayRadio }}%
<div class="summary-radio" :class="{ 'radio-green': entmicroCountDayToDayRadio > 0, 'radio-red': entmicroCountDayToDayRadio < 0 }">
日环比:
<span>{{ entmicroCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="entmicroCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="entmicroCountDayToDayRadio < 0"></i>
</div>
......@@ -51,7 +57,7 @@
<div class="summary-item-title">
<span>当日新增群客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="统计截止时间当天,本商户企业微信群新增的客户数,内部员工除外,1个客户仅计算1次。">
<img src="@/assets/img/question.png" slot="reference" />
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="summary-item-total">
......@@ -59,8 +65,9 @@
{{ todayAddPackmenberCount }}
<span>人</span>
</div>
<div class="summary-radio item-three" style="background: #f5f5ff">
日环比:{{ groupCustCountDayToDayRadio }}%
<div class="summary-radio" :class="{ 'radio-green': groupCustCountDayToDayRadio > 0, 'radio-red': groupCustCountDayToDayRadio < 0 }">
日环比:
<span>{{ groupCustCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="groupCustCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="groupCustCountDayToDayRadio < 0"></i>
</div>
......@@ -74,16 +81,17 @@
<div class="summary-item-title">
<span>当日企微流失客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="统计截止时间当天,本商户企业微信流失客户数(包括删除和拉黑)。">
<img src="@/assets/img/question.png" slot="reference" />
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="summary-item-total">
<div @click="handleEmpDetail(summaryTime, summaryTime, null, summaryTime)">
<div @click="handleEmpDetail('当日企微流失客户数', summaryTime, summaryTime, null, summaryTime)">
{{ todayEntmicroLoseCount }}
<span>人</span>
</div>
<div class="summary-radio item-four">
日环比:{{ lostCountDayToDayRadio }}%
<div class="summary-radio" :class="{ 'radio-green': lostCountDayToDayRadio > 0, 'radio-red': lostCountDayToDayRadio < 0 }">
日环比:
<span>{{ lostCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="lostCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="lostCountDayToDayRadio < 0"></i>
</div>
......@@ -97,11 +105,11 @@
<div class="summary-item-title">
<span>累计未加企微客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,本商户的所有客户中,未加企微客户总数之和。">
<img src="@/assets/img/question.png" slot="reference" />
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="summary-item-total">
<div @click="handleEmpDetail(null, summaryTime, 1)">
<div @click="handleEmpDetail('累计未加企微客户数', null, summaryTime, 0)">
{{ notAddEntmicroCount }}
<span>人</span>
</div>
......@@ -183,11 +191,21 @@ export default {
this.getChart()
}
},
filters: {
valueF(val) {
if (val == null) {
return '--'
} else {
return val + '%'
}
}
},
methods: {
handleEmpDetail(day1, day2, status, day3) {
this.$refs.customForm.init(day1, day2, status, day3)
//客户列表
handleEmpDetail(title, day1, day2, status, day3) {
this.$refs.customForm.init(title, day1, day2, status, day3)
},
//客户群列表
handleEmpGroupDetail(days) {
this.$refs.customGroupForm.init(days)
},
......@@ -197,6 +215,7 @@ export default {
getBackUp() {
this.$alert('敬请期待', '提示')
},
//客户统计
getViewData() {
this.$apis.home.getStore({ date: this.summaryTime }).then(res => {
this.customerCount = res.customerCount
......@@ -212,6 +231,7 @@ export default {
this.$emit('getEntmicroRadio', this.entmicroCountRadio)
})
},
//折线图
async getChart() {
this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => {
const { custAddList, custEntmicroAdds, custLoseList } = res
......@@ -322,6 +342,7 @@ export default {
]
}
option && myChart.setOption(option)
window.addEventListener('resize', myChart.resize)
if (custAddListData.every(item => item == 0) && custEntmicroAddsData.every(item => item == 0) && custLoseListData.every(item => item == 0)) {
this.chartStatus = true
} else {
......@@ -330,13 +351,12 @@ export default {
})
}
},
mounted() {
this.getViewData()
this.getChart()
}
}
</script>
</script>
<style lang="scss" scoped>
.summary-customer-panel {
......@@ -396,19 +416,22 @@ export default {
.summary-radio {
// background: rgba(127, 204, 162, 0.1);
border-radius: 2px;
color: #7fcca2;
color: #666666;
line-height: 16px;
font-size: 12px;
&.item-three {
color: #8480cb;
// background: rgba(245, 245, 255, 1);
&.radio-green {
span,
i {
color: #e57272;
}
}
&.item-four {
color: #e57272;
// background: rgba(255, 238, 238, 1);
&.radio-red {
span,
i {
color: #2cca74;
}
}
i {
color: #2cca74;
font-size: 14px;
}
}
......@@ -513,4 +536,4 @@ export default {
height: 32px;
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,16 +2,20 @@
<div class="scrm-main">
<div class="main-panel" :class="{ 'main-isScroll': guideStatus }">
<div class="main-left">
<div class="summary-panel-time"> <div class="summary-time">
<span>统计截止至 </span>
<el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
</div></div>
<div class="summary-panel">
<div class="home-statistics-title">
客户概览
<span class="home-title-radio">企微客户占比</span>
<span class="home-title-radio" style="color: #5850ff">{{entmicroCountRadio}}%</span>
<span class="home-title-radio" style="color: #5850ff">{{ entmicroCountRadio }}%</span>
</div>
<div class="summary-time">
<span>统计截止至</span>
<!-- <div class="summary-time">
<span>统计截止至 </span>
<el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
</div>
</div> -->
</div>
<overview-enterprise :summaryTime="summaryTime" @getEntmicroRadio="getEntmicroRadio"></overview-enterprise>
<div class="home-statistics-title">产值概览</div>
......@@ -22,9 +26,15 @@
<div class="home-statistics-title">精选营销工具</div>
<marketing-tools></marketing-tools>
</div>
<div class="main-right">
<enterprise-information></enterprise-information>
</div>
<!-- <el-popover placement="left" width="240" trigger="hover">
<div class="qrcode-img">
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/lianghh.png">
</div>
<div class="main-contact-panel" slot="reference">
<div class="contact-icon"><i class="el-icon-chat-dot-square"></i></div>
<div class="contact-desc">联系我们</div>
</div>
</el-popover> -->
</div>
</div>
</template>
......@@ -34,7 +44,6 @@ import util from '@/utils/util'
import overviewEnterprise from './components/overview-enterprise'
import customerEchart from './components/customer-echart'
import marketingTools from './components/marketing-tools'
import enterpriseInformation from './components/enterprise-information'
import accurateMarketing from './components/accurate-marketing'
export default {
name: 'home',
......@@ -43,8 +52,7 @@ export default {
overviewEnterprise,
customerEchart,
marketingTools,
enterpriseInformation,
accurateMarketing,
accurateMarketing
},
data() {
......@@ -76,11 +84,10 @@ export default {
},
getEntmicroRadio(value) {
this.entmicroCountRadio = value
},
}
},
mounted() {
},
mounted() {}
}
</script>
......@@ -125,15 +132,26 @@ export default {
left: 0px;
}
.main-panel {
display: flex;
width: 100%;
}
.summary-panel-time {
text-align: right;
/deep/ {
.el-date-editor.el-input, .el-date-editor.el-input__inner {
width: 130px;
}
}
}
.summary-panel {
display: flex;
justify-content: space-between;
align-items: center;
.home-statistics-title {
margin-top: 0px;
}
/deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
winth: 100px;
width: 100px;
line-height: 32px;
height: 32px;
}
......@@ -144,7 +162,8 @@ export default {
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin: 30px 0px 20px;
margin-bottom: 20px;
margin-top: 20px;
.home-title-radio {
font-size: 14px;
font-weight: 400;
......@@ -155,12 +174,13 @@ export default {
margin-top: 20px;
}
.main-left {
flex: 1;
width: 100%;
// flex: 1;
// margin-right: 20px;
}
.main-right {
width: 230px;
display: none;
// width: 230px;
// display: none;
}
.h-overview-content {
border: 1px solid #000000;
......@@ -221,4 +241,37 @@ export default {
position: absolute;
}
}
.qrcode-img {
width: 200px;
height: 200px;
}
.main-contact-panel {
cursor: pointer;
position: fixed;
bottom: 100px;
right: 25px;
width: 52px;
height: 142px;
background: #5850ff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
border-radius: 4px;
text-align: center;
padding: 16px 0px;
box-sizing: border-box;
.contact-desc {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
margin: 0 auto;
width: 20px;
}
.contact-icon {
margin-bottom: 6px;
font-size: 20px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!