shish 5 лет назад
Родитель
Сommit
b10e874249

+ 4 - 21
app-ghs/controllers/CustomController.php

@@ -61,27 +61,6 @@ class CustomController extends BaseController
         util::complete();
     }
 
-    //添加新客户 ssh 2021.1.8
-    public function actionAdd()
-    {
-        $post = Yii::$app->request->post();
-        $post['style'] = SjClass::STYLE_RETAIL;
-        $post['from'] = ApplyClass::FROM_GHS;
-        $post['introSjId'] = $this->sjId;
-        $post['introStyle'] = SjClass::STYLE_SUPPLIER;
-        $post['certType'] = ApplyClass::CERT_TYPE_MOBILE;
-        $mobile = $post['mobile'] ?? '';
-        $confirmMobile = $post['confirmMobile'];
-        if (stringUtil::isMobile($mobile) == false) {
-            util::fail(' 请填写正确的手机号');
-        }
-        if ($mobile != $confirmMobile) {
-            util::fail('二次号码填写不一致');
-        }
-        ApplyService::replaceApply($post);
-        util::complete('添加成功,等待审核');
-    }
-
     //欠款客户 ssh 2021.2.4
     public function actionDebtList()
     {
@@ -91,6 +70,10 @@ class CustomController extends BaseController
             $where['name'] = ['like', $get['name']];
         }
         $list = CustomService::getDebtList($where);
+        //共X个客户,合计欠款XXX元
+        $shop = $this->shop;
+        $list['customNum'] = $shop->mayGatheringNum ?? 0;
+        $list['debtAmount'] = $shop->mayGathering ?? 0.00;
         util::success($list);
     }
 

+ 0 - 8
biz-ghs/custom/services/CustomService.php

@@ -65,14 +65,6 @@ class CustomService extends BaseService
         if (empty($list)) {
             return $data;
         }
-        $i = 0;
-        $debtAmount = 0;
-        foreach ($list as $eky => $val) {
-            $i++;
-            $debtAmount = bcadd($debtAmount, $val['debtAmount']);
-        }
-        $data['customNum'] = $i;
-        $data['debtAmount'] = $debtAmount;
         $data['list'] = CustomClass::groupBaseInfo($list);
         return $data;
     }

+ 0 - 12
biz-ghs/order/services/OrderService.php

@@ -197,18 +197,6 @@ class OrderService extends BaseService
     {
         $list = OrderClass::getAllList(['id', 'orderSn', 'actPrice', 'addTime'], $where, 'addTime DESC');
         $respond['list'] = $list;
-        $respond['num'] = 0;
-        $respond['totalAmount'] = 0.00;
-        if (!empty($list)) {
-            $i = 0;
-            $amount = 0.00;
-            foreach ($list as $key => $val) {
-                $i++;
-                $amount = bcadd($amount, $val['actPrice'], 2);
-            }
-            $respond['num'] = $i;
-            $respond['totalAmount'] = $amount;
-        }
         return $respond;
     }