Commit 8ecc5b4e authored by guoyou's avatar guoyou

财务 员工业绩统计

parent e2fdae31
......@@ -751,7 +751,7 @@ export const asyncRouterMap = [{
}, {
path: 'memberPerformance',
component: _import('financial/memberPerformance'),
name: '会员统计报表',
name: '总公司报表',
authority: 'memberPerformance'
}
]
......
<template>
<div class="app-container calendar-list-container" v-loading="loading">
<el-row style="border-bottom:1px dashed #ccc;padding-bottom:20px">
<el-date-picker v-model="time" type="daterange" placeholder="选择日期范围" @change="changeTime"></el-date-picker>
<el-form :inline="true">
<el-form-item label="统计类型" style="width:200px">
<el-radio-group v-model="listquery.radio1">
<el-radio-button label="0">收入</el-radio-button>
<el-radio-button label="1">支出</el-radio-button>
</el-radio-group>
</el-form-item>
<el-select v-model="listquery.userPostionId" clearable placeholder="请选择类型" @change="changeStaff">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button type="primary" :loading="excelLoading" @click="downloadExcel">导出报表</el-button>
<el-date-picker v-model="time" type="daterange" placeholder="选择日期范围" @change="changeTime"></el-date-picker>
<el-select
v-model="listquery.userPostionId"
clearable
placeholder="请选择订单类型"
@change="changeStaff"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button type="primary" :loading="excelLoading" @click="downloadExcel">导出报表</el-button>
</el-form>
</el-row>
<div class="information">
......@@ -14,16 +28,15 @@
<ul>
<li>
<p>{{information.staffNum}}</p>
<p>会员订单数(单)</p>
<p>订单总量</p>
</li>
<li>
<p>{{information.totalRoyaltyAmount}}</p>
<p>会员费(元)</p>
<p>应退还金额</p>
</li>
<li>
<p class="memberClass">钻石会员:3单/600.00.00元</p>
<p class="memberClass">黄金会员:3单/600.00.00元</p>
<p class="memberClass">普通会员:3单/600.00.00元</p>
<p>{{information.totalRoyaltyAmount}}</p>
<p>实际退还</p>
</li>
</ul>
</div>
......@@ -60,12 +73,11 @@
</div>
</template>
<script>
import { total_statistics, getDate } from 'api/statistics'
import { getDate } from 'api/statistics'
import { getrewardSetting } from 'api/purseManage'
export default {
created() {
this.statistics()
this.getList()
},
data() {
......@@ -76,25 +88,31 @@ export default {
time: [],
tableData: [], //表格数据
excelLoading: false, //导出loading
options: [{
id:'0',
name:'首次购买'
},{
id:'1',
name:'续费'
},{
id:'2',
name:'激活'
},{
id:'3',
name:'付费'
}], //身份
options: [
{
id: '0',
name: '首次购买'
},
{
id: '1',
name: '续费'
},
{
id: '2',
name: '激活'
},
{
id: '3',
name: '付费'
}
], //身份
listquery: {
startDate: null, //开始日期
endDate: null, //结束日期
userPostionId: null, //身份
page: 1,
limit: 10
limit: 10,
radio1:0
}
}
},
......@@ -115,38 +133,29 @@ export default {
this.listquery.startDate = value[0] + ' 00:00:00'
this.listquery.endDate = value[1] + ' 23:59:59'
this.getList()
this.statistics()
} else {
this.listquery.startDate = null
this.listquery.endDate = null
this.getList()
this.statistics()
}
},
//身份筛选
changeStaff() {
this.listquery.page = 1
this.getList()
this.statistics()
},
//统计数据
statistics() {
total_statistics(this.listquery).then(data => {
this.information = data.data
})
},
//列表数据
getList() {
this.loading = true
getDate(this.listquery).then(data => {
if (data.status == 200) {
this.tableData = data.data.data
this.total = data.data.totalCount
}
setTimeout(() => {
this.loading = false
}, 300)
})
// this.loading = true
// getDate(this.listquery).then(data => {
// if (data.status == 200) {
// this.tableData = data.data.data
// this.total = data.data.totalCount
// }
// setTimeout(() => {
// this.loading = false
// }, 300)
// })
},
//导出
downloadExcel() {
......@@ -182,7 +191,4 @@ export default {
.information li:last-child {
border: none;
}
.memberClass{
font-size: 14px;
}
</style>
\ No newline at end of file
......@@ -2,7 +2,13 @@
<div class="app-container calendar-list-container" v-loading="loading">
<el-row style="border-bottom:1px dashed #ccc;padding-bottom:20px">
<el-date-picker v-model="time" type="daterange" placeholder="选择日期范围" @change="changeTime"></el-date-picker>
<el-select v-model="company" filterable placeholder="请选择公司" @change="changeCompany" clearable>
<el-select
v-model="listquery.companyId"
filterable
placeholder="请选择公司"
@change="changeCompany"
clearable
>
<el-option v-for="item in allCompaniesArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select v-model="listquery.userPostionId" clearable placeholder="请选择身份" @change="changeStaff">
......@@ -29,12 +35,28 @@
</ul>
</div>
<el-table :data="tableData" border style="width: 100%" header-align="center" height="450">
<el-table
:data="tableData"
border
style="width: 100%"
header-align="center"
height="450"
@select="choose"
@select-all="chooseAll"
>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="80" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="员工姓名" align="center"></el-table-column>
<el-table-column prop="companyNames" label="所属公司" align="center"></el-table-column>
<el-table-column prop="postionNames" label="身份" align="center"></el-table-column>
<el-table-column prop="companyNames" label="所属公司" align="center">
<template scope="scope">
<span v-for="(item,index) in scope.row.companyNames" :key="index" style="margin-left:10px">{{item}}</span>
</template>
</el-table-column>
<el-table-column prop="postionNames" label="身份" align="center">
<template scope="scope">
<span v-for="(item,index) in scope.row.postionNames" :key="index" style="margin-left:10px">{{item}}</span>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" align="center"></el-table-column>
<el-table-column prop="sellAmount" label="销售额(元)" align="center"></el-table-column>
<el-table-column prop="royaltyAmount" label="APP提成(5%)" width="100px" align="center"></el-table-column>
......@@ -92,18 +114,29 @@ export default {
listquery: {
startDate: null, //开始日期
endDate: null, //结束日期
companyIds: null, //公司
companyId: null, //公司
userPostionId: null, //身份
page: 1,
limit: 10
limit: 10,
isExport: false
}
}
},
methods: {
//全选
chooseAll(arr) {
console.log(arr)
},
//多选
choose(val, row) {
console.log(val)
},
//页码
handleSizeChange(val) {
this.listquery.limit = val
this.getList()
},
//分页
handleCurrentChange(val) {
this.listquery.page = val
this.getList()
......@@ -124,15 +157,8 @@ export default {
},
//分公司筛选
changeCompany(val) {
if (this.company) {
this.listquery.companyIds = [this.company]
this.listquery.page = 1
this.getList()
} else {
this.listquery.companyIds = null
this.listquery.page = 1
this.getList()
}
this.listquery.page = 1
this.getList()
},
//身份筛选
changeStaff() {
......
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