完善统计
parent
88c59afa80
commit
811db428e5
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
namespace App\Admin\Metrics;
|
||||
|
||||
use App\Models\Balance;
|
||||
use App\Models\DistributionPreIncome;
|
||||
use App\Models\UserInfo;
|
||||
use App\Models\Wallet;
|
||||
use Dcat\Admin\Widgets\Metrics\RadialBar;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
|
@ -17,14 +21,6 @@ class StatisticsTotal extends RadialBar
|
|||
$this->title('统计预览');
|
||||
$this->height(320);
|
||||
$this->contentWidth(12, 0);
|
||||
|
||||
// $this->chartLabels('Completed Tickets');
|
||||
// $this->dropdown([
|
||||
// '7' => 'Last 7 Days',
|
||||
// '28' => 'Last 28 Days',
|
||||
// '30' => 'Last Month',
|
||||
// '365' => 'Last Year',
|
||||
// ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -38,12 +34,12 @@ class StatisticsTotal extends RadialBar
|
|||
{
|
||||
// 卡片内容
|
||||
$this->withContent([
|
||||
'total_points'=> 999999999,
|
||||
'total_wallet'=> 999999999.99,
|
||||
'total_balance'=> 999999999.99,
|
||||
'total_distribution'=> 999999999.99,
|
||||
'total_quota_v2' => 999999999.99,
|
||||
'total_quota_v1' => 999999999.99,
|
||||
'total_points'=> UserInfo::sum('points'),
|
||||
'total_wallet'=> bcdiv(Wallet::sum('balance'), 100, 2),
|
||||
'total_balance'=> bcdiv(Balance::sum('balance'), 100, 2),
|
||||
'total_distribution'=> DistributionPreIncome::unsettlement()->sum('total_revenue'),
|
||||
'total_quota_v2' => UserInfo::sum('quota_v2'),
|
||||
'total_quota_v1' => UserInfo::sum('quota_v1'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class AfterSale extends Model
|
|||
self::STATE_APPLY=>'待补充资料',
|
||||
self::STATE_VERIFY=>'待处理',
|
||||
self::STATE_AGREE=>'待确认',
|
||||
self::STATE_SHIPPING=>'待收货',
|
||||
self::STATE_SHIPPING=>'待验收',
|
||||
self::STATE_FINANCE=>'待审核',
|
||||
self::STATE_FINISH=>'已完成',
|
||||
self::STATE_CANCEL=>'已取消',
|
||||
|
|
|
|||
Loading…
Reference in New Issue