liudan 8 months ago
parent 059728f38f
commit f57270c50a
  1. 11
      view/admin/src/api/statistic.js
  2. 2
      view/admin/src/router/index.js
  3. 26
      view/admin/src/router/modules/statistic.js
  4. 159
      view/admin/src/views/dataStatistic/statistic.vue
  5. 12
      view/admin/src/views/marketing/platformCoupon/couponList/index.vue
  6. 55
      view/admin/src/views/user/huitongbao/index.vue

@ -0,0 +1,11 @@
import request from './request'
/**
* @description 数据统计
*/
export function getStatisticList(data) {
return request.get('statistics/all_data', data)
}
// 惠通宝转让记录
export function getHuitongbao(data) {
return request.get('user/huitong_list', data)
}

@ -39,6 +39,7 @@ import stationRouter from './modules/station'
import serviceRouter from './modules/service' import serviceRouter from './modules/service'
import communityRouter from './modules/community' import communityRouter from './modules/community'
import deliveryRouter from './modules/delivery' import deliveryRouter from './modules/delivery'
import statisticRoute from './modules/statistic'
export const constantRoutes = [ export const constantRoutes = [
configRouter, configRouter,
@ -64,6 +65,7 @@ export const constantRoutes = [
serviceRouter, serviceRouter,
communityRouter, communityRouter,
deliveryRouter, deliveryRouter,
statisticRoute,
{ {
path: roterPre, path: roterPre,
component: Layout, component: Layout,

@ -0,0 +1,26 @@
import Layout from '@/layout'
import { roterPre } from '@/settings'
const statisticRoute =
{
path: `${roterPre}/dataStatistic`,
name: 'data_statistic',
meta: {
icon: 'dashboard',
title: '数据统计'
},
alwaysShow: true,
component: Layout,
children: [
{
path: 'statistic',
name: 'statistic',
meta: {
title: '数据统计',
noCache: true
},
component: () => import('@/views/dataStatistic/statistic')
},
]
}
export default statisticRoute

@ -0,0 +1,159 @@
<template>
<div class="statistic">
<el-button type="primary">导出数据统计</el-button>
<div class="contentContainer">
<div class="section" v-for="(item,index) in list" :key="index">
<div class="sectionTitle">{{item.title}}</div>
<div class="content">
<div v-for="(p,i) in item.data" class="sectionDesc">
<div class="item">{{p.name}}</div>
<div class="num" v-if="index==0">{{huitong[p.countText]}}</div>
<div class="num" v-if="index==1">{{welfare[p.countText]}}</div>
<div class="num" v-if="index==2">{{consume[p.countText]}}</div>
<div class="num" v-if="index==3">{{contribution[p.countText]}}</div>
<div class="num" v-if="index==4">{{share_point[p.countText]}}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {getStatisticList} from '@/api/statistic'
export default{
data(){
return{
list:[
{
title:'惠通宝数据统计',
data:[
{name:'发放惠通宝总数',obj:'huitong',countText:'total'},
{name:'可用惠通宝总数',obj:'huitong',countText:'available'},
{name:'冻结惠通宝总数',obj:'huitong',countText:'frozen'},
{name:'燃烧惠通宝总数',obj:'huitong',countText:'burned'},
{name:'昨日发放惠通宝总数',obj:'huitong',countText:'total_yesterday'},
{name:'昨日燃烧惠通宝总数',obj:'huitong',countText:'burned_yesterday'},
]
},
{
title:'福利积分数据统计',
data:[
{name:'发放福利积分总数',countText:'total'},
{name:'可用福利积分总数',countText:'available'},
{name:'冻结福利积分总数',countText:'frozen'},
{name:'昨日发放福利积分总数',countText:'total_yesterday'},
{name:'订单平台账户福利积分总数',countText:'platform'},
]
},
{
title:'消费积分数据统计',
data:[
{name:'发放消费积分总数',countText:'total'},
{name:'可用消费积分总数',countText:'available'},
{name:'冻结消费积分总数',countText:'frozen'},
{name:'昨日发放消费积分总数',countText:'total_yesterday'},
]
},
{
title:'贡献值数据统计',
data:[
{name:'发放贡献值总数',countText:'total'},
{name:'可用贡献值总数',countText:'available'},
{name:'冻结贡献值总数',countText:'frozen'},
{name:'昨日发放贡献值总数',countText:'total_yesterday'},
]
},
{
title:'分红点数据统计',
data:[
{name:'分红点用户总数',countText:'user_total'},
{name:'分红点总数',countText:'total'},
{name:'昨日新增分红点用户',countText:'user_yesterday'},
{name:'昨日新增分红点总数',countText:'total_yesterday'},
]
},
],
consume:{
available:0,
frozen:0,
total:0,
total_yesterday:0,
},
contribution:{
available:0,
frozen:0,
total:0,
total_yesterday:0,
},
huitong:{
available:0,
burned:0,
burned_yesterday:0,
frozen:0,
total:0,
total_yesterday:0,
},
share_point:{
total:0,
total_yesterday:0,
user_total:0,
user_yesterday:0,
},
welfare:{
available:0,
frozen:0,
platform:0,
total:0,
total_yesterday:0
},
}
},
methods:{
getStatisticListHandle(){
getStatisticList().then(res=>{
Object.keys(res.data).forEach(item=>{
Object.keys(res.data[item]).forEach(i=>{
this.$set(this[item],i,res.data[item][i])
})
})
})
}
},
created(){
this.getStatisticListHandle()
}
}
</script>
<style lang="scss" scoped>
.statistic{
padding: 20px 10px;
.contentContainer{
.section{
display: flex;
align-items: center;
margin: 40px 0;
.sectionTitle{
font-size: 18px;
font-weight: bold;
width: 160px;
flex-shrink: 0;
}
.content{
display: flex;
.sectionDesc{
width:200px;
.num{
font-size: 24px;
margin-top: 8px;
}
}
}
}
}
}
</style>

@ -469,9 +469,9 @@
/> />
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="商品列表" :visible.sync="shopDialog" width="80%"> <el-dialog title="商品列表" @close="openHandle" :visible.sync="shopDialog" width="80%">
<el-table :data="shopList" height="calc(60vh)" style="width: 100%" @selection-change="handleSelectionChange" > <el-table ref="tableShop" row-key="product_id" :data="shopList" height="calc(60vh)" style="width: 100%" @selection-change="handleSelectionChange" >
<el-table-column type="selection" v-if="handleName=='allshop'" width="55"></el-table-column> <el-table-column type="selection" :reserve-selection="true" v-if="handleName=='allshop'" width="55"></el-table-column>
<el-table-column type="index" label="序号"></el-table-column> <el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="store_name" align="center" label="商品名称"></el-table-column> <el-table-column prop="store_name" align="center" label="商品名称"></el-table-column>
<el-table-column prop="price" align="center" label="商品价格"></el-table-column> <el-table-column prop="price" align="center" label="商品价格"></el-table-column>
@ -590,6 +590,12 @@ export default {
this.getList(1); this.getList(1);
}, },
methods: { methods: {
openHandle(){
this.$nextTick(()=>{
this.$refs.tableShop.clearSelection()
})
},
handleSelectionChange(val){ handleSelectionChange(val){
this.multipleSelection = val.map(item=>{ this.multipleSelection = val.map(item=>{

@ -3,26 +3,38 @@
<el-card class="box-card"> <el-card class="box-card">
<div class="search"> <div class="search">
<div class="input"> <div class="input">
<span>转让记录/收款记录</span> <span>赠送方手机号</span>
<el-input v-model="account"></el-input> <el-input v-model="account"></el-input>
</div> </div>
<el-button size="small" style="margin-left:20px;" type="primary">查询</el-button> <el-button size="small" style="margin-left:20px;" type="primary">查询</el-button>
<el-button size="small" type="info">重置</el-button> <el-button size="small" type="info">重置</el-button>
</div> </div>
<div class="info">惠通宝当前市值10</div> <div class="info">惠通宝当前市值{{huitong}}</div>
<el-table :data="tableData" style="width: 100%;"> <el-table :data="tableData" style="width: 100%;">
<el-table-column prop="date" label="转让账户"></el-table-column> <el-table-column prop="user_phone" label="转让账户"></el-table-column>
<el-table-column prop="date" label="收款账户"></el-table-column> <el-table-column prop="to_phone" label="收款账户"></el-table-column>
<el-table-column prop="date" label="转让数量"></el-table-column> <el-table-column prop="count" label="转让数量"></el-table-column>
<el-table-column prop="date" label="转让时间"></el-table-column> <el-table-column prop="create_time" label="转让时间"></el-table-column>
</el-table> </el-table>
<div style="text-align: right;">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {getHuitongbao} from '@/api/statistic'
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | CRMEB [ CRMEB ] // | CRMEB [ CRMEB ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
@ -42,15 +54,38 @@
data() { data() {
return { return {
account:'', account:'',
tableData:[] tableData:[],
pageIndex:1,
pageSize:10,
total:0,
huitong:0,
} }
}, },
mounted() { mounted() {
this.getHuitongbaoHandle()
}, },
methods: { methods: {
handleCurrentChange(val){
this.pageIndex = val;
this.getHuitongbaoHandle()
},
handleSizeChange(val){
this.pageSize = val;
this.getHuitongbaoHandle()
},
getHuitongbaoHandle(){
let params = {
page:this.pageIndex,
limit:this.pageSize,
phone:this.account
}
getHuitongbao(params).then(res=>{
console.log(res,"99")
this.tableData = res.data.list;
this.total = res.data.count;
this.huitong = res.data.huitong
})
}
} }
} }
</script> </script>

Loading…
Cancel
Save