Commit e2fdae31 authored by guoyou's avatar guoyou

员工业绩报表

parent 1df1973b
import fetch from 'utils/fetch'; import fetch from 'utils/fetch';
// 员工业绩报表
export function total_statistics(query) {
return fetch({
url: 'api/order/admin/staff_statistics/total_statistics',
method: 'post',
data: query
});
}
export function getDate(query) { export function getDate(query) {
return fetch({ return fetch({
url: 'api/order/admin/staff_statistics/page', url: 'api/admin/staff_statistics/page',
method: 'post', method: 'post',
data: query data: query
}); });
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
<p>员工总数(人)</p> <p>员工总数(人)</p>
</li> </li>
<li> <li>
<p>{{information.totalRoyaltyAmount}}</p> <p>{{information.totalSellAmount}}</p>
<p>员工销售额(元)</p> <p>员工销售额(元)</p>
</li> </li>
<li> <li>
<p>{{information.totalSellAmount}}</p> <p>{{information.totalRoyaltyAmount}}</p>
<p>员工App提成总额(元)</p> <p>员工App提成总额(元)</p>
</li> </li>
</ul> </ul>
...@@ -69,12 +69,11 @@ ...@@ -69,12 +69,11 @@
</template> </template>
<script> <script>
import { getAll } from 'api/base_info/branch_company/' import { getAll } from 'api/base_info/branch_company/'
import { total_statistics, getDate } from 'api/statistics' import { getDate } from 'api/statistics'
import { getrewardSetting } from 'api/purseManage' import { getrewardSetting } from 'api/purseManage'
export default { export default {
created() { created() {
this.statistics()
this.getList() this.getList()
this.getCompany() this.getCompany()
this.getrewardSettingFn() this.getrewardSettingFn()
...@@ -117,12 +116,10 @@ export default { ...@@ -117,12 +116,10 @@ export default {
this.listquery.startDate = value[0] + ' 00:00:00' this.listquery.startDate = value[0] + ' 00:00:00'
this.listquery.endDate = value[1] + ' 23:59:59' this.listquery.endDate = value[1] + ' 23:59:59'
this.getList() this.getList()
this.statistics()
} else { } else {
this.listquery.startDate = null this.listquery.startDate = null
this.listquery.endDate = null this.listquery.endDate = null
this.getList() this.getList()
this.statistics()
} }
}, },
//分公司筛选 //分公司筛选
...@@ -131,33 +128,27 @@ export default { ...@@ -131,33 +128,27 @@ export default {
this.listquery.companyIds = [this.company] this.listquery.companyIds = [this.company]
this.listquery.page = 1 this.listquery.page = 1
this.getList() this.getList()
this.statistics()
} else { } else {
this.listquery.companyIds = null this.listquery.companyIds = null
this.listquery.page = 1 this.listquery.page = 1
this.getList() this.getList()
this.statistics()
} }
}, },
//身份筛选 //身份筛选
changeStaff() { changeStaff() {
this.listquery.page = 1 this.listquery.page = 1
this.getList() this.getList()
this.statistics()
},
//统计数据
statistics() {
total_statistics(this.listquery).then(data => {
this.information = data.data
})
}, },
//列表数据 //列表数据
getList() { getList() {
this.loading = true this.loading = true
getDate(this.listquery).then(data => { getDate(this.listquery).then(data => {
if (data.status == 200) { if (data.status == 200) {
this.tableData = data.data.data this.tableData = data.data.page.data
this.total = data.data.totalCount this.total = data.data.page.totalCount
if (data.data.page.pageNum == 1) {
this.information = data.data.total
}
} }
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
......
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