|
|
@@ -22,13 +22,6 @@ class ConsoleController extends BaseController
|
|
|
//总览
|
|
|
public function actionStat()
|
|
|
{
|
|
|
- $where = ['shopId' => $this->shopId, 'debt' => 1]; // 重新赋值
|
|
|
- $pfDebt = OrderClass::sum($where, 'remainDebtPrice'); // 总欠款
|
|
|
- $pfDebt = $pfDebt === null ? 0 : $pfDebt;
|
|
|
- $lsDebt = \bizHd\order\classes\OrderClass::sum(['mainId' => $this->mainId, 'debt' => 1], 'remainDebtPrice');
|
|
|
- $lsDebt = $lsDebt === null ? 0 : $lsDebt;
|
|
|
- $totalDebt = bcadd($pfDebt, $lsDebt, 2);
|
|
|
-
|
|
|
$itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,cost,virtualStock,delStatus', null, true);
|
|
|
$totalItemNum = 0;
|
|
|
$totalCost = 0;
|
|
|
@@ -52,7 +45,7 @@ class ConsoleController extends BaseController
|
|
|
$overview = [
|
|
|
['name' => "库存数", "url" => '/admin/stat/stock', 'value' => $totalItemNum, 'type' => 1],
|
|
|
['name' => "库存值", "url" => '/admin/stat/stock', 'value' => $totalCost, 'type' => 1],
|
|
|
- ['name' => "总赊账", "url" => '/admin/shop/debtChange', 'value' => $totalDebt, 'type' => 1],
|
|
|
+ ['name' => "总赊账", "url" => '/admin/custom/showTotalBalance', 'value' => '查看', 'type' => 1],
|
|
|
['name' => "总客户", "url" => '/admin/home/member', 'value' => $totalCustom, 'type' => 4],
|
|
|
['name' => "总访客", "url" => '/admin/home/member', 'value' => $totalVisit, 'type' => 4],
|
|
|
['name' => "总订单", "url" => '/admin/home/order', 'value' => $totalOrder, 'type' => 4],
|