root 2 سال پیش
والد
کامیت
5607802327

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

@@ -93,7 +93,7 @@ class ShopController extends BaseController {
             'CATEGORY_TYPE' => 'CATEGORY_TYPE',
         ]);
         $form = new ShopExportForm();
-        $result = $form->run($filter, 'Goods_List'); // 商品列表
+        $result = $form->run($filter, \Yii::t('ctx', 'shopExportListName')); // 商品列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -111,7 +111,7 @@ class ShopController extends BaseController {
             $formModel = new ShopGoodsForm();
             $formModel->scenario = 'add';
             if ($formModel->load(\Yii::$app->request->post(), '') && $result = $formModel->add()) {
-                return static::notice('Product add succeeded.');
+                return static::notice(\Yii::t('ctx', 'shopProductAddSucceededNotice'));
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
             }
@@ -137,7 +137,7 @@ class ShopController extends BaseController {
             $formModel->scenario = 'edit';
             $formModel->id = $id;
             if ($formModel->load(\Yii::$app->request->post(), '') && $result = $formModel->edit()) {
-                return static::notice('Product editing succeeded.');
+                return static::notice(\Yii::t('ctx', 'shopProductEditSucceed'));
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
             }
@@ -197,7 +197,7 @@ class ShopController extends BaseController {
 //                foreach ($result['logs'] as $k => $value) {
 //                     Log::adminHandle('改变商品状态至' . ShopGoods::STATUS_NAME[$result['status']], 1, $k);
 //                }
-                return static::notice('Status setting succeeded'); // 状态设置成功
+                return static::notice(\Yii::t('ctx', 'shopStatusSetSucceedNotice')); // 状态设置成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
@@ -352,7 +352,7 @@ class ShopController extends BaseController {
         ]);
         $filter['condition'] .= ' AND DO.IS_DEL=0';
         $form = new ShopExportForm();
-        $result = $form->run($filter, '报单列表');
+        $result = $form->run($filter, \Yii::t('ctx', 'shopDecOrderListExport'));
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -364,8 +364,8 @@ class ShopController extends BaseController {
         if (\Yii::$app->request->isPost) {
             $formModel = new OrderDeleteForm();
             if ($formModel->load(\Yii::$app->request->post(), '') && $result = $formModel->returnOrder()) {
-
-                return static::notice('删除订单成功,请重新生成业绩单,计算奖金');
+                
+                return static::notice(\Yii::t('ctx', 'shopDelOrderSuccedNotice'));
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
@@ -417,7 +417,7 @@ class ShopController extends BaseController {
         ]);
         $filter['condition'] = !$filter['condition'] ? '1=1 AND O.IS_DELETE=0' : ('O.IS_DELETE=0 ' . $filter['condition']);
         $form = new ShopExportForm();
-        $result = $form->run($filter, 'Order_List'); // 订单列表
+        $result = $form->run($filter, \Yii::t('ctx', 'shopOrderListExport')); // 订单列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -518,7 +518,7 @@ class ShopController extends BaseController {
         if ($finishStatus) {
             return static::notice(['finish' => true]);
         } else {
-            return static::notice('状态更新错误', 400);
+            return static::notice(\Yii::t('ctx', 'shopStatusUpdateErrorNotice'), 400);
         }
     }
 
@@ -573,7 +573,7 @@ class ShopController extends BaseController {
         if ($finishStatus) {
             return static::notice(['finish' => true]);
         } else {
-            return static::notice('状态更新错误', 400);
+            return static::notice(\Yii::t('ctx', 'shopStatusUpdateErrorNotice'), 400);
         }
     }
 
@@ -635,7 +635,7 @@ class ShopController extends BaseController {
             } elseif ($result === 0) {
                 return static::notice(['finish' => true]);
             } else {
-                return static::notice('发生错误:' . $errorMsg, 400);
+                return static::notice('Error:' . $errorMsg, 400);
             }
         }
     }
@@ -652,7 +652,7 @@ class ShopController extends BaseController {
         if ($finishStatus) {
             return static::notice(['finish' => true]);
         } else {
-            return static::notice('状态更新错误', 400);
+            return static::notice(\Yii::t('ctx', 'shopStatusUpdateErrorNotice'), 400);
         }
     }
 
