shish 5 сар өмнө
parent
commit
0a25311779

+ 29 - 9
app-ghs/controllers/CustomController.php

@@ -147,7 +147,7 @@ class CustomController extends BaseController
         if (getenv('YII_ENV') == 'production') {
             //小向花卉
             if (in_array($this->shopId, [23580, 24713])) {
-                if (!in_array($this->adminId, [23960,77951,4])) {
+                if (!in_array($this->adminId, [23960, 77951, 4])) {
                     util::fail('不能销单哦!!');
                 }
             }
@@ -820,19 +820,21 @@ class CustomController extends BaseController
         $respond = CustomService::getCustomSortList($where, $sort);
 
         if (getenv('YII_ENV') == 'production') {
-            //源花汇,只有指定的人,才能看累计消费和挂账金额
+            //源花汇,只有指定的人,才能看累计消费和挂账金额,有多处要同步修改 manage_custom_data
             $hideMainId = 10536;
-            $hideAdminIds = [18505,15187,11961,11648,11644,11641,4];
-        }else{
-            $hideMainId = 0;
+            $hideAdminIds = [18505, 15187, 11961, 11648, 11644, 11641, 11976, 4];
+        } else {
+            $hideMainId = 644;
             $hideAdminIds = [0];
         }
-        if($this->mainId == $hideMainId){
-            if(!empty($respond['list'])){
-                foreach($respond['list'] as $k=>$v){
-                    if(!in_array($this->adminId,$hideAdminIds) ){
+        if ($this->mainId == $hideMainId) {
+            if (!empty($respond['list'])) {
+                foreach ($respond['list'] as $k => $v) {
+                    if (!in_array($this->adminId, $hideAdminIds)) {
                         $respond['list'][$k]['buyAmount'] = 0;
                         $respond['list'][$k]['remainDebtAmount'] = 0;
+                        $respond['list'][$k]['debtAmount'] = 0;
+                        $respond['list'][$k]['balance'] = 0;
                     }
                 }
             }
@@ -872,6 +874,24 @@ class CustomController extends BaseController
         $superName = $superInfo['name'] ?? '';
         $currentSuper = ['name' => $superName];
         $info['superInfo'] = $currentSuper;
+
+        if (getenv('YII_ENV') == 'production') {
+            //源花汇,只有指定的人,才能看累计消费和挂账金额,有多处要同步修改 manage_custom_data
+            $hideMainId = 10536;
+            $hideAdminIds = [18505, 15187, 11961, 11648, 11644, 11641, 11976, 4];
+        } else {
+            $hideMainId = 644;
+            $hideAdminIds = [0];
+        }
+        if ($this->mainId == $hideMainId) {
+            if (!in_array($this->adminId, $hideAdminIds)) {
+                $info['buyAmount'] = 0;
+                $info['debtAmount'] = 0;
+                $info['remainDebtAmount'] = 0;
+                $info['balance'] = 0;
+            }
+        }
+
         util::success($info);
     }