فهرست منبع

新订单列表详情

shizhongqi 4 سال پیش
والد
کامیت
3131546d7b
1فایلهای تغییر یافته به همراه48 افزوده شده و 0 حذف شده
  1. 48 0
      app-ghs/controllers/OrderController.php

+ 48 - 0
app-ghs/controllers/OrderController.php

@@ -625,6 +625,54 @@ class OrderController extends BaseController
         util::success($respond);
     }
 
+    // 新订单列表详情 -- 可能与 actionList 很相似,但为不影响 actionList,重新创建个方法 shizhongqi 2022.06.23
+    public function actionNewOrderList()
+    {
+        $get = Yii::$app->request->get();
+        $status = $get['status'] ?? 0;
+        if (!empty($status)) {
+            $where['status'] = $status;
+        }
+        $where['sjId'] = $this->sjId;
+        if (isset($get['shopId'])) {
+            $shopId = $get['shopId'] ?? 0;
+            if (!empty($shopId)) {
+                $where['shopId'] = $this->shopId;
+            }
+        } else {
+            $where['shopId'] = $this->shopId;
+        }
+        $searchTime = $get['searchTime'] ?? '';
+        if (!empty($searchTime)) {
+            $startTime = $get['startTime'] ?? '';
+            $endTime = $get['endTime'] ?? '';
+            $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
+            $where['addTime'] = ['between', [$period['startTime'], $period['endTime']]];
+        }
+        $name = $get['name'] ?? '';
+        if (!empty($name)) {
+            $searchType = $get['searchType'] ?? 0;
+            if (empty($searchType)) {
+                //订单编号
+                if (strpos($name, 'XSD') === 0) {
+                    $where['orderSn'] = $name;
+                } elseif (preg_match("/^[a-zA-Z\s]+$/", $name)) {
+                    $where['customNamePy'] = ['like', $name];
+                } else {
+                    $where['customName'] = ['like', $name];
+                }
+            } elseif ($searchType == 1) {
+                $where['sendNum'] = $name;
+            } else {
+
+            }
+        }
+        $respond = OrderClass::getOrderList($where);
+        $respond['shop'] = $this->shop;
+        $respond['shopExt'] = $this->shopExt;
+        util::success($respond);
+    }
+
     //商城下单操作 ssh 2021.1.14
     public function actionCreateOrder()
     {