@@ -665,7 +665,7 @@ class ShopController extends BaseController {
         if(\Yii::$app->request->isPost) {
             return parent::edit(OrderForm::class, '发货成功', 'adminDelivery', ['adminDelivery']);
         }
-        return static::notice('Illegal request', 400); // 非法请求
+        return static::notice(\Yii::t('ctx', 'illegalRequest'), 400); // 非法请求
     }
 
     /**
@@ -690,7 +690,7 @@ class ShopController extends BaseController {
         $filter['params'] = [':SN' => $orderSn];
 
         $form = new ShopExportForm();
-        $result = $form->run($filter, '订单列表');
+        $result = $form->run($filter, \Yii::t('ctx', 'shopOrderListExportPdf'));
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -719,7 +719,7 @@ class ShopController extends BaseController {
         $filter['params'] = [':SN' => $orderSn];
 
         $form = new ShopExportForm();
-        $result = $form->run($filter, '订单列表');
+        $result = $form->run($filter, \Yii::t('ctx', 'shopOrderListExportPdf'));
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -734,9 +734,9 @@ class ShopController extends BaseController {
     public function actionOrderRefund()
     {
         if(\Yii::$app->request->isPost) {
-            return parent::edit(OrderForm::class, '退款成功', 'adminRefund', ['adminRefund']);
+            return parent::edit(OrderForm::class, \Yii::t('ctx', 'shopadminRefund'), 'adminRefund', ['adminRefund']);
         }
-        return static::notice('Illegal request', 400); // 非法请求
+        return static::notice(\Yii::t('ctx', 'illegalRequest'), 400); // 非法请求
     }
 
     /*
@@ -813,7 +813,7 @@ class ShopController extends BaseController {
         ]);
         $filter['condition'] = !$filter['condition'] ? '1=1 AND O.IS_DELETE=0' : ('O.IS_DELETE=0 ' . $filter['condition']);
         $form = new BaShopExportForm();
-        $result = $form->run($filter, 'Ba_Order_List'); // 订单列表
+        $result = $form->run($filter, \Yii::t('ctx', 'shopBaOrderListExport')); // 订单列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -840,7 +840,7 @@ class ShopController extends BaseController {
         $filter['condition'] = ' O.IS_DELETE=0 AND O.SN=:SN';
         $filter['params'] = [':SN' => $orderSn];
         $form = new BaShopExportForm();
-        $result = $form->run($filter, 'Brand Ambassador Order');
+        $result = $form->run($filter, \Yii::t('ctx', 'shopBrandAmbassadorOrderExport'));
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }

+ 27 - 27
backendApi/modules/v1/models/lists/shop/OrderDecList.php

@@ -45,65 +45,65 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
         if(!$this->columns){
             $this->columns = [
                 'PERIOD_NUM' => [
-                    'header' => 'Number Of Periods', // 期数
+                    'header' => \Yii::t('ctx', 'numberOfPeriods'), // 期数
                     'headerOther' => ['width' => '140'],
                 ],
                 'USER_NAME' => [
-                    'header' => 'Member Code', // 会员编号
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberCode'), // 会员编号
                     'headerOther' => ['width' => '120'],
                 ],
                 'SN' => [
-                    'header' => 'Order Code', // 订单号
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderCode'), // 订单号
                     'headerOther' => ['width' => '200'],
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'Recipient', // 收货人
+                    'header' => \Yii::t('ctx', 'shopOrderListRecipient'), // 收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'MOBILE' => [
-                    'header' => 'Contact 1', // 联系方式1
+                    'header' =>  \Yii::t('ctx', 'shopOrderListContactOne'), // 联系方式1
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'TEL' => [
-                    'header' => 'Contact 2', // 联系方式2
+                    'header' => \Yii::t('ctx', 'shopOrderListContactTwo'), // 联系方式2
                 ],
                 'PROVINCE' => [
-                    'header' => 'State', // 州
+                    'header' => \Yii::t('ctx', 'shopOrderListState'), // 州
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'Local Government Area', // 地方政府
+                    'header' => \Yii::t('ctx', 'shopOrderListLocalGovernmentArea'), // 地方政府
                     'headerOther' => ['width' => '170'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'City', // 区
+                    'header' => \Yii::t('ctx', 'shopOrderListCity'), // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'ADDRESS' => [
-                    'header' => 'Detailed Address', // 详细地址
+                    'header' => \Yii::t('ctx', 'shopOrderListDetailedAddress'), // 详细地址
                     'headerOther' => [
                         'width' => '300',
                     ],
                 ],
                 'WAREHOUSE' => [
-                    'header' => 'Delivery Warehouse', // 发货仓
+                    'header' => \Yii::t('ctx', 'shopOrderDeliveryWarehouse'), // 发货仓
                     'headerOther' => ['width' => '150'],
                 ],
                 'CREATED_AT' => [
-                    'header' => 'Creation Time', // 创建时间
+                    'header' => \Yii::t('ctx', 'shopOrderListCreationTime'), // 创建时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['CREATED_AT'],
@@ -112,7 +112,7 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_AMOUNT' => [
-                    'header' => 'Payment Amount', // 支付金额
+                    'header' => \Yii::t('ctx', 'shopOrderPaymentAmount'), // 支付金额
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -124,7 +124,7 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     ],
                 ],
                 'PAY_PV' => [
-                    'header' => 'Pay BV', // 支付BV
+                    'header' => \Yii::t('ctx', 'shopOrderPayBV'), // 支付BV
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -136,7 +136,7 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     ],
                 ],
                 'PAY_AT' => [
-                    'header' => 'Payment Time', // 支付时间
+                    'header' => \Yii::t('ctx', 'shopOrderListPaymentTime'), // 支付时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['PAY_AT'],
@@ -145,14 +145,14 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_TYPE' => [
-                    'header' => 'Pay Type', // 支付方式
+                    'header' => \Yii::t('ctx', 'shopOrderListPayType'), // 支付方式
                     'value' => function ($row) {
                         return ShopGoods::payTypes()[$row['PAY_TYPE']]['name'] ?? ShopGoods::payTypes()['cash']['name'];
                     },
                     'headerOther' => ['width' => '190'],
                 ],
                 'DELIVERY_AT' => [
-                    'header' => 'Delivery Time', // 发货时间
+                    'header' => \Yii::t('ctx', 'shopOrderListDeliveryTime'), // 发货时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['DELIVERY_AT'],
@@ -161,7 +161,7 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_FREIGHT' => [
-                    'header' => 'Freight', // 运费
+                    'header' => \Yii::t('ctx', 'shopOrderListFreight'), // 运费
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -175,22 +175,22 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'EXPRESS_COMPANY' => [
-                    'header' => 'Courier Services Company', // 快递公司
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierCompany'), // 快递公司
                     'headerOther' => ['width' => '190'],
                 ],
                 'ORDER_TRACK_NO' => [
-                    'header' => 'Courier Number', // 快递单号
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierNumber'), // 快递单号
                     'headerOther' => ['width' => '200'],
                 ],
                 'EXPRESS_TYPE' => [
-                    'header' => 'Shipping Method', // 发货方式
+                    'header' => \Yii::t('ctx', 'shopOrderListShippingMethod'), // 发货方式
                     'headerOther' => ['width' => '150'],
                     'value' => function ($row) {
-                        return $row['EXPRESS_TYPE']==0 ? 'mailing ':' auto pick '; // '邮寄' : '自提'
+                        return $row['EXPRESS_TYPE']==0 ?  \Yii::t('ctx', 'shopOrderListShippingMethodMailing') : \Yii::t('ctx', 'shopOrderListShippingMethodAutoPick'); // '邮寄' : '自提'
                     },
                 ],
                 'FRONT_REMARK' => [
-                    'header' => 'Member Notes', // 会员备注
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberNotes'), // 会员备注
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -214,10 +214,10 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'SN'=> ['name'=> 'Order No'],//订单编号
-                'USER_NAME'=> ['name'=> 'Member Code'],//会员编号
-                'PERIOD_NUM'=> ['name'=> 'Number Of Periods'],//期数
-                'CREATED_AT'=> ['name'=> 'Creation Time', 'other'=>'date'],//创建时间
+                'SN'=> ['name'=> \Yii::t('ctx', 'shopOrderListOrderNo')],//订单编号
+                'USER_NAME'=> ['name'=> \Yii::t('ctx', 'shopOrderListMemberCode')],//会员编号
+                'PERIOD_NUM'=> ['name'=> \Yii::t('ctx', 'numberOfPeriods')],//期数
+                'CREATED_AT'=> ['name'=> \Yii::t('ctx', 'shopOrderListCreationTime'), 'other'=>'date'],//创建时间
             ];
         }
         return $this->filterTypes;

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

@@ -86,28 +86,28 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'ID' => null,
                 'DEC_SN' => null,
                 'USER_NAME' => [
-                    'header' => 'Member Code', // 会员编号
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberCode'), // 会员编号
                     'headerOther' => ['width' => '120'],
                 ],
                 'DEC_USER_NAME' => [
-                    'header' => 'Stockist', // 报单中心
+                    'header' => \Yii::t('ctx', 'shopOrderListStockist'), // 报单中心
                     'headerOther' => ['width' => '120'],
                 ],
                 'CREATE_USER' => [
-                    'header' => 'Creator No', // 创建人编号
+                    'header' => \Yii::t('ctx', 'shopOrderListCreatorNo'), // 创建人编号
                     'headerOther' => ['width' => '120'],
                 ],
                 'CREATE_USER_NAME' => [
-                    'header' => 'Creator Name', // 创建人姓名
+                    'header' => \Yii::t('ctx', 'shopOrderListCreatorName'), // 创建人姓名
                     'headerOther' => ['width' => '120'],
                 ],
                 'SN' => [
-                    'header' => 'Order Code', // 订单号
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderCode'), // 订单号
                     'headerOther' => ['width' => '200'],
                 ],
 //                'STATUS' => null,
                 'STATUS' => [
-                    'header' => 'Status', // 订单状态
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderStatus'), // 订单状态
                     'headerOther' => [
                         'width' => '110',
                     ],
@@ -116,72 +116,72 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'SKU_CODE' => [
-                    'header' => 'Product Code', // 存货编码
+                    'header' => \Yii::t('ctx', 'shopOrderListProductCode'), // 存货编码
                     'headerOther' => ['width' => '150'],
                 ],
                 'GOODS_TITLE' => [
-                    'header' => 'Product Name', // 存货名称
+                    'header' => \Yii::t('ctx', 'shopOrderListProductName'), // 存货名称
                     'headerOther' => ['width' => '200'],
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'Recipient', // 收货人
+                    'header' => \Yii::t('ctx', 'shopOrderListRecipient'), // 收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'MOBILE' => [
-                    'header' => 'Contact 1', // 联系方式1
+                    'header' => \Yii::t('ctx', 'shopOrderListContactOne'), // 联系方式1
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'TEL' => [
-                    'header' => 'Contact 2', // 联系方式2
+                    'header' => \Yii::t('ctx', 'shopOrderListContactTwo'), // 联系方式2
                 ],
                 'PROVINCE' => [
-                    'header' => 'State', // 州
+                    'header' => \Yii::t('ctx', 'shopOrderListState'), // 州
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'Local Government Area', // 地方政府
+                    'header' => \Yii::t('ctx', 'shopOrderListLocalGovernmentArea'), // 地方政府
                     'headerOther' => ['width' => '170'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'City', // 区
+                    'header' => \Yii::t('ctx', 'shopOrderListCity'), // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'ADDRESS' => [
-                    'header' => 'Detailed Address', // 详细地址
+                    'header' => \Yii::t('ctx', 'shopOrderListDetailedAddress'), // 详细地址
                     'headerOther' => [
                         'width' => '300',
                     ],
                 ],
                 'PERIOD_NUM' => [
-                    'header' => 'Period', // 期数
+                    'header' => \Yii::t('ctx', 'shopOrderListPeriod'), // 期数
                 ],
                 'ORDER_TYPE' => [
-                    'header' => 'Order Type', // 订单类型
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderType'), // 订单类型
                     'headerOther' => ['width' => '140'],
                     'value' => function ($row) {
                         switch ($row['ORDER_TYPE']) {
                             case 'ZC':
-                                return 'Welcome Pack';
+                                return \Yii::t('ctx', 'shopOrderListOrderTypeZc');
                             case 'FX':
-                                return in_array($row['PAY_TYPE'], ['cash', 'pay_stack']) ? 'Repeat Purchase': 'Points'; //'重消' : '积分'
+                                return in_array($row['PAY_TYPE'], ['cash', 'pay_stack']) ? \Yii::t('ctx', 'shopOrderListOrderTypeRepeatPurchase'): \Yii::t('ctx', 'shopOrderListOrderTypePoints'); //'重消' : '积分'
                         }
                     },
                 ],
                 'CREATED_AT' => [
-                    'header' => 'Creation Time', // 创建时间
+                    'header' => \Yii::t('ctx', 'shopOrderListCreationTime'), // 创建时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['CREATED_AT'],
@@ -190,14 +190,14 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_TYPE' => [
-                    'header' => 'Pay Type', // 支付方式
+                    'header' => \Yii::t('ctx', 'shopOrderListPayType'), // 支付方式
                     'value' => function ($row) {
                         return ShopGoods::payTypes()[$row['PAY_TYPE']]['name'] ?? ShopGoods::payTypes()['cash']['name'];
                     },
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_AT' => [
-                    'header' => 'Payment Time', // 支付时间
+                    'header' => \Yii::t('ctx', 'shopOrderListPaymentTime'), // 支付时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['PAY_AT'],
@@ -206,7 +206,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '190'],
                 ],
                 'DELIVERY_AT' => [
-                    'header' => 'Delivery Time', // 发货时间
+                    'header' => \Yii::t('ctx', 'shopOrderListDeliveryTime'), // 发货时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['DELIVERY_AT'],
@@ -215,11 +215,11 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '190'],
                 ],
                 'BUY_NUMS' => [
-                    'header' => 'Qty', // 数量
+                    'header' => \Yii::t('ctx', 'shopOrderListQty'), // 数量
                     'headerOther' => ['width' => '100'],
                 ],
                 'REAL_PRICE' => [
-                    'header' => 'Item Pricing', // 商品单价
+                    'header' => \Yii::t('ctx', 'shopOrderListItemPricing'), // 商品单价
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -233,7 +233,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'TOTAL_PRICE' => [
-                    'header' => 'Total Price', // 订单总价
+                    'header' => \Yii::t('ctx', 'shopOrderListTotalPrice'), // 订单总价
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -247,7 +247,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'REAL_PV' => [
-                    'header' => 'BV Amount', // 商品金额
+                    'header' => \Yii::t('ctx', 'shopOrderListBVAmount'), // 商品金额
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -261,7 +261,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'STANDARD_PRICE' => [
-                    'header' => 'Total Price($)', // 商品金额
+                    'header' => \Yii::t('ctx', 'shopOrderListUsTotalPrice'), // 美元价格或标准价格
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -275,7 +275,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'PAY_FREIGHT' => [
-                    'header' => 'Freight', // 运费
+                    'header' => \Yii::t('ctx', 'shopOrderListFreight'), // 运费
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -289,7 +289,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'TAX_RATE' => [
-                    'header' => 'Tax Rate', // 税率
+                    'header' => \Yii::t('ctx', 'shopOrderListTaxRate'), // 税率
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -303,7 +303,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'TAX_AMOUNT' => [
-                    'header' => 'Tax', // 税额
+                    'header' => \Yii::t('ctx', 'shopOrderListTax'), // 税额
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -317,22 +317,22 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'EXPRESS_COMPANY' => [
-                    'header' => 'Courier Services Company', // 快递公司
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierCompany'), // 快递公司
                     'headerOther' => ['width' => '190'],
                 ],
                 'ORDER_TRACK_NO' => [
-                    'header' => 'Courier Number', // 快递单号
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierNumber'), // 快递单号
                     'headerOther' => ['width' => '200'],
                 ],
                 'EXPRESS_TYPE' => [
-                    'header' => 'Shipping Method', // 发货方式
+                    'header' => \Yii::t('ctx', 'shopOrderListShippingMethod'), // 发货方式
                     'headerOther' => ['width' => '150'],
                     'value' => function ($row) {
-                        return $row['EXPRESS_TYPE']==0 ? 'Mailing ':' Auto pick '; // '邮寄' : '自提'
+                        return $row['EXPRESS_TYPE']==0 ?  \Yii::t('ctx', 'shopOrderListShippingMethodMailing') : \Yii::t('ctx', 'shopOrderListShippingMethodAutoPick'); // '邮寄' : '自提'
                     },
                 ],
                 'FRONT_REMARK' => [
-                    'header' => 'Member Notes', // 会员备注
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberNotes'), // 会员备注
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -345,7 +345,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 ],
                 'DELIVERY_STATUS' => null,
                 'DELIVERY_STATUS_NAME' => [
-                    'header' => 'Shipment Status', // 发货状态
+                    'header' => \Yii::t('ctx', 'shopOrderListShipmentStatus'), // 发货状态
                     'headerOther' => [
                         'width' => '130',
                     ],
@@ -356,7 +356,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'IS_AUTO' => [
                     'header' => 'Is Auto', // 是否自动
                     'value' => function ($row) {
-                        return $row['IS_AUTO'] == 1 ? 'Yes' : 'No';
+                        return $row['IS_AUTO'] == 1 ? \Yii::t('ctx', 'shopOrderListIsAutoYes') : \Yii::t('ctx', 'shopOrderListIsAutoNo');
                     },
                 ],
             ];
@@ -372,21 +372,21 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'SN'=> ['name'=> 'Order No'],//订单编号
-                'USER_NAME'=> ['name'=> 'Member Code'],//会员编号
-                'MOBILE'=> ['name'=> 'Contact 1'],//联系方式1
+                'SN'=> ['name'=> \Yii::t('ctx', 'shopOrderListOrderNo')],//订单编号
+                'USER_NAME'=> ['name'=> \Yii::t('ctx', 'shopOrderListMemberCode')],//会员编号
+                'MOBILE'=> ['name'=> \Yii::t('ctx', 'shopOrderListContactOne')],//联系方式1
                 'ORDER_TYPE'=> [
-                    'name'=> 'Order Type',
+                    'name'=> \Yii::t('ctx', 'shopOrderListOrderType'),
                     'other'=> 'select',
                     'selectData'=> [
-                        ['id' => 'ZC', 'name' => 'Welcome Pack'],
-                        ['id' => 'FX', 'name' => 'Repeat Purchase'],
+                        ['id' => 'ZC', 'name' => \Yii::t('ctx', 'shopOrderListOrderTypeZc')],
+                        ['id' => 'FX', 'name' => \Yii::t('ctx', 'shopOrderListOrderTypeRepeatPurchase')],
                     ]
-                    ],
-                'PERIOD_NUM'=> ['name'=> 'Number Of Periods'],//期数
-                'CREATED_AT'=> ['name'=> 'Creation Time', 'other'=>'date'],//创建时间
+                ],
+                'PERIOD_NUM'=> ['name'=> \Yii::t('ctx', 'numberOfPeriods')],//期数
+                'CREATED_AT'=> ['name'=> \Yii::t('ctx', 'shopOrderListCreationTime'), 'other'=>'date'],//创建时间
                 'STATUS'=> [
-                    'name'=> 'Status',
+                    'name'=> \Yii::t('ctx', 'shopOrderListOrderStatus'),
                     'other'=> 'select',
                     'selectData'=> [
                         ['id' => \Yii::$app->params['orderStatus']['paid']['value'], 'name' => \Yii::$app->params['orderStatus']['paid']['label']],
@@ -395,11 +395,11 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     ]
                 ],
                 'IS_AUTO' => [
-                    'name'=>'Is Auto',
+                    'name'=>\Yii::t('ctx', 'shopOrderListIsAuto'),
                     'other'=> 'select',
                     'selectData'=> [
-                        ['id'=>1, 'name'=>'YES'],
-                        ['id'=>0, 'name'=>'NO'],
+                        ['id'=>1, 'name'=>\Yii::t('ctx', 'shopOrderListIsAutoYes')],
+                        ['id'=>0, 'name'=>\Yii::t('ctx', 'shopOrderListIsAutoNo')],
                     ]
                 ]
             ];

+ 28 - 28
backendApi/modules/v1/models/lists/shop/OrderShopList.php

@@ -47,72 +47,72 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
         if(!$this->columns){
             $this->columns = [
                 'PERIOD_NUM' => [
-                    'header' => 'Number Of Periods', // 期数
+                    'header' => \Yii::t('ctx', 'numberOfPeriods'), // 期数
                     'headerOther' => ['width' => '140'],
                 ],
                 'USER_NAME' => [
-                    'header' => 'Member Code', // 会员编号
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberCode'), // 会员编号
                     'headerOther' => ['width' => '120'],
                 ],
                 'SN' => [
-                    'header' => 'Order Code', // 订单号
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderCode'), // 订单号
                     'headerOther' => ['width' => '200'],
                 ],
                 'PAY_TYPE' => [
-                    'header' => 'Order Type', // 订单类型
+                    'header' => \Yii::t('ctx', 'shopOrderListOrderType'), // 订单类型
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) {
-                        return $row['PAY_TYPE']=='cash' ? 'cancel order again': 'point order'; // '重消订单' : '积分订单'
+                        return $row['PAY_TYPE']=='cash' ? \Yii::t('ctx', 'shopOrderListOrderTypeRepeatPurchaseOrder'): \Yii::t('ctx', 'shopOrderListOrderTypePointsOrder'); // '重消订单' : '积分订单'
                     },
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'Recipient', // 收货人
+                    'header' => \Yii::t('ctx', 'shopOrderListRecipient'), // 收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'MOBILE' => [
-                    'header' => 'Contact 1', // 联系方式1
+                    'header' => \Yii::t('ctx', 'shopOrderListContactOne'), // 联系方式1
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'TEL' => [
-                    'header' => 'Contact 2', // 联系方式1
+                    'header' => \Yii::t('ctx', 'shopOrderListContactTwo'), // 联系方式1
                 ],
                 'PROVINCE' => [
-                    'header' => 'State', // 州
+                    'header' => \Yii::t('ctx', 'shopOrderListState'), // 州
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'Local Government Area', // 地方政府
+                    'header' => \Yii::t('ctx', 'shopOrderListLocalGovernmentArea'), // 地方政府
                     'headerOther' => ['width' => '170'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'City', // 区
+                    'header' => \Yii::t('ctx', 'shopOrderListCity'), // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'ADDRESS' => [
-                    'header' => 'Detailed Address', // 详细地址
+                    'header' => \Yii::t('ctx', 'shopOrderListDetailedAddress'), // 详细地址
                     'headerOther' => [
                         'width' => '300',
                     ],
                 ],
                 'WAREHOUSE' => [
-                    'header' => 'Delivery Warehouse', // 发货仓
+                    'header' => \Yii::t('ctx', 'shopOrderDeliveryWarehouse'), // 发货仓
                     'headerOther' => ['width' => '150'],
                 ],
                 'CREATED_AT' => [
-                    'header' => 'Creation Time', // 创建时间
+                    'header' => \Yii::t('ctx', 'shopOrderListCreationTime'), // 创建时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['CREATED_AT'],
@@ -121,7 +121,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_AMOUNT' => [
-                    'header' => 'Payment Amount', // 支付金额
+                    'header' => \Yii::t('ctx', 'shopOrderPaymentAmount'), // 支付金额
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -133,7 +133,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'PAY_PV' => [
-                    'header' => 'Pay BV', // 支付BV
+                    'header' => \Yii::t('ctx', 'shopOrderPayBV'), // 支付BV
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -145,7 +145,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'PAY_AT' => [
-                    'header' => 'Payment Time', // 支付时间
+                    'header' => \Yii::t('ctx', 'shopOrderListPaymentTime'), // 支付时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['PAY_AT'],
@@ -154,7 +154,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     'headerOther' => ['width' => '190'],
                 ],
                 'DELIVERY_AT' => [
-                    'header' => 'Delivery Time', // 发货时间
+                    'header' => \Yii::t('ctx', 'shopOrderListDeliveryTime'), // 发货时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['DELIVERY_AT'],
@@ -163,7 +163,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     'headerOther' => ['width' => '190'],
                 ],
                 'PAY_FREIGHT' => [
-                    'header' => 'Freight', // 运费
+                    'header' => \Yii::t('ctx', 'shopOrderListFreight'), // 运费
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -177,22 +177,22 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'EXPRESS_COMPANY' => [
-                    'header' => 'Courier Services Company', // 快递公司
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierCompany'), // 快递公司
                     'headerOther' => ['width' => '190'],
                 ],
                 'ORDER_TRACK_NO' => [
-                    'header' => 'Courier Number', // 快递单号
+                    'header' => \Yii::t('ctx', 'shopOrderListCourierNumber'), // 快递单号
                     'headerOther' => ['width' => '200'],
                 ],
                 'EXPRESS_TYPE' => [
-                        'header' => 'Shipping Method', // 发货方式
+                        'header' => \Yii::t('ctx', 'shopOrderListShippingMethod'), // 发货方式
                     'headerOther' => ['width' => '150'],
                     'value' => function ($row) {
-                        return $row['EXPRESS_TYPE']==0 ? 'mailing ':' auto pick '; // '邮寄' : '自提'
+                        return $row['EXPRESS_TYPE']==0 ?  \Yii::t('ctx', 'shopOrderListShippingMethodMailing') : \Yii::t('ctx', 'shopOrderListShippingMethodAutoPick'); // '邮寄' : '自提'
                     },
                 ],
                 'FRONT_REMARK' => [
-                    'header' => 'Member Notes', // 会员备注
+                    'header' => \Yii::t('ctx', 'shopOrderListMemberNotes'), // 会员备注
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -216,10 +216,10 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'SN'=> ['name'=> 'Order No'], // 订单编号
-                'USER_NAME'=> ['name'=> 'Member Number'], // 会员编号
-                'PERIOD_NUM'=> ['name'=> 'Number Of Periods'], // 期数
-                'CREATED_AT'=> ['name'=> 'Creation Time', 'other'=>'date'], // 创建时间
+                'SN'=> ['name'=> \Yii::t('ctx', 'shopOrderListOrderNo')], // 订单编号
+                'USER_NAME'=> ['name'=> \Yii::t('ctx', 'shopOrderListMemberCode')], // 会员编号
+                'PERIOD_NUM'=> ['name'=> \Yii::t('ctx', 'numberOfPeriods')], // 期数
+                'CREATED_AT'=> ['name'=> \Yii::t('ctx', 'shopOrderListCreationTime'), 'other'=>'date'], // 创建时间
             ];
         }
         return $this->filterTypes;

+ 84 - 0
common/messages/en-US/ctx.php

@@ -168,6 +168,90 @@ return [
     'placementMemberNumber'=>'Placement Member Number',
     'placementMemberName' => 'Placement Member Name',
 
+    #商品管理
+    'shopExportListName' => 'Goods_List',
+    'shopProductAddSucceededNotice' => 'Product add succeeded',
+    'shopProductEditSucceed'=>'Product editing succeeded',
+    'shopStatusSetSucceedNotice' => 'Status setting succeeded',
+    'shopDelOrderSuccedNotice'=>'删除订单成功,请重新生成业绩单,计算奖金',
+    'shopDecOrderListExport' => '报单列表',
+    'shopOrderListExport' => 'Order_List',
+    'shopStatusUpdateErrorNotice'=>'状态更新错误',
+    'shopOrderListExportPdf'=>'订单列表',
+    'shopadminRefund'=>'退款成功',
+    'shopBaOrderListExport' => 'Ba_Order_List',
+    'shopBrandAmbassadorOrderExport'=>'Brand Ambassador Order',
+    'shopSetProductStatusErrorNotice'=>'The current product status is【{nowStatus}】,cannot be set to【{newStatus}】',
+    'shopPayTypeCash' => 'Ecoin',
+    'shopPayTypeGaragePoints' => 'Car Fund',
+    'shopPayTypeVillaFund' => 'Villa Fund',
+    'shopBuyActionErrorNotice'=>'商品购买方式错误',
+    'shopSortMoreThanOne'=>'排序请填写大于等于1的数字',
+    'shopDiscountZeroBetweenOne'=>'折扣请填写0-1之间的数',
+    'shopDeleteDecOrderAndOrderFailedNotice'=>'删除报单失败,删除订单失败',
+    'shopBackOrderFailedNotice'=>'回退会员级别失败,删除订单失败',
+    'shopLockFailedDeleteOrderFailed'=>'锁定会员失败,删除订单失败',
+    'shopDeleteOrderFailed' => '删除订单失败',
+    'shopBackAmountFailedDeleteOrderFailed'=>'退还订单金额失败,删除订单失败',
+    'shopNotFindOrder' => '未找到订单信息,订单编号为:',
+    'shopOrderAlreadyDeleted'=> '订单已被删除,订单编号为:',
+    'shopOrderPeriodNumNotExist'=>'订单对应业绩期不存在,订单编号为 {sn} 业绩期为:{periodNum}',
+    'shopOrderPeriodNumIsSented'=>'订单对应业绩期已挂网,订单编号为 {sn} 业绩期为:{periodNum}',
+    'shopOrderPeriodNumSenting'=>'订单对应业绩期正在挂网,订单编号为{sn} 业绩期为:{periodNum}',
+    'shopNotFindDecOrder' => '未获取到对应报单信息,订单编号为:',
+    'shopDecAlreadyDeleted'=>'对应报单信息已被删除,订单编号为:',
+    'shopHasLaterOrder' => '有更晚的订单,此订单不能删除,订单编号为:',
+    'shopRegisterHasUpgradeOrder' => '此注册报单,存在升级单,无法删除,订单编号为:',
+    'shopRegisterHasFxOrder'=>'此注册报单,存在复消单,无法删除,订单编号为:',
+    'shopOrderListMemberCode' => 'Member Code',
+    'shopOrderListStockist'=>'Stockist',
+    'shopOrderListCreatorNo'=>'Creator No',
+    'shopOrderListCreatorName'=>'Creator Name',
+    'shopOrderListOrderCode'=>'Order Code',
+    'shopOrderListOrderStatus'=>'Status',
+    'shopOrderListProductCode' => 'Product Code',
+    'shopOrderListProductName'=>'Product Name',
+    'shopOrderListRecipient' => 'Recipient',
+    'shopOrderListContactOne' => 'Contact 1',
+    'shopOrderListContactTwo' => 'Contact 2',
+    'shopOrderListState'=>'State',
+    'shopOrderListLocalGovernmentArea' => 'Local Government Area',
+    'shopOrderListCity'=>'City',
+    'shopOrderListDetailedAddress'=>'Detailed Address',
+    'shopOrderDeliveryWarehouse' => 'Delivery Warehouse',
+    'shopOrderListPeriod' => 'Period',
+    'shopOrderListOrderType' => 'Order Type',
+    'shopOrderListOrderTypeRepeatPurchase'=>'Repeat Purchase',
+    'shopOrderListOrderTypePoints'=>'Points',
+    'shopOrderListOrderTypeRepeatPurchaseOrder' => '重消订单',
+    'shopOrderListOrderTypePointsOrder' => '积分订单',
+    'shopOrderListOrderTypeZc'=>'Welcome Pack',
+    'shopOrderListCreationTime' => 'Creation Time',
+    'shopOrderListPayType' => 'Pay Type',
+    'shopOrderListPaymentTime'=>'Payment Time',
+    'shopOrderListDeliveryTime'=>'Delivery Time',
+    'shopOrderListQty' => 'Qty',
+    'shopOrderListItemPricing'=>'Item Pricing',
+    'shopOrderListTotalPrice' => 'Total Price',
+    'shopOrderListBVAmount'=>'BV Amount',
+    'shopOrderListUsTotalPrice'=>'Total Price($)',
+    'shopOrderListFreight' => 'Freight',
+    'shopOrderListTaxRate'=>'Tax Rate',
+    'shopOrderListTax' => 'Tax',
+    'shopOrderListCourierCompany' => 'Courier Services Company',
+    'shopOrderListCourierNumber' => 'Courier Number',
+    'shopOrderListShippingMethod' => 'Shipping Method',
+    'shopOrderListShippingMethodMailing' => 'Mailing',
+    'shopOrderListShippingMethodAutoPick' => 'Auto pick',
+    'shopOrderListMemberNotes' => 'Member Notes',
+    'shopOrderListShipmentStatus' => 'Shipment Status',
+    'shopOrderListIsAuto' => 'Is Auto',
+    'shopOrderListIsAutoYes' => 'Yes',
+    'shopOrderListIsAutoNo' => 'No',
+    'shopOrderListOrderNo' => 'Order No',
+    'shopOrderPaymentAmount' => 'Payment Amount',
+    'shopOrderPayBV' => 'Pay BV',
+
     
     # 公用
     'amountUnit' => '₦',

+ 84 - 1
common/messages/zh-CN/ctx.php

@@ -167,7 +167,90 @@ return [
     'atlasNetworkViewLimitNotice'=>'最多查看会员的前20层子会员',
     'placementMemberNumber'=>'安置会员编号',
     'placementMemberName' => '安置会员姓名',
- 
+
+    #商品管理
+    'shopExportListName' => '商品列表',
+    'shopProductAddSucceededNotice' => '商品添加成功',
+    'shopProductEditSucceed'=>'商品编辑成功',
+    'shopStatusSetSucceedNotice' => '状态设置成功',
+    'shopDelOrderSuccedNotice'=>'删除订单成功,请重新生成业绩单,计算奖金',
+    'shopDecOrderListExport' => '报单列表',
+    'shopOrderListExport' => '订单列表',
+    'shopStatusUpdateErrorNotice'=>'状态更新错误',
+    'shopOrderListExportPdf'=>'订单列表',
+    'shopadminRefund'=>'退款成功',
+    'shopBaOrderListExport' => 'BA订单列表',
+    'shopBrandAmbassadorOrderExport'=>'Brand Ambassador Order',
+    'shopSetProductStatusErrorNotice'=>'当前商品状态为 {nowStatus},无法设置为 {newStatus}',
+    'shopPayTypeCash' => '余额支付',
+    'shopPayTypeGaragePoints' => '车奖积分',
+    'shopPayTypeVillaFund' => '房奖积分',
+    'shopBuyActionErrorNotice'=>'商品购买方式错误',
+    'shopSortMoreThanOne'=>'排序请填写大于等于1的数字',
+    'shopDiscountZeroBetweenOne'=>'折扣请填写0-1之间的数',
+    'shopDeleteDecOrderAndOrderFailedNotice'=>'删除报单失败,删除订单失败',
+    'shopBackOrderFailedNotice'=>'回退会员级别失败,删除订单失败',
+    'shopLockFailedDeleteOrderFailed'=>'锁定会员失败,删除订单失败',
+    'shopDeleteOrderFailed' => '删除订单失败',
+    'shopBackAmountFailedDeleteOrderFailed'=>'退还订单金额失败,删除订单失败',
+    'shopNotFindOrder' => '未找到订单信息,订单编号为:',
+    'shopOrderAlreadyDeleted'=> '订单已被删除,订单编号为:',
+    'shopOrderPeriodNumNotExist'=>'订单对应业绩期不存在,订单编号为 {sn} 业绩期为:{periodNum}',
+    'shopOrderPeriodNumIsSented'=>'订单对应业绩期已挂网,订单编号为 {sn} 业绩期为:{periodNum}',
+    'shopOrderPeriodNumSenting'=>'订单对应业绩期正在挂网,订单编号为{sn} 业绩期为:{periodNum}',
+    'shopNotFindDecOrder' => '未获取到对应报单信息,订单编号为:',
+    'shopDecAlreadyDeleted'=>'对应报单信息已被删除,订单编号为:',
+    'shopHasLaterOrder' => '有更晚的订单,此订单不能删除,订单编号为:',
+    'shopRegisterHasUpgradeOrder' => '此注册报单,存在升级单,无法删除,订单编号为:', 
+    'shopRegisterHasFxOrder'=>'此注册报单,存在复消单,无法删除,订单编号为:',
+    'shopOrderListMemberCode' => '会员编号',
+    'shopOrderListStockist'=>'报单中心',
+    'shopOrderListCreatorNo'=>'创建人编号',
+    'shopOrderListCreatorName'=>'创建人姓名',
+    'shopOrderListOrderCode'=>'订单号',
+    'shopOrderListOrderStatus'=>'订单状态',
+    'shopOrderListProductCode' => '存货编码',
+    'shopOrderListProductName'=>'存货名称',
+    'shopOrderListRecipient' => '收货人',
+    'shopOrderListContactOne' => '联系方式1',
+    'shopOrderListContactTwo' => '联系方式2',
+    'shopOrderListState'=>'州',
+    'shopOrderListLocalGovernmentArea' => '地方政府',
+    'shopOrderListCity'=>'区',
+    'shopOrderListDetailedAddress'=>'详细地址',
+    'shopOrderDeliveryWarehouse' => '发货仓',
+    'shopOrderListPeriod' => '期数',
+    'shopOrderListOrderType' => '订单类型',
+    'shopOrderListOrderTypeRepeatPurchase'=>'重消',
+    'shopOrderListOrderTypePoints'=>'积分',
+    'shopOrderListOrderTypeZc'=>'报单',
+    'shopOrderListOrderTypeRepeatPurchaseOrder' => '重消订单',
+    'shopOrderListOrderTypePointsOrder' => '积分订单',
+    'shopOrderListCreationTime' => '创建时间',
+    'shopOrderListPayType' => '支付方式',
+    'shopOrderListPaymentTime'=>'支付时间',
+    'shopOrderListDeliveryTime'=>'发货时间',
+    'shopOrderListQty' => '数量',
+    'shopOrderListItemPricing'=>'商品单价',
+    'shopOrderListTotalPrice' => '订单总价',
+    'shopOrderListBVAmount'=>'商品金额',
+    'shopOrderListUsTotalPrice'=>'美元价格($)', // 或者标准价格
+    'shopOrderListFreight' => '运费',
+    'shopOrderListTaxRate'=>'税率',
+    'shopOrderListTax' => '税额',
+    'shopOrderListCourierCompany' => '快递公司',
+    'shopOrderListCourierNumber' => '快递单号',
+    'shopOrderListShippingMethod' => '发货方式',
+    'shopOrderListShippingMethodMailing' => '邮寄',
+    'shopOrderListShippingMethodAutoPick' => '自提',
+    'shopOrderListMemberNotes' => '会员备注',
+    'shopOrderListShipmentStatus' => '发货状态',
+    'shopOrderListIsAuto' => '是否自动',
+    'shopOrderListIsAutoYes' => '是',
+    'shopOrderListIsAutoNo' => '否',
+    'shopOrderListOrderNo' => '订单编号',
+    'shopOrderPaymentAmount' => '支付金额',
+    'shopOrderPayBV' => '支付BV',
 
     # 公用
     'amountUnit' => '元',

+ 8 - 4
common/models/ShopGoods.php

@@ -200,7 +200,11 @@ class ShopGoods extends \common\components\ActiveRecord
      */
     public static function chkAuditStatus($nowStatus, $toStatus) {
         $statusName = self::STATUS_NAME;
-        $msg = 'The current product status is【' . $statusName[$nowStatus] . '】,cannot be set to【' . $statusName[$toStatus] . '】';// 当前商品状态为    无法设置为
+        // $msg = 'The current product status is【' . $statusName[$nowStatus] . '】,cannot be set to【' . $statusName[$toStatus] . '】';// 当前商品状态为    无法设置为
+        $msg = \Yii::t('ctx', 'shopSetProductStatusErrorNotice', [
+            'nowStatus' => $statusName[$nowStatus],
+            'newStatus' => $statusName[$toStatus]
+        ]);
         switch ($toStatus) {
             // 下架
             case 0:
@@ -226,7 +230,7 @@ class ShopGoods extends \common\components\ActiveRecord
     public static function payTypes(){
         return [
             'cash'=>[
-                'name'=>'Ecoin' //余额支付
+                'name'=> \Yii::t('ctx', 'shopPayTypeCash')//余额支付
             ],
 //            'point'=>[
 //                'name'=>'积分支付' //积分支付
@@ -238,10 +242,10 @@ class ShopGoods extends \common\components\ActiveRecord
 //                'name'=>'Travel Bonus'
 //            ],
             'garage_points' => [
-                'name' => 'Car Fund'
+                'name' => \Yii::t('ctx', 'shopPayTypeGaragePoints')
             ],
             'villa_points' => [
-                'name' => 'Villa Fund'
+                'name' => \Yii::t('ctx', 'shopPayTypeVillaFund')
             ],
             'pay_stack' => [
                 'name' => 'PayStack'

+ 24 - 15
common/models/forms/OrderDeleteForm.php

@@ -152,7 +152,7 @@ class OrderDeleteForm extends Model
 
                 if (!$delDecOrder) {
                     $transaction->rollBack();
-                    throw new Exception('删除报单失败,删除订单失败');
+                    throw new Exception(\Yii::t('ctx', 'shopDeleteDecOrderAndOrderFailedNotice'));
                 }
 
                 // 支付成功才需要处理
@@ -165,7 +165,7 @@ class OrderDeleteForm extends Model
                         $userModel->UPDATED_AT = Date::nowTime();
                         if(!$userModel->save(false)) {
                             $transaction->rollBack();
-                            throw new Exception('回退会员级别失败,删除订单失败');
+                            throw new Exception(\Yii::t('ctx', 'shopBackOrderFailedNotice'));
                         }
                     } else {
                         // 锁定用户
@@ -174,7 +174,7 @@ class OrderDeleteForm extends Model
                         $userModel->STATUS_AT = Date::nowTime();
                         if(!$userModel->save(false)) {
                             $transaction->rollBack();
-                            throw new Exception('锁定会员失败,删除订单失败');
+                            throw new Exception(\Yii::t('ctx', 'shopLockFailedDeleteOrderFailed'));
                         }
                         $isLock = 1;
                     }
@@ -198,7 +198,7 @@ class OrderDeleteForm extends Model
             }
             if (!$delOrder) {
                 $transaction->rollBack();
-                throw new Exception('删除订单失败');
+                throw new Exception(\Yii::t('ctx', 'shopDeleteOrderFailed'));
             }
 
             $payType = $orderInfo['PAY_TYPE']; // 支付方式
@@ -232,7 +232,7 @@ class OrderDeleteForm extends Model
 
                 if ($amountResult !== true) {
                     $transaction->rollBack();
-                    throw new Exception('退还订单金额失败,删除订单失败');
+                    throw new Exception(\Yii::t('ctx', 'shopBackAmountFailedDeleteOrderFailed'));
                 }
 
                 $upgradeType = 0; // 升级单类型
@@ -362,26 +362,35 @@ class OrderDeleteForm extends Model
         }
 
         if (empty($orderDetail)) {
-            $this->addError($attribute, '未找到订单信息,订单编号为:'.$this->orderSn);
+            $this->addError($attribute, \Yii::t('ctx', 'shopNotFindOrder').$this->orderSn);
             return ;
         }
         if ($orderDetail['IS_DELETE'] == 1) {
-            $this->addError($attribute, '订单已被删除,订单编号为'.$this->orderSn);
+            $this->addError($attribute, \Yii::t('ctx', 'shopOrderAlreadyDeleted').$this->orderSn);
             return ;
         }
         // 已挂网或者挂网中的业绩期订单,不能进行删除操作
         $periodNum = $orderDetail['PERIOD_NUM'];
         $periodObj = Period::findOneAsArray(['PERIOD_NUM'=>$periodNum]);
         if (empty($periodObj)) {
-            $this->addError($attribute, '订单对应业绩期不存在,订单编号为'.$this->orderSn.' 业绩期为:'.$periodNum);
+            $this->addError($attribute, \Yii::t('ctx', 'shopOrderPeriodNumNotExist', [
+                'sn' => $this->orderSn,
+                'periodNum' => $periodNum
+            ]));
             return ;
         }
         if ($periodObj['IS_SENT'] == 1) {
-            $this->addError($attribute, '订单对应业绩期已挂网,订单编号为'.$this->orderSn.' 业绩期为:'.$periodNum);
+            $this->addError($attribute, \Yii::t('ctx', 'shopOrderPeriodNumIsSented', [
+                'sn' => $this->orderSn,
+                'periodNum' => $periodNum
+            ]));
             return ;
         }
         if ($periodObj['IS_SENDING'] == 1) {
-            $this->addError($attribute, '订单对应业绩期正在挂网,订单编号为'.$this->orderSn.' 业绩期为:'.$periodNum);
+            $this->addError($attribute, \Yii::t('ctx', 'shopOrderPeriodNumSenting', [
+                'sn' => $this->orderSn,
+                'periodNum' => $periodNum
+            ]));
             return ;
         }
 
@@ -401,11 +410,11 @@ class OrderDeleteForm extends Model
             }
 
             if (empty($decDetail)) {
-                $this->addError($attribute, '未获取到对应报单信息,订单编号为:'.$this->orderSn);
+                $this->addError($attribute, \Yii::t('ctx', 'shopNotFindDecOrder').$this->orderSn);
                 return ;
             }
             if ($decDetail['IS_DEL'] == 1) {
-                $this->addError($attribute, '对应报单信息已被删除,订单编号为:'.$this->orderSn);
+                $this->addError($attribute, \Yii::t('ctx', 'shopDecAlreadyDeleted').$this->orderSn);
                 return ;
             }
 
@@ -430,7 +439,7 @@ class OrderDeleteForm extends Model
 
                 $lastUpgradeSn = $lastUpgradeOrder['ORDER_SN'];
                 if ($sn != $lastUpgradeSn) {
-                    $this->addError($attribute, '有更晚的订单,此订单不能删除,订单编号为:'.$this->orderSn);
+                    $this->addError($attribute, \Yii::t('ctx', 'shopHasLaterOrder').$this->orderSn);
                     return ;
                 }
             } else {
@@ -450,7 +459,7 @@ class OrderDeleteForm extends Model
                 }
 
                 if (!empty($hasUpgradeOrder)) {
-                    $this->addError($attribute, '此注册报单,存在升级单,无法删除,订单编号为:'.$this->orderSn);
+                    $this->addError($attribute, \Yii::t('ctx', 'shopRegisterHasUpgradeOrder').$this->orderSn);
                     return ;
                 }
 
