shish 2 ay önce
ebeveyn
işleme
a0872232b4
1 değiştirilmiş dosya ile 26 ekleme ve 23 silme
  1. 26 23
      app-hd/controllers/ConsoleController.php

+ 26 - 23
app-hd/controllers/ConsoleController.php

@@ -20,13 +20,13 @@ class ConsoleController extends BaseController
     //总览
     public function actionStat()
     {
-		//不要用缓存!!!
+        //不要用缓存!!!
 
-		$itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,avCost,cost,virtualStock,delStatus', null, true);
-		$totalItemNum = 0;
-		$totalCost = 0;
-		if (!empty($itemList)) {
-			foreach ($itemList as $item) {
+        $itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,avCost,cost,virtualStock,delStatus', null, true);
+        $totalItemNum = 0;
+        $totalCost = 0;
+        if (!empty($itemList)) {
+            foreach ($itemList as $item) {
                 if ($item->virtualStock == 0 && $item->delStatus == 0) {
                     $stock = $item->stock ?? 0;
                     $cost = $item->avCost ?? 0;
@@ -34,22 +34,22 @@ class ConsoleController extends BaseController
                     $currentCost = bcmul($stock, $cost, 2);
                     $totalCost = bcadd($currentCost, $totalCost, 2);
                 }
-			}
-		}
-		$totalItemNum = floor($totalItemNum);
-		$goodsCount = GoodsClass::getCount(['mainId'=>$this->mainId]);
-		$customCount = CustomClass::getCount(['shopId'=>$this->shopId]);
-		$orderCount = OrderClass::getCount(['mainId'=>$this->mainId, 'status'=>4]);
-		$debtCount = OrderClass::debtCount($this->mainId);
-		$overview = [
-			['name' => "花材数", "url" => '/admin/stat/stock', 'value' => $totalItemNum, 'type' => 1],
-			['name' => "花材值", "url" => '/admin/stat/stock', 'value' => $totalCost, 'type' => 1],
-			['name' => "花束", "url" => '/admin/goods/list', 'value' => $goodsCount, 'type' => 1],
-			['name' => "总客户", "url" => '/admin/home/member', 'value' => $customCount, 'type' => 1],
-			['name' => "总订单", "url" => '/admin/home/order', 'value' => $orderCount, 'type' => 4],
-			['name' => "总挂账", "url" => '/admin/home/order', 'value' => $debtCount, 'type' => 4],
-		];
-		util::success(['overview' => $overview]);
+            }
+        }
+        $totalItemNum = floor($totalItemNum);
+        $goodsCount = GoodsClass::getCount(['mainId' => $this->mainId]);
+        $customCount = CustomClass::getCount(['shopId' => $this->shopId]);
+        $orderCount = OrderClass::getCount(['mainId' => $this->mainId, 'status' => 4]);
+        $debtCount = OrderClass::debtCount($this->mainId);
+        $overview = [
+            ['name' => "花材数", "url" => '/admin/stat/stock', 'value' => $totalItemNum, 'type' => 1],
+            ['name' => "花材值", "url" => '/admin/stat/stock', 'value' => $totalCost, 'type' => 1],
+            ['name' => "花束", "url" => '/admin/goods/list', 'value' => $goodsCount, 'type' => 1],
+            ['name' => "总客户", "url" => '/admin/home/member', 'value' => $customCount, 'type' => 1],
+            ['name' => "总订单", "url" => '/admin/home/order', 'value' => $orderCount, 'type' => 4],
+            ['name' => "总挂账", "url" => '/admin/home/order', 'value' => $debtCount, 'type' => 4],
+        ];
+        util::success(['overview' => $overview]);
     }
 
     //概况 ssh 2019.12.19
@@ -109,12 +109,15 @@ class ConsoleController extends BaseController
         $lookMoney = \bizGhs\shop\classes\ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
 
         $warning = '';
-        //$warning = '本月4号凌晨4点~5点系统升级,暂停使用';
+        $warningUrl = '';
+        $warning = '结账功能重大调整 点击查看 >';
+        $warningUrl = '/admin/notice/warning';
 
         util::success([
             'asset' => $this->main,
             'notice' => [],
             'warning' => $warning,
+            'warningUrl' => $warningUrl,
             'todayData' => [
                 'visit' => $visitCustom,
                 'income' => $todaySale,