当月核销率
This commit is contained in:
parent
14923603b0
commit
7ddcf51d1f
|
@ -27,14 +27,14 @@
|
||||||
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList">
|
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList">
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="getList(1)"
|
@click="getList(1)"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
||||||
|
@ -77,6 +77,17 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="当月核销率(按订单)" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.month_write_rate }}%
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" width="180" label="当月核销率(按销售额)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.month_write_rate_price }}%
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -88,14 +88,14 @@
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="getList(1)"
|
@click="getList(1)"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
|
|
@ -108,14 +108,14 @@
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="getList(1)"
|
@click="getList(1)"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="getList(1)"
|
@click="getList(1)"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -88,14 +88,14 @@
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="getList(1)"
|
@click="getList(1)"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
|
|
@ -38,8 +38,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/dev-api': { // 接口地址 以 api开头的都走下面的配置
|
'/dev-api': { // 接口地址 以 api开头的都走下面的配置
|
||||||
// target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
|
target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
|
||||||
target: 'http://192.168.0.100:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
|
// target: 'http://192.168.0.100:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
|
||||||
ws: true, // 是否支持 websocket 请求 支持
|
ws: true, // 是否支持 websocket 请求 支持
|
||||||
changeOrigin: true, // 是否启用跨域
|
changeOrigin: true, // 是否启用跨域
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|
|
@ -11,10 +11,16 @@ use support\Request;
|
||||||
|
|
||||||
class DataController extends base
|
class DataController extends base
|
||||||
{
|
{
|
||||||
public function index(Request $request) {
|
/**
|
||||||
$times = $request->get('times');
|
* 获取订单统计数据
|
||||||
$os = $request->get('os');
|
* @param $times
|
||||||
|
* @param $os
|
||||||
|
* @return Orders[]|array|\think\Collection|\think\db\Query[]|\think\model\Collection
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
|
private function orderStatics($times, $os) {
|
||||||
$query = Orders::alias('o')->with('admin')
|
$query = Orders::alias('o')->with('admin')
|
||||||
->leftJoin('admins a','a.id = o.admin_id')
|
->leftJoin('admins a','a.id = o.admin_id')
|
||||||
->order('o.admin_id','desc')
|
->order('o.admin_id','desc')
|
||||||
|
@ -23,19 +29,19 @@ class DataController extends base
|
||||||
count(o.id) as orders,
|
count(o.id) as orders,
|
||||||
SUM(o.total_price) as total_price,
|
SUM(o.total_price) as total_price,
|
||||||
SUM(CASE
|
SUM(CASE
|
||||||
WHEN (o.os = 1 AND o.order_status = 4) OR (o.os = 3 AND o.order_status = 2) OR (o.os = 2 AND o.order_status = 5) THEN 1
|
WHEN (o.os in (1,7) AND o.order_status = 4) OR (o.os in(3,5) AND o.order_status = 2) OR (o.os = 2 AND o.order_status = 5) THEN 1
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END) as assets,
|
END) as assets,
|
||||||
SUM(CASE
|
SUM(CASE
|
||||||
WHEN (o.os = 1 AND o.order_status = 4) OR (o.os = 3 AND o.order_status = 2) OR (o.os = 2 AND o.order_status = 5) THEN asset_price
|
WHEN (o.os in (1,7) AND o.order_status = 4) OR (o.os in(3,5) AND o.order_status = 2) OR (o.os = 2 AND o.order_status = 5) THEN asset_price
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END) as asset_price,
|
END) as asset_price,
|
||||||
SUM(CASE
|
SUM(CASE
|
||||||
WHEN (o.os = 1 AND o.order_status = 5) OR (o.os = 3 AND o.order_status = 4) OR (o.os = 2 AND o.order_status = 1) THEN 1
|
WHEN (o.os in (1,7) AND o.order_status = 5) OR (o.os in(3,5) AND o.order_status = 4) OR (o.os = 2 AND o.order_status = 1) THEN 1
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END) AS nopays,
|
END) AS nopays,
|
||||||
SUM(CASE
|
SUM(CASE
|
||||||
WHEN (o.os = 1 AND o.order_status = 5) OR (o.os = 3 AND o.order_status = 4) OR (o.os = 2 AND o.order_status = 1) THEN actual_price
|
WHEN (o.os in (1,7) AND o.order_status = 5) OR (o.os in(3,5) AND o.order_status = 4) OR (o.os = 2 AND o.order_status = 1) THEN actual_price
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END) AS nopay_price,
|
END) AS nopay_price,
|
||||||
o.admin_id,a.name');
|
o.admin_id,a.name');
|
||||||
|
@ -50,8 +56,12 @@ class DataController extends base
|
||||||
$query->where('o.os', $os);
|
$query->where('o.os', $os);
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = $query->select();
|
return $query->select();
|
||||||
|
}
|
||||||
|
public function index(Request $request) {
|
||||||
|
$times = $request->get('times');
|
||||||
|
$os = $request->get('os');
|
||||||
|
$list = $this->orderStatics($times, $os);
|
||||||
//统计每一列
|
//统计每一列
|
||||||
$totalArr[1] = [
|
$totalArr[1] = [
|
||||||
'write_rate' => 0,
|
'write_rate' => 0,
|
||||||
|
@ -63,6 +73,10 @@ class DataController extends base
|
||||||
'nopays' => 0,
|
'nopays' => 0,
|
||||||
'nopay_price' => 0,
|
'nopay_price' => 0,
|
||||||
'admin_id' => 0,
|
'admin_id' => 0,
|
||||||
|
'm_orders' => 0,
|
||||||
|
'm_total_price' => 0,
|
||||||
|
'm_assets' => 0,
|
||||||
|
'm_asset_price' => 0,
|
||||||
'name' => '合计',
|
'name' => '合计',
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'username' => '合计',
|
'username' => '合计',
|
||||||
|
@ -70,9 +84,29 @@ class DataController extends base
|
||||||
'avatar' => '',
|
'avatar' => '',
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 当月数据统计
|
||||||
|
$currentList = $this->orderStatics([date('Y-m-01'), date('Y-m-d H:i:s')], $os);
|
||||||
|
$currentList = array_column($currentList->toArray(), null, 'admin_id');
|
||||||
foreach ($list as $k => $v) {
|
foreach ($list as $k => $v) {
|
||||||
$list[$k]['write_rate'] = number_format(($v['assets']/$v['orders'])*100,2);
|
$list[$k]['write_rate'] = number_format(($v['assets']/$v['orders'])*100,2);
|
||||||
$list[$k]['write_rate_price'] = number_format(($v['asset_price']/$v['total_price'])*100,2);
|
$list[$k]['write_rate_price'] = number_format(($v['asset_price']/$v['total_price'])*100,2);
|
||||||
|
|
||||||
|
// 当月核销率(按订单)
|
||||||
|
$list[$k]['month_write_rate'] = 0;
|
||||||
|
// 当月核销率(按销售额)
|
||||||
|
$list[$k]['month_write_rate_price'] = 0;
|
||||||
|
if (isset($currentList[$v['admin_id']])) {
|
||||||
|
$currentAdmin = $currentList[$v['admin_id']];
|
||||||
|
$list[$k]['month_write_rate'] = number_format(($currentAdmin['assets']/$currentAdmin['orders'])*100,2);
|
||||||
|
$list[$k]['month_write_rate_price'] = number_format(($currentAdmin['asset_price']/$currentAdmin['total_price'])*100,2);
|
||||||
|
|
||||||
|
$totalArr[1]['m_orders'] += $currentAdmin['orders'];
|
||||||
|
$totalArr[1]['m_total_price'] += $currentAdmin['total_price'];
|
||||||
|
$totalArr[1]['m_assets'] += $currentAdmin['assets'];
|
||||||
|
$totalArr[1]['m_asset_price'] += $currentAdmin['asset_price'];
|
||||||
|
}
|
||||||
|
|
||||||
$totalArr[1]['orders'] += $list[$k]['orders'];
|
$totalArr[1]['orders'] += $list[$k]['orders'];
|
||||||
$totalArr[1]['total_price'] += $list[$k]['total_price'];
|
$totalArr[1]['total_price'] += $list[$k]['total_price'];
|
||||||
$totalArr[1]['assets'] += $list[$k]['assets'];
|
$totalArr[1]['assets'] += $list[$k]['assets'];
|
||||||
|
@ -82,6 +116,8 @@ class DataController extends base
|
||||||
}
|
}
|
||||||
$totalArr[1]['write_rate'] = (float)number_format(($totalArr[1]['assets']/$totalArr[1]['orders'])*100,2);
|
$totalArr[1]['write_rate'] = (float)number_format(($totalArr[1]['assets']/$totalArr[1]['orders'])*100,2);
|
||||||
$totalArr[1]['write_rate_price'] = (float)number_format(($totalArr[1]['asset_price']/$totalArr[1]['total_price'])*100,2);
|
$totalArr[1]['write_rate_price'] = (float)number_format(($totalArr[1]['asset_price']/$totalArr[1]['total_price'])*100,2);
|
||||||
|
$totalArr[1]['month_write_rate'] = (float)number_format(($totalArr[1]['m_assets']/$totalArr[1]['m_orders'])*100,2);
|
||||||
|
$totalArr[1]['month_write_rate_price'] = (float)number_format(($totalArr[1]['m_asset_price']/$totalArr[1]['m_total_price'])*100,2);
|
||||||
$list = array_merge($list->toArray(), $totalArr);
|
$list = array_merge($list->toArray(), $totalArr);
|
||||||
|
|
||||||
$excel = $request->get('excel');
|
$excel = $request->get('excel');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-387ec8a0]{position:relative;padding-bottom:60px}.el-table[data-v-387ec8a0],.filter-container[data-v-387ec8a0]{padding-bottom:5px}
|
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-414c5a51]{position:relative;padding-bottom:60px}.el-table[data-v-414c5a51],.filter-container[data-v-414c5a51]{padding-bottom:5px}
|
|
@ -1 +1 @@
|
||||||
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-6b6b0ada]{position:relative;padding-bottom:60px}.el-table[data-v-6b6b0ada],.filter-container[data-v-6b6b0ada]{padding-bottom:52px}
|
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-6226c3ab]{position:relative;padding-bottom:60px}.el-table[data-v-6226c3ab],.filter-container[data-v-6226c3ab]{padding-bottom:52px}
|
|
@ -1 +1 @@
|
||||||
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-1e421b1e]{position:relative;padding-bottom:60px}.el-table[data-v-1e421b1e],.filter-container[data-v-1e421b1e]{padding-bottom:52px}
|
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-4c275e32]{position:relative;padding-bottom:60px}.el-table[data-v-4c275e32],.filter-container[data-v-4c275e32]{padding-bottom:52px}
|
|
@ -1 +1 @@
|
||||||
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-a4242dbc]{position:relative;padding-bottom:60px}.el-table[data-v-a4242dbc],.filter-container[data-v-a4242dbc]{padding-bottom:52px}
|
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-78a03c33]{position:relative;padding-bottom:60px}.el-table[data-v-78a03c33],.filter-container[data-v-78a03c33]{padding-bottom:52px}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de3a1"],{"856d":function(t,e,l){"use strict";l.r(e);var i=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"filter-container"},[l("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.listQuery.times,callback:function(e){t.$set(t.listQuery,"times",e)},expression:"listQuery.times"}}),l("el-select",{staticClass:"filter-item",attrs:{filterable:"",placeholder:"请选择"},model:{value:t.listQuery.os,callback:function(e){t.$set(t.listQuery,"os",e)},expression:"listQuery.os"}},[l("el-option",{key:"",attrs:{label:"请选择",value:""}}),t._l(t.oss,(function(t,e){return l("el-option",{key:e,attrs:{label:t,value:e}})}))],2),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getList}},[t._v(" 搜索 ")])],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[l("el-table-column",{attrs:{align:"center",fixed:"",label:"姓名",width:"120",prop:"admin.name"}}),l("el-table-column",{attrs:{align:"center",label:"订单数",width:"120",prop:"orders"}}),l("el-table-column",{attrs:{align:"center",label:"订单总金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销数",width:"120",prop:"assets"}}),l("el-table-column",{attrs:{align:"center",label:"核销金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.asset_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"未付款订单",width:"120",prop:"nopays"}}),l("el-table-column",{attrs:{align:"center",label:"未付款金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.nopay_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销率(按订单)",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",width:"180",label:"核销率(按销售额)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate_price)+"% ")]}}])})],1)],1)},a=[],s=l("5530"),n=(l("a15b"),l("d81d"),l("b64b"),{name:"Datalist",data:function(){return{oss:null,list:[],listLoading:!0,listQuery:{}}},created:function(){this.getList()},methods:{getList:function(t){var e=this;if(1!=t)this.listQuery.excel=0,this.$axios.get("/admin/data/index",{params:this.listQuery}).then((function(t){e.list=t.data,e.oss=t.ext.oss,e.listLoading=!1}));else{if(this.listQuery.excel=1,!this.listQuery.times)return void this.$message({message:"请选择日期",type:"warning"});var l=this.listQuery.times[0]instanceof Date,i=Object(s["a"])(Object(s["a"])({},this.listQuery),{},{times:[l?this.listQuery.times[0].toISOString():"",l?this.listQuery.times[1].toISOString():""]});window.open("/admin/data/index?"+this.objectToQuery(i))}},objectToQuery:function(t){return Object.keys(t).map((function(e){var l=t[e];return void 0==l||null==l?"":encodeURIComponent(e)+"="+encodeURIComponent(l)})).join("&")}}}),r=n,o=l("2877"),c=Object(o["a"])(r,i,a,!1,null,null,null);e["default"]=c.exports}}]);
|
|
|
@ -0,0 +1 @@
|
||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de3a1"],{"856d":function(t,e,l){"use strict";l.r(e);var i=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"filter-container"},[l("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.listQuery.times,callback:function(e){t.$set(t.listQuery,"times",e)},expression:"listQuery.times"}}),l("el-select",{staticClass:"filter-item",attrs:{filterable:"",placeholder:"请选择"},model:{value:t.listQuery.os,callback:function(e){t.$set(t.listQuery,"os",e)},expression:"listQuery.os"}},[l("el-option",{key:"",attrs:{label:"请选择",value:""}}),t._l(t.oss,(function(t,e){return l("el-option",{key:e,attrs:{label:t,value:e}})}))],2),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getList}},[t._v(" 搜索 ")]),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}}},[t._v(" 导出 ")])],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[l("el-table-column",{attrs:{align:"center",fixed:"",label:"姓名",width:"120",prop:"admin.name"}}),l("el-table-column",{attrs:{align:"center",label:"订单数",width:"120",prop:"orders"}}),l("el-table-column",{attrs:{align:"center",label:"订单总金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销数",width:"120",prop:"assets"}}),l("el-table-column",{attrs:{align:"center",label:"核销金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.asset_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"未付款订单",width:"120",prop:"nopays"}}),l("el-table-column",{attrs:{align:"center",label:"未付款金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.nopay_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销率(按订单)",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",width:"180",label:"核销率(按销售额)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate_price)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"当月核销率(按订单)",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.month_write_rate)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",width:"180",label:"当月核销率(按销售额)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.month_write_rate_price)+"% ")]}}])})],1)],1)},a=[],n=l("5530"),s=(l("a15b"),l("d81d"),l("b64b"),{name:"Datalist",data:function(){return{oss:null,list:[],listLoading:!0,listQuery:{}}},created:function(){this.getList()},methods:{getList:function(t){var e=this;if(1!=t)this.listQuery.excel=0,this.$axios.get("/admin/data/index",{params:this.listQuery}).then((function(t){e.list=t.data,e.oss=t.ext.oss,e.listLoading=!1}));else{if(this.listQuery.excel=1,!this.listQuery.times)return void this.$message({message:"请选择日期",type:"warning"});var l=this.listQuery.times[0]instanceof Date,i=Object(n["a"])(Object(n["a"])({},this.listQuery),{},{times:[l?this.listQuery.times[0].toISOString():"",l?this.listQuery.times[1].toISOString():""]});window.open("/admin/data/index?"+this.objectToQuery(i))}},objectToQuery:function(t){return Object.keys(t).map((function(e){var l=t[e];return void 0==l||null==l?"":encodeURIComponent(e)+"="+encodeURIComponent(l)})).join("&")}}}),r=s,o=l("2877"),c=Object(o["a"])(r,i,a,!1,null,null,null);e["default"]=c.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue