gorden vor 17 Stunden
Ursprung
Commit
6d01dcda94

+ 1 - 1
app/admin/controller/coupon/CardMainController.php

@@ -396,7 +396,7 @@ class CardMainController extends Curd
             // 已激活统计
             $usedTotal = Card::where('card_status', 'USED')->where('join_card_main_id', $total['card_main_id'])->count();
             $statistics['used']['total'] += $usedTotal;
-            $statistics['used']['amount'] = sprintf('%.2f', $usedTotal * $total['card_main_amount']);
+            $statistics['used']['amount'] = sprintf('%.2f', $usedTotal * $total['card_main_amount'] + $statistics['used']['amount']);
             // 使用完成统计
             $doneTotal = Card::where('card_status', 'DONE')->where('join_card_main_id', $total['card_main_id'])->count();
             $statistics['done']['total'] += $doneTotal;

+ 2 - 2
app/admin/controller/finance/CardController.php

@@ -33,8 +33,8 @@ class CardController
             $query->whereBetween('card_main_addtimes', $addtimes);
         });
         $total = $cardMain->count();
-        $rows = $cardMain->select('card_main_id', 'card_main_amount')
-            ->orderBy('card_addtimes', 'DESC')
+        $rows = $cardMain->select('card_main_id', 'card_main_amount','card_main_name')
+            ->orderBy('card_main_addtimes', 'DESC')
             ->forPage($page, $pageSize)
             ->get()
             ->toArray();

+ 6 - 0
route/admin.php

@@ -209,6 +209,12 @@ Route::group('/admin', function () {
         })->middleware([
             \app\middleware\AdminAuthCheck::class
         ]);
+        /* 储值卡管理 */
+        Route::group('/card', function () {
+            Route::get('/list', [\app\admin\controller\finance\CardController::class, 'list']);
+        })->middleware([
+            \app\middleware\AdminAuthCheck::class
+        ]);
     });
     /* 系统管理中心 */
     Route::group('/sys', function () {