Ver Fonte

管理后台订单修改

kevin há 1 ano atrás
pai
commit
d14e375587
1 ficheiros alterados com 20 adições e 0 exclusões
  1. 20 0
      backendApi/modules/v1/models/lists/shop/OrderList.php

+ 20 - 0
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -397,6 +397,11 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                         ['id' => 'FX', 'name' => \Yii::t('ctx', 'shopOrderListOrderTypeRepeatPurchase')],
                     ]
                 ],
+                'COUNTRY'=> [
+                    'name'=> \Yii::t('ctx', 'country'),
+                    'other'=> 'select',
+                    'selectData'=> self::getCountry()
+                ],
                 'PERIOD_NUM'=> ['name'=> \Yii::t('ctx', 'numberOfPeriods')],//期数
                 'CREATED_AT'=> ['name'=> \Yii::t('ctx', 'shopOrderListCreationTime'), 'other'=>'date'],//创建时间
                 'STATUS'=> [
@@ -521,4 +526,19 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
             ],
         ];
     }
+
+    public function getCountry()
+    {
+        $countries = Countries::getFromCache();
+
+        $data = [];
+        foreach ($countries as $country) {
+            $data[] = [
+                'id' => $country['ID'],
+                'name' => $country['COUNTRY_NAME'],
+            ];
+        }
+
+        return $data;
+    }
 }