Преглед изворни кода

Merge branch 'master' into dev

shish пре 3 дана
родитељ
комит
352e7b1e4c

+ 4 - 2
app-ghs/controllers/ExpendController.php

@@ -37,8 +37,10 @@ class ExpendController extends BaseController
         $currentEndTime = $currentEndDate . ' 23:59:59';
         $currentEndTime = $currentEndDate . ' 23:59:59';
 
 
         $where = ['mainId' => $this->mainId];
         $where = ['mainId' => $this->mainId];
-        // 汇总默认按记账时间 payTime(与列表默认一致)
-        $where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
+        // timeType=pay(默认记账 payTime)/ send(发生 sendTime)
+        $timeType = isset($get['timeType']) ? strval($get['timeType']) : 'pay';
+        $timeField = ($timeType === 'send') ? 'sendTime' : 'payTime';
+        $where[$timeField] = ['between', [$currentStartTime, $currentEndTime]];
         $where['delStatus'] = 0; //过滤掉已删除的
         $where['delStatus'] = 0; //过滤掉已删除的
         $list = ExpendClass::getAllByCondition($where, null, '*', null);
         $list = ExpendClass::getAllByCondition($where, null, '*', null);
         $arr = [];
         $arr = [];

+ 6 - 1
app-ghs/controllers/PurchaseController.php

@@ -75,6 +75,11 @@ class PurchaseController extends BaseController
         }
         }
         $respond = PurchaseOrderService::getDebtList($where);
         $respond = PurchaseOrderService::getDebtList($where);
         $respond['ghsInfo'] = $info;
         $respond['ghsInfo'] = $info;
+
+        $shop = $this->shop;
+        $pfLevel = $shop->pfLevel ?? 0;
+        $respond['pfLevel'] = $pfLevel;
+
         util::success($respond);
         util::success($respond);
     }
     }
 
 
@@ -85,7 +90,7 @@ class PurchaseController extends BaseController
         if (getenv('YII_ENV') == 'production') {
         if (getenv('YII_ENV') == 'production') {
             //小向花卉采购的结账确认,有多处,关键词ghs_cg_clear_confirm
             //小向花卉采购的结账确认,有多处,关键词ghs_cg_clear_confirm
             if (in_array($this->mainId, [23390, 24516])) {
             if (in_array($this->mainId, [23390, 24516])) {
-                if (!in_array($this->adminId, [24655,77951])) {
+                if (!in_array($this->adminId, [24655, 77951])) {
                     util::fail('不能操作哦');
                     util::fail('不能操作哦');
                 }
                 }
             }
             }

+ 5 - 0
app-ghs/controllers/PurchaseOrderController.php

@@ -817,6 +817,11 @@ class PurchaseOrderController extends BaseController
             'finishNum' => 0,
             'finishNum' => 0,
         ];
         ];
         $data = array_merge($data, $statData);
         $data = array_merge($data, $statData);
+
+        $shop = $this->shop;
+        $pfLevel = $shop->pfLevel ?? 0;
+        $data['pfLevel'] = $pfLevel;
+
         util::success($data);
         util::success($data);
     }
     }