فهرست منبع

Merge branch 'feature/2187-transfer' into dev

kevin_zhangl 3 سال پیش
والد
کامیت
46ac1c55fc

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

@@ -415,7 +415,7 @@ class ShopController extends BaseController {
             'STATUS' => 'O.STATUS',
             'IS_AUTO' => 'O.IS_AUTO'
         ]);
-        $filter['condition'] = !$filter['condition'] ? ' AND O.IS_DELETE=0' : ('O.IS_DELETE=0 ' . $filter['condition']);
+        $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'); // 订单列表
         if (!$result) {

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

@@ -123,10 +123,6 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'header' => 'Product Name', // 存货名称
                     'headerOther' => ['width' => '200'],
                 ],
-                'BUY_NUMS' => [
-                    'header' => 'Qty', // 数量
-                    'headerOther' => ['width' => '100'],
-                ],
                 'CONSIGNEE' => [
                     'header' => 'Recipient', // 收货人
                     'headerOther' => [
@@ -218,6 +214,10 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                     'headerOther' => ['width' => '190'],
                 ],
+                'BUY_NUMS' => [
+                    'header' => 'Qty', // 数量
+                    'headerOther' => ['width' => '100'],
+                ],
                 'REAL_PRICE' => [
                     'header' => 'Item Pricing', // 商品单价
                     'headerOther' => [
@@ -232,13 +232,27 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                         ];
                     },
                 ],
+                'TOTAL_PRICE' => [
+                    'header' => 'Total Price', // 订单总价
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                    'value' => function ($row) {
+                        return Tool::formatPrice($row['REAL_PRICE'] * $row['BUY_NUMS']);
+                    },
+                    'valueOther' => function ($row) {
+                        return [
+                            'tag' => ['type' => 'danger', 'size' => 'small', 'class' => 'no-border']
+                        ];
+                    },
+                ],
                 'REAL_PV' => [
                     'header' => 'BV Amount', // 商品金额
                     'headerOther' => [
                         'width' => '150',
                     ],
                     'value' => function ($row) {
-                        return Tool::formatPrice($row['REAL_PV']);
+                        return Tool::formatPrice($row['REAL_PV'] * $row['BUY_NUMS']);
                     },
                     'valueOther' => function ($row) {
                         return [
@@ -252,7 +266,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                         'width' => '150',
                     ],
                     'value' => function ($row) {
-                        return Tool::formatPrice($row['ORDER_AMOUNT_STANDARD']);
+                        return Tool::formatPrice($row['STANDARD_PRICE'] * $row['BUY_NUMS']);
                     },
                     'valueOther' => function ($row) {
                         return [

+ 1 - 1
common/helpers/user/Info.php

@@ -622,7 +622,7 @@ class Info {
      * @return array|null
      */
     public static function getLastInfo($userId){
-        $data = User::findOneAsArray('ID=:ID', [':ID' => $userId], 'LAST_DEC_LV AS DEC_LV,EMP_LV,STATUS,CROWN_LV AS LAST_CROWN_LV');
+        $data = User::findOneAsArray('ID=:ID', [':ID' => $userId], 'LAST_DEC_LV AS DEC_LV,EMP_LV,LAST_EMP_LV,STATUS,CROWN_LV,LAST_CROWN_LV');
         return $data;
     }
 

+ 4 - 3
common/libs/export/BaseExport.php

@@ -341,7 +341,6 @@ class BaseExport extends Component {
                     'STATUS' => \Yii::$app->params['orderStatus'][$columnData['STATUS']]['label'] ?? '',
                     'SKU_CODE' => $columnData['SKU_CODE'],
                     'GOODS_TITLE' => Tool::mbSignConvert($columnData['GOODS_TITLE']) ,
-                    'BUY_NUMS' => $columnData['BUY_NUMS'],
                     'CONSIGNEE' => $columnData['CONSIGNEE'],
                     'MOBILE' => "\t{$columnData['MOBILE']}",
                     'TEL' => "\t{$columnData['TEL']}",
@@ -356,9 +355,11 @@ class BaseExport extends Component {
                     'PAY_TYPE' => ShopGoods::payTypes()[$columnData['PAY_TYPE']]['name'] ?? ShopGoods::payTypes()['cash']['name'],
                     'PAY_AT' => $columnData['PAY_AT'] > 0 ? Date('Y-m-d H:i:s', $columnData['PAY_AT']) : '',
                     'DELIVERY_AT' => $columnData['DELIVERY_AT'] > 0 ? Date('Y-m-d H:i:s', $columnData['DELIVERY_AT']) : '',
+                    'BUY_NUMS' => $columnData['BUY_NUMS'],
                     'REAL_PRICE' => $columnData['REAL_PRICE'],
-                    'REAL_PV' => $columnData['REAL_PV'],
-                    'STANDARD_PRICE' => $columnData['ORDER_AMOUNT_STANDARD'],
+                    'TOTAL_PRICE' => $columnData['REAL_PRICE'] * $columnData['BUY_NUMS'],
+                    'REAL_PV' => $columnData['REAL_PV'] * $columnData['BUY_NUMS'],
+                    'STANDARD_PRICE' => $columnData['STANDARD_PRICE'] * $columnData['BUY_NUMS'],
                     'PAY_FREIGHT' => $columnData['PAY_FREIGHT'],
                     'TAX_RATE' => $columnData['TAX_RATE'],
                     'TAX_AMOUNT' => Tool::calculateTax($columnData['REAL_PRICE'], $columnData['TAX_RATE'], $columnData['BUY_NUMS']),