@@ -470,7 +479,7 @@ class OrderDeleteForm extends Model
                         ->one();
                 }
                 if (!empty($hasFxOrder)) {
-                    $this->addError($attribute, '此注册报单,存在复消单,无法删除,订单编号为:'.$this->orderSn);
+                    $this->addError($attribute, \Yii::t('ctx', 'shopRegisterHasFxOrder').$this->orderSn);
                     return ;
                 }
             }   

+ 6 - 6
common/models/forms/ShopGoodsForm.php

@@ -113,7 +113,7 @@ class ShopGoodsForm extends Model
     public function initModel($attributes) {
         $this->_model = ShopGoods::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, 'The data does not exist'); // 数据不存在
+            $this->addError($attributes, \Yii::t('ctx', 'dataDoesNotExists')); // 数据不存在
         }
     }
 
@@ -131,11 +131,11 @@ class ShopGoodsForm extends Model
 //            print_r($this);
 //            exit;
             if (!$sellType) {
-                $this->addError('add', '商品购买方式错误');
+                $this->addError('add', \Yii::t('ctx', 'shopBuyActionErrorNotice'));
             } else {
                 foreach ($sellType as $item) {
                     if (!in_array($item['id'], array_keys(ShopGoods::SALE_TYPE))) {
-                        $this->addError('add', '商品购买方式错误');
+                        $this->addError('add', \Yii::t('ctx', 'shopBuyActionErrorNotice'));
                         break;
                     }
                 }
@@ -157,7 +157,7 @@ class ShopGoodsForm extends Model
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
+            $this->addError($attributes, \Yii::t('ctx', 'aPieceMustBeSelected')); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];
@@ -169,14 +169,14 @@ class ShopGoodsForm extends Model
      */
     public function isSort($attributes) {
         if ($this->sort < 1) {
-            $this->addError($attributes, '排序请填写大于等于1的数字');
+            $this->addError($attributes, \Yii::t('ctx', 'shopSortMoreThanOne'));
         }
     }
 
     // 折扣为0-1
     public function isDiscount($attributes) {
         if ($this->sellDiscount < 0 || $this->sellDiscount > 1 || !is_numeric($this->sellDiscount)) {
-            $this->addError($attributes, '折扣请填写0-1之间的数');
+            $this->addError($attributes, \Yii::t('ctx', 'shopDiscountZeroBetweenOne'));
         }
     }