Przeglądaj źródła

Merge branch 'master' of http://18.167.157.193:1026/guanli/ngds into feature/1540-theo-auto-mesure-up

# Conflicts:
#	frontendApi/config/menu.php
theo 3 lat temu
rodzic
commit
42e8a1416b

+ 1 - 1
.gitignore

@@ -19,7 +19,7 @@ Desktop.ini
 
 #App
 common/config/config.php
-vender
+vendor
 frontendApi/web/pdfs/
 #composer.json
 composer.lock

+ 4 - 4
backendApi/config/menu.php

@@ -45,7 +45,7 @@ return [
 
             // ['name'=>'Welcome Pack Listing', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],//报单列表
             // ['name'=>'报单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list-export', 'routePath'=>'shop/dec-order-list-export', 'show'=>0,],
-            ['name'=>'order list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],//订单列表
+            ['name'=>'Order list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],//订单列表
             ['name'=>'订单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list-export', 'routePath'=>'shop/order-list-export', 'show'=>0,],
             ['name'=>'订单发货', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-delivery', 'routePath'=>'shop/order-delivery', 'show'=>0,],
             ['name'=>'External mall order list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-shop-list', 'routePath'=>'shop/order-shop-list', 'show'=>1,],//外部商城订单列表
@@ -290,7 +290,7 @@ return [
         ]
     ],*/
     'finance'=>[
-        'name'=>'财务管理',
+        'name'=>'Financial Management',
         'class' => '',
         'icon'=>'el-icon-bank-card',
         'controller'=>'finance',
@@ -350,7 +350,7 @@ return [
         ]
     ],
     'article'=>[
-        'name'=>'文章管理',
+        'name'=>'Article Management',
         'class' => '',
         'icon'=>'el-icon-collection',
         'controller'=>'article',
@@ -457,7 +457,7 @@ return [
         ]
     ],
     'config' => [
-        'name'=>'设置管理',
+        'name'=>'Setting management',
         'class' => '',
         'icon'=>'el-icon-set-up',
         'controller'=>'config',

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

@@ -61,7 +61,7 @@ class BaseController extends \yii\rest\ActiveController {
 
         // 校验用户权限
         if (!Yii::$app->user->validateAdminAction($this->id, $this->action->id)) {
-            return self::notice('权限不足', 403);
+            return self::notice('Insufficient user permissions', 403);
         }
         return $parentBeforeAction;
     }

+ 1 - 1
backendEle/index.html

@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
-    <title>结算系统后台</title>
+    <title>Settlement system background</title>
   </head>
   <body>
     <div id="app"></div>

+ 1 - 1
backendEle/src/utils/config_trial.js

@@ -1,4 +1,4 @@
-const APP_NAME = '奖金结算系统'
+const APP_NAME = 'Settlement system background'
 const SERVER_API_DOMAIN = '16.163.228.151'
 const SERVER_API_HTTP_TYPE = 'http://'
 const SERVER_API_PORT = ':8025'  // ':8102'

+ 10 - 0
common/helpers/Tool.php

@@ -72,6 +72,16 @@ class Tool {
         }
     }
 
+    /**
+     * 格式化金额,保留2位小数,千分位分割
+     * @param $amount
+     * @param string $decimals
+     */
+    public static function formatAmount($amount, string $decimals = '2')
+    {
+        return (number_format($amount,$decimals));
+    }
+
     /**
      * 计算商品税额
      * @param $amount

+ 0 - 22
common/helpers/bonus/CalcCache.php

@@ -226,28 +226,6 @@ class CalcCache {
      * @return bool
      */
     public static function addUsers($periodNum, $offset = 0, $limit = self::LIMIT) {
-//        echo sprintf("时间:[%s]缓存用户,当前offset为:【%s】" . PHP_EOL, date('Y-m-d H:i:s', time()) , $offset);
-        $userHaveRemain = RemainPv::findAllAsArray('REMAIN_PV >0');
-//        print_r($userHaveRemain);exit;
-        $currentPeriod = Period::getInfoByPeriodNum($periodNum);
-
-//        print_r($currentPeriod);exit;
-        if($currentPeriod['IS_MONTH']){
-            $periods = Period::getCurrentMonthPeriodByPeriodNum($periodNum);
-            //先清除本期的假订单
-            echo('首先,清除上次尝试生成业绩单时所创建的虚假订单'. date('Y-m-d  H:i:s', time()) . PHP_EOL);
-            $delFOrder = Order::deleteAll(['ORDER_TYPE'=>'FO','PERIOD_NUM'=>$periodNum]);
-            echo('检查有结余PV的用户,如果他当月PV不足30,则为其创建假订单'. PHP_EOL);
-            foreach($userHaveRemain as $uR){
-                $myPv = Order::find()->where(['PERIOD_NUM'=>$periods, 'USER_ID'=>$uR['USER_ID']])->SUM('PV');
-                if($myPv<30){
-                    //制造虚拟订单
-                    echo('不足30了,生成假订单' . PHP_EOL);
-                    $newOrderForm = new OrderForm();
-                    $newOrderForm->addFakeOrder($uR['USER_ID'],$periodNum);
-                }
-            }
-        }
         // 修复USER_INFO表里面已经没有PERIOD_NUM了
         $allData = UserInfo::findUseDbCalc()->from(UserInfo::tableName(). 'AS UI')->select('UI.USER_ID,U.STATUS')->leftJoin(User::tableName() . 'AS U', 'U.ID=UI.USER_ID')->where('1=1')->orderBy('UI.RELATION_DEEP DESC,UI.ID DESC')->offset($offset)->limit($limit)->asArray()->all();
         //$allData = User::findUseDbShopCalc()->select('ID AS USER_ID')->where('PERIOD_AT<=:PERIOD_AT AND IS_UNION=0 AND DELETED=0', [':PERIOD_AT' => $periodNum])->offset($offset)->limit($limit)->asArray()->all();

+ 112 - 0
common/helpers/bonus/PerfCalc.php

@@ -19,6 +19,7 @@ use common\helpers\user\Reconsume;
 use common\models\CalcBonus;
 use common\models\DeclarationLevel;
 use common\models\forms\DeclarationForm;
+use common\models\forms\OrderForm;
 use common\models\Order;
 use common\models\OrderDec;
 use common\models\OrderShop;
@@ -33,6 +34,8 @@ use common\models\DecOrder;
 use common\models\EmployLevel;
 use common\models\PerfActiveUser;
 use common\models\UserRelation;
+use common\models\RemainPv;
+use common\models\FlowRemainPv;
 use yii\base\Exception;
 use yii\base\StaticInstanceTrait;
 
@@ -105,6 +108,108 @@ class PerfCalc {
         return $this->_errors;
     }
 
+    /**
+     * 生成流水号
+     * @return string
+     */
+    private function _generateSn() {
+        return Date::today('Ymd') . $this->_random(10, 1);
+    }
+
+    /**
+     * 生成随机数
+     * @param $length
+     * @param int $numeric
+     * @return string
+     */
+    private function _random($length, $numeric = 0) {
+        $seed = base_convert(md5(microtime() . $_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
+        $seed = $numeric ? (str_replace('0', '', $seed) . '012340567890') : ($seed . 'zZ' . strtoupper($seed));
+        $hash = '';
+        $max = strlen($seed) - 1;
+        for ($i = 0; $i < $length; $i++) {
+            $hash .= $seed[mt_rand(0, $max)];
+        }
+        return $hash;
+    }
+
+    /**
+     * 处理order表中有remain_pv的订单
+     * 将结果写入到remainPv相关表中
+     *
+     */
+    private function _calcRemainPv(){
+        $orders = Order::find()->where('PERIOD_NUM=:PERIOD_NUM AND REMAIN_PV>0',[':PERIOD_NUM'=>$this->_periodNum])->asArray()->all();
+        foreach($orders as $order){
+            $oRemainPv = RemainPv::find()->where(['USER_ID' => $order['USER_ID']])->one();
+
+            $transactionRemain = \Yii::$app->db->beginTransaction();
+            try{
+                $flowRemainPvModel = new FlowRemainPv();
+                $flowRemainPvModel->ID = $this->_generateSn();
+                $flowRemainPvModel->USER_ID = $order['USER_ID'];
+                $flowRemainPvModel->REMAIN_PV_FLOW = $order['REMAIN_PV'];
+                $flowRemainPvModel->REMAIN_PV_TOTAL = $oRemainPv['REMAIN_PV'] + $order['REMAIN_PV'];
+                $flowRemainPvModel->PERIOD_NUM = $this->_periodNum;
+                $flowRemainPvModel->UPDATED_AT = Date::nowTime();
+                $flowRemainPvModel->ORDER_SN = $order['SN'];
+                if(!$flowRemainPvModel->save()){
+                    $this->addErrors($flowRemainPvModel->getErrors());
+                    return false;
+                }
+
+                $oRemainPv = RemainPv::find()->where(['USER_ID' => $order['USER_ID']])->one();
+                if($oRemainPv){
+                    $oRemainPv->updateCounters(['REMAIN_PV'=>$order['REMAIN_PV']]);
+                }else{
+                    $remainPvModel = new RemainPv();
+                    $remainPvModel->ID = $this->_generateSn();
+                    $remainPvModel->USER_ID = $order['USER_ID'];
+                    $remainPvModel->UPDATED_AT = Date::nowTime();
+                    $remainPvModel->REMAIN_PV = $order['REMAIN_PV'];
+                    $remainPvModel->STATUS = 1;
+                    if(!$remainPvModel->save()){
+                        $this->addErrors($remainPvModel->getErrors());
+                        return false;
+                    }
+                }
+                $transactionRemain->commit();
+            } catch (Exception $e) {
+                $transactionRemain->rollBack();
+                $this->addError('add', $e->getMessage());
+                return null;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 生成假订单
+     *
+     */
+    public static function _createFakeOrder($periodNum){
+        echo('假假假'.$periodNum. PHP_EOL);
+        $userHaveRemain = RemainPv::findAllAsArray('REMAIN_PV >0');
+        $currentPeriod = Period::getInfoByPeriodNum($periodNum);
+        if($currentPeriod['IS_MONTH']){
+            print_r('是月结点'.PHP_EOL);
+            $periods = Period::getCurrentMonthPeriodByPeriodNum($periodNum);
+            //先清除本期的假订单
+            echo('首先,清除上次尝试生成业绩单时所创建的虚假订单'. date('Y-m-d  H:i:s', time()) . PHP_EOL);
+            $delFOrder = Order::deleteAll(['ORDER_TYPE'=>'FO','PERIOD_NUM'=>$periodNum]);
+            echo('检查有结余PV的用户,如果他当月PV不足30,则为其创建假订单'. PHP_EOL);
+            foreach($userHaveRemain as $uR){
+                $myPv = Order::find()->where(['PERIOD_NUM'=>$periods, 'USER_ID'=>$uR['USER_ID']])->SUM('PV');
+                if($myPv<30){
+                    //制造虚拟订单
+                    echo('不足30了,生成假订单' . PHP_EOL);
+                    $newOrderForm = new OrderForm();
+                    $newOrderForm->addFakeOrder($uR['USER_ID'],$periodNum);
+                }
+            }
+        }
+    }
+
     /**
      * 计算步骤
      * @param $periodNum
@@ -128,10 +233,17 @@ class PerfCalc {
             // 清空相关表数据
             $this->clearTableData();
             $t2 = microtime(true);
+            echo(PHP_EOL . $periodNum. '期,生成业绩单,开始' . PHP_EOL);
             echo('初始化、清空缓存及相关数据表完成,耗时:' . round($t2 - $t1, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
             $this->_updatePercent(10);
             // 计算月奖,才需要向缓存中加入按推荐深度的所有用户
             echo('向缓存中加入用户开始 ' . date('Y-m-d  H:i:s', time()) . PHP_EOL);
+            // 先把有remainPv的订单处理一下,将remainPv加入到remain_pv及流水表
+            echo('处理当期REMAIN PV ' . date('Y-m-d  H:i:s', time()) . PHP_EOL);
+            $this->_calcRemainPv();
+            echo('若需要,生成假订单' . date('Y-m-d  H:i:s', time()) . PHP_EOL);
+            $this->_createFakeOrder($periodNum);
+            echo('生成假订单完成,开始缓存用户'. date('Y-m-d  H:i:s', time()) . PHP_EOL);
             //修改每一期都缓存所有用户
             CalcCache::addUsers($this->_periodNum);
             $t3 = microtime(true);

+ 107 - 102
common/libs/export/BaseExport.php

@@ -478,52 +478,54 @@ class BaseExport extends Component {
                 // 税额
                 $taxAmount = floatval(Tool::formatPrice(($value['REAL_PRICE'] - ($value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100))) * $value['BUY_NUMS']));
                 $totalTaxAmount += $taxAmount;
+                $taxAmount = Tool::formatAmount($taxAmount);
+                $totalAmount = Tool::formatAmount($totalAmount);
                 // 订单详情
                 $orderDetails .= <<<EOT
-                    <tr>
-                        <td>{$value['SKU_CODE']}</td>
-                        <td>{$value['GOODS_TITLE']}</td>
-                        <td>{$value['REAL_PRICE']}</td>
-                        <td>{$value['BUY_NUMS']}</td>
-                        <td>{$value['TAX_RATE']}</td>
-                        <td>{$taxAmount}</td>
-                        <td>{$totalAmount}</td>
-                    </tr>
+                <tr>
+                    <td>{$value['SKU_CODE']}</td>
+                    <td>{$value['GOODS_TITLE']}</td>
+                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
+                    <td>{$value['BUY_NUMS']}</td>
+                    <td style="text-align: right;">{$value['TAX_RATE']}</td>
+                    <td style="text-align: right;">{$taxAmount}</td>
+                    <td style="text-align: right;">{$totalAmount}</td> 
+                </tr>
 EOT;
             }
 
             // 订单基本信息
             $orderBase = <<<ORDER
-                <table border="1" style="table-layout: fixed; padding: 10px 20px;" width="100%">
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member code</td>
-                        <td width="70%">{$userId}</td>
-                    </tr>
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member name</td>
-                        <td width="70%">{$userName}</td>
-                    </tr>
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member address</td>
-                        <td width="70%">{$address}</td>
-                    </tr>
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member phone</td>
-                        <td width="70%">{$mobile}</td>
-                    </tr>
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Order code</td>
-                        <td width="70%">{$orderSn}</td>
-                    </tr>
-                    <tr>
-                        <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Creation time</td>
-                        <td width="70%">{$orderAt}</td>
-                    </tr>
-                    <tr>
-                        <td class="bg" style="font-weight: bold; font-size: 14px; text-align: center;">Order detail</td>
-                        <td class="bg"></td>
-                    </tr>
-                </table>
+            <table border="1" style="table-layout: fixed; padding: 10px 20px;" width="100%">
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member code</td>
+                    <td width="70%">{$userId}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member name</td>
+                    <td width="70%">{$userName}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member address</td>
+                    <td width="70%">{$address}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member phone</td>
+                    <td width="70%">{$mobile}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Order code</td>
+                    <td width="70%">{$orderSn}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Creation time</td>
+                    <td width="70%">{$orderAt}</td>
+                </tr>
+                <tr>
+                    <td class="bg" style="font-weight: bold; font-size: 14px; text-align: center;">Order detail</td>
+                    <td class="bg"></td>
+                </tr>
+            </table>
 ORDER;
 
             $l['a_meta_charset'] = 'UTF-8';
@@ -531,73 +533,76 @@ ORDER;
             $l['a_meta_language'] = 'zh';
             $l['w_page'] = '页面';
 
+            $orderAmount = Tool::formatAmount($orderAmount);
+            $totalTaxAmount = Tool::formatAmount($totalTaxAmount);
+
             $context = <<<ORDER
-                <!doctype html>
-                <html lang="en">
-                <head>
-                    <meta charset="UTF-8" />
-                    <title>Order detail</title>
-                    <style>
-                        table {
-                            border-collapse: collapse;
-                        }
-                        table td, table th {
-                            border: 1px solid #ccc;
-                            padding: 10px 30px;
-                            border-collapse: collapse;
-                        }
-                        td {
-                            padding: 120px;
-                        }
-                        .bg {
-                            background-color: #ccc;
-                        }
-                    </style>
-                </head>
-                <body>
-                    <div class="content">
-                        <p style="text-align: center; font-weight: bold; font-size: 22px;"><b>订单详情</b><br></p>
-                        <div>
-                            <div style="display: block; width: 100%;">
-                                {$orderBase}
-                                
-                                <table border="1" width="100%" style="padding: 10px 20px; text-align: center;">
-                                    <tr>
-                                        <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                        <th width="20%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
-                                        <th width="13%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
-                                        <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
-                                        <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
-                                        <th width="12%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
-                                        <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>
-                                    </tr>
-                                    {$orderDetails}
-                                    <tr>
-                                        <td colspan="3">Total</td>
-                                        <td>{$orderNums}</td>
-                                        <td></td>
-                                        <td>{$totalTaxAmount}</td>
-                                        <td>{$orderAmount}</td>
-                                    </tr>
-                                </table>
-                            </div>
+            <!doctype html>
+            <html lang="en">
+            <head>
+                <meta charset="UTF-8" />
+                <title>Order detail</title>
+                <style>
+                    table {
+                        border-collapse: collapse;
+                    }
+                    table td, table th {
+                        border: 1px solid #ccc;
+                        padding: 5px 5px;
+                        border-collapse: collapse;
+                    }
+                    /*td {*/
+                    /*    padding: 120px;*/
+                    /*}*/
+                    .bg {
+                        background-color: #ccc;
+                    }
+                </style>
+            </head>
+            <body>
+                <div class="content">
+                    <p style="text-align: center; font-weight: bold; font-size: 22px;"><b>Order detail</b><br></p>
+                    <div>
+                        <div style="display: block; width: 100%;">
+                            {$orderBase}
                             
-                            <div style="width: 100%; margin-top: 50px; height: 30px;">
-                                <table width="100%" style="border: none; padding: 10px 20px; text-align: center;">
-                                    <tr style="border: none;">
-                                        <td width="70%" style="border: none;"></td>
-                                        <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Signature:</td>
-                                    </tr>
-                                    <tr style="border: none;">
-                                        <td width="70%" style="border: none;"></td>
-                                        <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Date:</td>
-                                    </tr>
-                                </table>
-                            </div>
+                            <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
+                                <tr>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>
+                                </tr>
+                                {$orderDetails}
+                                <tr>
+                                    <td colspan="3">Total</td>
+                                    <td>{$orderNums}</td>
+                                    <td></td>
+                                    <td style="text-align: right;">{$totalTaxAmount}</td>
+                                    <td style="text-align: right;">{$orderAmount}</td>
+                                </tr>
+                            </table>
+                        </div>
+                        
+                        <div style="width: 100%; margin-top: 50px; height: 30px;">
+                            <table width="100%" style="border: none; padding: 10px 20px; text-align: center;">
+                                <tr style="border: none;">
+                                    <td width="70%" style="border: none;"></td>
+                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Signature:</td>
+                                </tr>
+                                <tr style="border: none;">
+                                    <td width="70%" style="border: none;"></td>
+                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Date:</td>
+                                </tr>
+                            </table>
                         </div>
                     </div>
-                </body>
-                </html>
+                </div>
+            </body>
+            </html>
 ORDER;
 
             require_once (\Yii::$app->vendorPath . '/tecnickcom/tcpdf/tcpdf.php');

+ 58 - 45
common/models/forms/OrderForm.php

@@ -60,6 +60,7 @@ class OrderForm extends Model
     private $_decAmountStandard;
     private $_exchangeRate;
     private $_remainPv;
+    private $_realPv;
 
     /**
      * @var Order
@@ -445,6 +446,7 @@ class OrderForm extends Model
         $ids = $this->goodsId;
         $totalAmount = 0;
         $totalPv = 0;
+        $totalRealPv = 0;
         $totalAmountStandard = 0;
         $goodsType = ShopGoods::GOODS_TYPE;
         $this->_remainPv = 0;
@@ -464,14 +466,21 @@ class OrderForm extends Model
                         $realPv = $goods['PRICE_PV'] * $discount;
                         $realPriceStandard = $goods['SELL_PRICE_STANDARD'] * $discount;
                     }
-                    $totalAmount += $realPrice * intval($v);
-                    $totalPv += $realPv * intval($v);
                     if($goods['PV_SPLIT']==1){//当商品为PV分期时
                         $pvSplit = $this->_pvSplit($realPv);
-                        $realPv = $pvSplit['current'];
+                        $currentPv = $pvSplit['current'];
                         $remainPv = $pvSplit['remain'];
+                        $totalPv += $currentPv * intval($v);
+                        $totalRealPv += $realPv * intval($v);
                         $this->_remainPv += $remainPv * intval($v);
+                    }else{
+                        $currentPv = $goods['PRICE_PV'];
+                        $totalPv += $realPv * intval($v);
+                        $totalRealPv += $realPv * intval($v);
+                        $remainPv = 0;
+                        $this->_remainPv += 0;
                     }
+                    $totalAmount += $realPrice * intval($v);
                     $totalAmountStandard += $realPriceStandard * intval($v);
 //                    if($this->payType=='cash') {
 //                        $discount = $goodsType[$goods['TYPE']]['discount'];
@@ -488,9 +497,10 @@ class OrderForm extends Model
                     $this->_orderGoods[] = [
                         'GOODS_ID' => $goods['ID'],
                         'PRICE' => $goods['SELL_PRICE'],
-                        'PV' => $goods['PRICE_PV'],
+                        'PV' => $currentPv, // $goods['PRICE_PV'],
                         'REAL_PRICE' => $realPrice,
                         'REAL_PV' => $realPv,
+                        'REMAIN_PV' => $remainPv,
                         'POINT' => $goods['POINT'],
                         'BUY_NUMS' => intval($v),
                         'SKU_CODE' => $goods['GOODS_NO'],
@@ -508,6 +518,7 @@ class OrderForm extends Model
         }
         $this->_decAmount = $totalAmount;
         $this->_decPv = $totalPv;
+        $this->_realPv = $totalRealPv;
         $this->_freight = ($totalAmount>=300) ? 0 : 15;
         if($this->_address['PROVINCE']==1){
             $this->_freight = 0;
@@ -634,6 +645,7 @@ class OrderForm extends Model
             $warehouse = '01';
         }
         $_hasPV = in_array($this->payType, ['exchange', 'tourism_points', 'garage_points']) ? 0 : $this->_decPv;
+        $_hasRealPV = in_array($this->payType, ['exchange', 'tourism_points', 'garage_points']) ? 0 : $this->_realPv;
 
         $ordNo = $this->_generateSn();
         $orderModel = new Order();
@@ -645,7 +657,8 @@ class OrderForm extends Model
         $orderModel->ORDER_AMOUNT = $this->_decAmount;
         $orderModel->PV = $_hasPV;
         $orderModel->PAY_AMOUNT = $this->_payAmount;
-        $orderModel->PAY_PV = $_hasPV; // 兑换积分不能算业绩
+        $orderModel->PAY_PV = $_hasRealPV; // 兑换积分不能算业绩
+        $orderModel->REMAIN_PV = $this->_remainPv;
         $orderModel->PAY_AT = Date::nowTime();
         $orderModel->PAY_TYPE = $this->payType;
         $orderModel->PERIOD_NUM = $nowPeriodNum;
@@ -708,46 +721,46 @@ class OrderForm extends Model
             Balance::changeUserBonus(\Yii::$app->user->id,'reconsume_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_EXCHANGE,'REMARK' => '会员复销积分兑换']);
         }
 
-        if($this->_remainPv>0) {
-            $oRemainPv = RemainPv::find()->where(['USER_ID' => $userId])->one();
-
-            $transactionRemain = \Yii::$app->db->beginTransaction();
-            try{
-                $flowRemainPvModel = new FlowRemainPv();
-                $flowRemainPvModel->ID = $this->_generateSn();
-                $flowRemainPvModel->USER_ID = $userId;
-                $flowRemainPvModel->REMAIN_PV_FLOW = $this->_remainPv;
-                $flowRemainPvModel->REMAIN_PV_TOTAL = $oRemainPv['REMAIN_PV'] + $this->_remainPv;
-                $flowRemainPvModel->PERIOD_NUM = $nowPeriodNum;
-                $flowRemainPvModel->UPDATED_AT = Date::nowTime();
-                $flowRemainPvModel->ORDER_SN = 'OS'.$ordNo;
-                if(!$flowRemainPvModel->save()){
-                    $this->addErrors($flowRemainPvModel->getErrors());
-                    return false;
-                }
-
-                $oRemainPv = RemainPv::find()->where(['USER_ID' => $userId])->one();
-                if($oRemainPv){
-                    $oRemainPv->updateCounters(['REMAIN_PV'=>$this->_remainPv]);
-                }else{
-                    $remainPvModel = new RemainPv();
-                    $remainPvModel->ID = $this->_generateSn();
-                    $remainPvModel->USER_ID = $userId;
-                    $remainPvModel->UPDATED_AT = Date::nowTime();
-                    $remainPvModel->REMAIN_PV = $this->_remainPv;
-                    $remainPvModel->STATUS = 1;
-                    if(!$remainPvModel->save()){
-                        $this->addErrors($remainPvModel->getErrors());
-                        return false;
-                    }
-                }
-                $transactionRemain->commit();
-            } catch (Exception $e) {
-                $transactionRemain->rollBack();
-                $this->addError('add', $e->getMessage());
-                return null;
-            }
-        }
+//        if($this->_remainPv>0) {
+//            $oRemainPv = RemainPv::find()->where(['USER_ID' => $userId])->one();
+//
+//            $transactionRemain = \Yii::$app->db->beginTransaction();
+//            try{
+//                $flowRemainPvModel = new FlowRemainPv();
+//                $flowRemainPvModel->ID = $this->_generateSn();
+//                $flowRemainPvModel->USER_ID = $userId;
+//                $flowRemainPvModel->REMAIN_PV_FLOW = $this->_remainPv;
+//                $flowRemainPvModel->REMAIN_PV_TOTAL = $oRemainPv['REMAIN_PV'] + $this->_remainPv;
+//                $flowRemainPvModel->PERIOD_NUM = $nowPeriodNum;
+//                $flowRemainPvModel->UPDATED_AT = Date::nowTime();
+//                $flowRemainPvModel->ORDER_SN = 'OS'.$ordNo;
+//                if(!$flowRemainPvModel->save()){
+//                    $this->addErrors($flowRemainPvModel->getErrors());
+//                    return false;
+//                }
+//
+//                $oRemainPv = RemainPv::find()->where(['USER_ID' => $userId])->one();
+//                if($oRemainPv){
+//                    $oRemainPv->updateCounters(['REMAIN_PV'=>$this->_remainPv]);
+//                }else{
+//                    $remainPvModel = new RemainPv();
+//                    $remainPvModel->ID = $this->_generateSn();
+//                    $remainPvModel->USER_ID = $userId;
+//                    $remainPvModel->UPDATED_AT = Date::nowTime();
+//                    $remainPvModel->REMAIN_PV = $this->_remainPv;
+//                    $remainPvModel->STATUS = 1;
+//                    if(!$remainPvModel->save()){
+//                        $this->addErrors($remainPvModel->getErrors());
+//                        return false;
+//                    }
+//                }
+//                $transactionRemain->commit();
+//            } catch (Exception $e) {
+//                $transactionRemain->rollBack();
+//                $this->addError('add', $e->getMessage());
+//                return null;
+//            }
+//        }
         return $orderModel;
     }
 

+ 21 - 22
frontendApi/config/menu.php

@@ -28,12 +28,13 @@ return [
         'show'=>1,
         'child'=>[
             ['name'=>'Products list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'index', 'routePath'=>'shop/index', 'show'=>1,],//商品列表
-
+            ['name'=>'Welcome Pack management', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'dec', 'routePath'=>'user/dec', 'show'=>1,'allow'=>'declarer',],
+            ['name'=>'Welcome Pack Listing', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],//报单列表
+            ['name'=>'Upgrade management', 'class'=>'', 'icon'=>'', 'controller'=>'upgrade', 'action'=>'dec', 'routePath'=>'user/upgrade', 'show'=>1,'allow'=>'declarer',],//升级管理
 //            ['name'=>'Repeat sales products', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'reconsume', 'routePath'=>'shop/reconsume', 'show'=>1,'allow'=>'studio'],//复消商品
 
-            ['name'=>'Welcome Pack Listing', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],//报单列表
-            ['name'=>'Order List', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],//订单列表
 //            ['name'=>'申请退货', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-backing-out', 'routePath'=>'shop/order-backing-out', 'show'=>1,],//申请退货
+            ['name'=>'Order List', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],//订单列表
         ]
     ],
     'user'=>[
@@ -51,8 +52,6 @@ return [
 //            ['name'=>'点位绑定列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind', 'routePath'=>'user/bind', 'show'=>1,],
 //            ['name'=>'点位绑定编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-edit', 'routePath'=>'user/bind-edit', 'show'=>0,],
             ['name'=>'Reset Password', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'password', 'routePath'=>'user/password', 'show'=>1],
-            ['name'=>'Upgrade management', 'class'=>'', 'icon'=>'', 'controller'=>'upgrade', 'action'=>'dec', 'routePath'=>'user/upgrade', 'show'=>1,'allow'=>'declarer',],//升级管理
-            ['name'=>'Welcome Pack management', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'dec', 'routePath'=>'user/dec', 'show'=>1,'allow'=>'declarer',],
         ]
     ],
     'atlas'=>[
@@ -78,31 +77,31 @@ return [
         'child'=>[
             ['name'=>'My account', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'index', 'routePath'=>'bonus/index', 'show'=>1,],//我的账户
 //            ['name'=>'最新奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new', 'routePath'=>'bonus/new', 'show'=>1,'allow'=>'newBonusSwitch'],
-            ['name'=>'Previous bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other', 'routePath'=>'bonus/other', 'show'=>1,'allow'=>'pastBonusSwitch'],//往期奖金
+            ['name'=>'My bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other', 'routePath'=>'bonus/other', 'show'=>1,'allow'=>'pastBonusSwitch'],//往期奖金
             //['name'=>'实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],
            // ['name'=>'房产积分', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'fc-point', 'routePath'=>'bonus/fc-point', 'show'=>1,],
 //            ['name'=>'报单中心补助明细查询', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bt', 'routePath'=>'bonus/flow-bt', 'show'=>1,],
 //            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
-        ]
-    ],
-    'finance'=>[
-        'name'=>'Financial Management',//财务管理
-        'class' => '',
-        'icon'=>'el-icon-bank-card',
-        'controller'=>'finance',
-        'action'=>'',
-        'routePath'=>'finance',
-        'show'=>1,
-        'child'=>[
-//            ['name'=>'会员复销池余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'reconsume-pool-flow', 'routePath'=>'finance/reconsume-pool-flow', 'show'=>1,],
-//            ['name'=>'转账记录', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,'allow'=>'transferRecordSwitch'],
-            ['name'=>'我要转账', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-add', 'routePath'=>'finance/transfer-add', 'show'=>1,'allow'=>'transferSwitch'],
             ['name'=>'Withdrawal details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>1,],//提现明细
             ['name'=>'申请提现', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-add', 'routePath'=>'finance/withdraw-add', 'show'=>0,],
-            ['name'=>'Recharge details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],//充值明细
-            ['name'=>'申请充值', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>0,],
         ]
     ],
+//    'finance'=>[
+//        'name'=>'Financial Management',//财务管理
+//        'class' => '',
+//        'icon'=>'el-icon-bank-card',
+//        'controller'=>'finance',
+//        'action'=>'',
+//        'routePath'=>'finance',
+//        'show'=>1,
+//        'child'=>[
+////            ['name'=>'会员复销池余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'reconsume-pool-flow', 'routePath'=>'finance/reconsume-pool-flow', 'show'=>1,],
+////            ['name'=>'转账记录', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,'allow'=>'transferRecordSwitch'],
+////            ['name'=>'我要转账', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-add', 'routePath'=>'finance/transfer-add', 'show'=>1,'allow'=>'transferSwitch'],
+////            ['name'=>'Recharge details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],//充值明细
+////            ['name'=>'申请充值', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>0,],
+//        ]
+//    ],
     'article'=>[
         'name'=>'Article Management',//文章管理
         'class' => '',

+ 29 - 18
frontendApi/modules/v1/controllers/ShopController.php

@@ -453,16 +453,19 @@ class ShopController extends BaseController {
             // 税额
             $taxAmount = floatval(Tool::formatPrice(($value['REAL_PRICE'] - ($value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100))) * $value['BUY_NUMS']));
             $totalTaxAmount += $taxAmount;
+            $productAmount = Tool::formatAmount($value['REAL_PRICE']);
+            $taxAmount = Tool::formatAmount($taxAmount);
+            $totalAmount = Tool::formatAmount($totalAmount);
             // 订单详情
             $orderDetails .= <<<EOT
                 <tr>
                     <td>{$value['SKU_CODE']}</td>
                     <td>{$value['GOODS_TITLE']}</td>
-                    <td>{$value['REAL_PRICE']}</td>
+                    <td style="text-align: right;">{$productAmount}</td>
                     <td>{$value['BUY_NUMS']}</td>
-                    <td>{$value['TAX_RATE']}</td>
-                    <td>{$taxAmount}</td>
-                    <td>{$totalAmount}</td> 
+                    <td style="text-align: right;">{$value['TAX_RATE']}</td>
+                    <td style="text-align: right;">{$taxAmount}</td>
+                    <td style="text-align: right;">{$totalAmount}</td> 
                 </tr>
 EOT;
         }
@@ -506,6 +509,9 @@ ORDER;
         $l['a_meta_language'] = 'zh';
         $l['w_page'] = '页面';
 
+        $orderAmount = Tool::formatAmount($orderAmount);
+        $totalTaxAmount = Tool::formatAmount($totalTaxAmount);
+
         $context = <<<ORDER
             <!doctype html>
             <html lang="en">
@@ -518,12 +524,12 @@ ORDER;
                     }
                     table td, table th {
                         border: 1px solid #ccc;
-                        padding: 10px 30px;
+                        padding: 5px 5px;
                         border-collapse: collapse;
                     }
-                    td {
-                        padding: 120px;
-                    }
+                    /*td {*/
+                    /*    padding: 120px;*/
+                    /*}*/
                     .bg {
                         background-color: #ccc;
                     }
@@ -539,9 +545,9 @@ ORDER;
                             <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
                                 <tr>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                    <th width="20%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>
@@ -551,8 +557,8 @@ ORDER;
                                     <td colspan="3">Total</td>
                                     <td>{$orderNums}</td>
                                     <td></td>
-                                    <td>{$totalTaxAmount}</td>
-                                    <td>{$orderAmount}</td>
+                                    <td style="text-align: right;">{$totalTaxAmount}</td>
+                                    <td style="text-align: right;">{$orderAmount}</td>
                                 </tr>
                             </table>
                         </div>
@@ -677,16 +683,18 @@ ORDER;
             // 税额
             $taxAmount = floatval(Tool::formatPrice(($value['REAL_PRICE'] - ($value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100))) * $value['BUY_NUMS']));
             $totalTaxAmount += $taxAmount;
+            $taxAmount = sprintf('%.2f', $taxAmount);
+            $totalAmount = sprintf('%.2f', $totalAmount);
             // 订单详情
             $orderDetails .= <<<EOT
                 <tr>
                     <td>{$value['SKU_CODE']}</td>
                     <td>{$value['GOODS_TITLE']}</td>
-                    <td>{$value['REAL_PRICE']}</td>
+                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
                     <td>{$value['BUY_NUMS']}</td>
-                    <td>{$value['TAX_RATE']}</td>
-                    <td>{$taxAmount}</td>
-                    <td>{$totalAmount}</td> 
+                    <td style="text-align: right;">{$value['TAX_RATE']}</td>
+                    <td style="text-align: right;">{$taxAmount}</td>
+                    <td style="text-align: right;">{$totalAmount}</td> 
                 </tr>
 EOT;
         }
@@ -730,6 +738,9 @@ ORDER;
         $l['a_meta_language'] = 'zh';
         $l['w_page'] = '页面';
 
+        $orderAmount = sprintf('%.2f', $orderAmount);
+        $totalTaxAmount = sprintf('%.2f', $totalTaxAmount);
+
         $context = <<<ORDER
             <!doctype html>
             <html lang="en">
@@ -763,9 +774,9 @@ ORDER;
                             <table border="1" width="100%" style="padding: 10px 20px; text-align: center;">
                                 <tr>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                    <th width="20%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
                                     <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>

+ 2 - 2
frontendEle/src/views/dashboard/index.vue

@@ -10,10 +10,10 @@
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
             <el-row :gutter="10">
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current System Time:{{nowDateTime}}</el-col> <!--当前系统时间-->
-              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
+              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}<!--<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
                   :src="getEmpIco(myEmpLv['ICON_TYPE'])" alt=""
                   v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
-                  :key="key" v-if="myEmpLv['ICON_TYPE']>0">
+                  :key="key" v-if="myEmpLv['ICON_TYPE']>0">-->
               </el-col><!--聘级-->
               <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Member Level:{{decLvName}}</el-col><!--会员级别-->
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Period:{{periodNum}}</el-col><!--当前业绩期-->

+ 15 - 15
frontendEle/src/views/layout/layout.vue

@@ -50,22 +50,22 @@
           <li class="scale-menu">
             <el-button type="text" @click="onMenu"><i class="el-icon-s-fold"></i></el-button>
           </li>
-          <li class="top-message button">
-            <el-button type="text" @click="onMessage"><i class="el-icon-message"></i>
-              <div class="notify" v-show="notifyShow"><span class="heartbit"></span><span class="point"></span></div>
-            </el-button>
+<!--          <li class="top-message button">-->
+<!--            <el-button type="text" @click="onMessage"><i class="el-icon-message"></i>-->
+<!--              <div class="notify" v-show="notifyShow"><span class="heartbit"></span><span class="point"></span></div>-->
+<!--            </el-button>-->
 
-            <transition name="custom-classes-transition" enter-active-class="animated bounceInDown">
-              <div class="top-message-card" v-if="messageShow" v-loading="messageLoading">
-                <ul v-if="unreadMessage !== null">
-                  <li v-for="(item,index) in unreadMessage" :key="index" @click="toMessage(item.ID)">
-                    <h5>{{item.TITLE}}</h5>
-                    <span>{{tool.formatDate(item.CREATED_AT)}}</span>
-                  </li>
-                </ul>
-              </div>
-            </transition>
-          </li>
+<!--            <transition name="custom-classes-transition" enter-active-class="animated bounceInDown">-->
+<!--              <div class="top-message-card" v-if="messageShow" v-loading="messageLoading">-->
+<!--                <ul v-if="unreadMessage !== null">-->
+<!--                  <li v-for="(item,index) in unreadMessage" :key="index" @click="toMessage(item.ID)">-->
+<!--                    <h5>{{item.TITLE}}</h5>-->
+<!--                    <span>{{tool.formatDate(item.CREATED_AT)}}</span>-->
+<!--                  </li>-->
+<!--                </ul>-->
+<!--              </div>-->
+<!--            </transition>-->
+<!--          </li>-->
         </ul>
         <div style="text-align: right">
           <el-button type="text" @click.native="onLogout">Log Out</el-button><!--安全退出-->

+ 2 - 0
sql/upgrade/1686.sql

@@ -0,0 +1,2 @@
+-- 移除聘级图标
+UPDATE AR_EMPLOY_LEVEL SET ICON_NUM = 0;

+ 20 - 0
sql/upgrade/1708.sql

@@ -0,0 +1,20 @@
+TRUNCATE TABLE `AR_OPEN_BANK`;
+
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('488C80A583CE34398C7206CAEF3F1A00', 'Access Bank Nigeria Plc', '488C80A583CE34398C7206CAEF3F1A00', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('F081A012321E37F3A5719370941A1EEA', 'Access Bank Plc (Diamond)', 'F081A012321E37F3A5719370941A1EEA', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('3F555F1E33BF3A54A5155DA23E3A0C42', 'Eco Bank Plc', '3F555F1E33BF3A54A5155DA23E3A0C42', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('36D5A393EA33338AA777104B2CBF4D16', 'Fidelity Bank Plc', '36D5A393EA33338AA777104B2CBF4D16', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('506644E92E803DC8B562E8AE975F050E', 'First Bank Plc', '506644E92E803DC8B562E8AE975F050E', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('52F359DD3F643D458173BDC640520C05', 'First City monument Bank', '52F359DD3F643D458173BDC640520C05', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('879FFBBD62F83D6CAA9B4F88D9E2D96D', 'Guarantee trust Bank Plc', '879FFBBD62F83D6CAA9B4F88D9E2D96D', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('6B36E4B6122830989D20ADD16E056F8B', 'Keystone Bank limited', '6B36E4B6122830989D20ADD16E056F8B', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('F24030A1793237838AF4BC0C86891E79', 'Opay', 'F24030A1793237838AF4BC0C86891E79', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('0CD12C63E2E33012A8CAA5B085C6846A', 'Polaris Bank limited', '0CD12C63E2E33012A8CAA5B085C6846A', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('42BDC3236029343292B51E4C8EA9ED34', 'Providus Bank', '42BDC3236029343292B51E4C8EA9ED34', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('C1EF53D27E04362CAD6D0CE435542FDE', 'Stanbic-IBTC Bank Plc', 'C1EF53D27E04362CAD6D0CE435542FDE', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('8F5B96ADA5F63C08A931CDCA226A4284', 'Sterling Bank Plc', '8F5B96ADA5F63C08A931CDCA226A4284', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('2286677B88AD3950912602DF4B29382D', 'UBA Plc', '2286677B88AD3950912602DF4B29382D', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('ADB5C937B21631ED857737D70DE9E3B0', 'Union Bank', 'ADB5C937B21631ED857737D70DE9E3B0', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('02924B6DEEB431018FDF9E1ACAF7AC52', 'Unity Bank Plc', '02924B6DEEB431018FDF9E1ACAF7AC52', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('1DEB142687273F28A620DF32DE069005', 'Wema Bank Plc', '1DEB142687273F28A620DF32DE069005', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);
+INSERT INTO `AR_OPEN_BANK` (`ID`, `BANK_NAME`, `BANK_CODE`, `LIST_ORDER`, `CREATED_AT`, `UPDATED_AT`, `ADM_NAME`, `MIN_CHARGE`, `MAX_CHARGE`, `CHARGE_PROP`, `UPDATER`, `STATUS`) VALUES ('F55D48B1A6243DE4BA27866D01196251', 'Zenith Bank Plc', 'F55D48B1A6243DE4BA27866D01196251', 0, 0, 0, 'admin', 0.00, 0.00, 0.00, '', 1);