6
0
Fork 0

完善统计

release
vine_liutk 2021-12-31 14:52:55 +08:00
parent 88c59afa80
commit 811db428e5
2 changed files with 11 additions and 15 deletions

View File

@ -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'),
]);
}

View File

@ -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=>'已取消',