gorden před 4 měsíci
rodič
revize
610eb5e4fa
1 změnil soubory, kde provedl 11 přidání a 1 odebrání
  1. 11 1
      app/admin/controller/order/WholeController.php

+ 11 - 1
app/admin/controller/order/WholeController.php

@@ -65,10 +65,17 @@ class WholeController extends Curd
         }
         $order = $request->get('order', 'desc');
         $field = $field ?? 'order_addtimes';
+
+        if (in_array($where['order_status_system'],['WAITING','SENDING','RECVING','SIGNED','CONFIRM'])){
+            // $where['order_is_complete'] = 'N';
+        }
+
         if (!empty($where['order_status_system']) && $where['order_status_system'] == 'RETURN') {
             unset($where['order_status_system']);
+            unset($where['order_is_complete']);
             $where['order_category'] = 'RETURN';
         }
+
         $query = $this->doSelect($where, $field, $order);
         return $this->doFormat($query, $format, $limit);
     }
@@ -87,6 +94,9 @@ class WholeController extends Curd
             },
             'return' => function($query){
                 $query->select('orders_return_id','join_return_order_id', 'order_return_status');
+            },
+            'express' => function($query){
+                $query->select('orders_return_id','join_return_order_id', 'order_return_status');
             }
         ]);
         foreach ($where as $column => $value) {
@@ -523,7 +533,6 @@ class WholeController extends Curd
             return json_success('创建订单成功');
         } catch (\Exception $e) {
             Db::rollBack();
-            dump($e->getFile().'|'.$e->getLine());
             dump($e->getMessage());
             return json_fail('创建订单失败');
         }
@@ -549,6 +558,7 @@ class WholeController extends Curd
                 'order_amount_total' => $params['order_sheet_amount'],
                 'order_amount_pay' => $params['order_sheet_pay'],
                 'order_category' => 'SYSTEM',
+                'order_is_complete' => 'N',
                 'order_status_system' => $params['order_status_system'],
                 'order_status_payment' => $params['order_status_payment'],
                 'order_status_storage' => $params['order_status_storage'],