Przeglądaj źródła

结算端 订单列表增加订单状态筛选

kevin_zhangl 3 lat temu
rodzic
commit
9fea44f169

+ 1 - 1
backendApi/modules/v1/controllers/ShopController.php

@@ -373,7 +373,7 @@ class ShopController extends BaseController {
             'CREATED_AT'=> 'O.CREATED_AT',
             'STATUS' => 'O.STATUS',
         ]);
-        $condition = $filter['condition'];
+        $condition = ' 1=1 ' . $filter['condition'];
         $params = $filter['params'];
         $condition .= $condition ? ' AND O.IS_DELETE=0' : ' O.IS_DELETE=0';
         $listObj = new OrderList();

+ 8 - 3
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -103,8 +103,8 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'header' => 'Order code',//订单号
                     'headerOther' => ['width' => '200'],
                 ],
-                'STATUS' => null,
-                'STATUS_NAME' => [
+//                'STATUS' => null,
+                'STATUS' => [
                     'header' => 'Order status',//订单状态
                     'headerOther' => [
                         'width' => '110',
@@ -358,7 +358,12 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'MOBILE'=> ['name'=> 'Contact 1'],//联系方式1
                 'PERIOD_NUM'=> ['name'=> 'Number of periods'],//期数
                 'CREATED_AT'=> ['name'=> 'Creation time', 'other'=>'date'],//创建时间
-                'STATUS'=> ['name'=> 'Order status'],
+                'STATUS'=> ['name'=> 'Order status', 'other'=> 'select', 'selectData'=> [
+                    ['id' => \Yii::$app->params['orderStatus']['paid']['value'], 'name' => \Yii::$app->params['orderStatus']['paid']['label']],
+                    ['id' => \Yii::$app->params['orderStatus']['notPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['notPaid']['label']],
+                    ['id' => \Yii::$app->params['orderStatus']['failPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['failPaid']['label']]
+                ]
+                ],
             ];
         }
         return $this->filterTypes;