Преглед изворни кода

Merge branch 'master' of http://18.167.157.193:1026/guanli/ngds

kevin_zhangl пре 3 година
родитељ
комит
ae77a29f37

+ 82 - 82
backendEle/src/router/index.js

@@ -961,76 +961,76 @@ export const constantRouterMap = [
         },
       },
       {
-          path: '/bonus/trace-down-yj',
-          component: _import('bonus/trace-down-yj'),
-          name: 'bonus_trace-down-yj',
-          meta: {
-              title: '业绩奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-yj',
+        component: _import('bonus/trace-down-yj'),
+        name: 'bonus_trace-down-yj',
+        meta: {
+          title: '业绩奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-yj',
-          component: _import('bonus/trace-up-yj'),
-          name: 'bonus_trace-up-yj',
-          meta: {
-              title: '业绩奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-yj',
+        component: _import('bonus/trace-up-yj'),
+        name: 'bonus_trace-up-yj',
+        meta: {
+          title: '业绩奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-down-gx',
-          component: _import('bonus/trace-down-gx'),
-          name: 'bonus_trace-down-gx',
-          meta: {
-              title: '共享奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-gx',
+        component: _import('bonus/trace-down-gx'),
+        name: 'bonus_trace-down-gx',
+        meta: {
+          title: '共享奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-gx',
-          component: _import('bonus/trace-up-gx'),
-          name: 'bonus_trace-up-gx',
-          meta: {
-              title: '共享奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-gx',
+        component: _import('bonus/trace-up-gx'),
+        name: 'bonus_trace-up-gx',
+        meta: {
+          title: '共享奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-down-gl',
-          component: _import('bonus/trace-down-gl'),
-          name: 'bonus_trace-down-gl',
-          meta: {
-              title: '管理奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-gl',
+        component: _import('bonus/trace-down-gl'),
+        name: 'bonus_trace-down-gl',
+        meta: {
+          title: '管理奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-gl',
-          component: _import('bonus/trace-up-gl'),
-          name: 'bonus_trace-up-gl',
-          meta: {
-              title: '管理奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-gl',
+        component: _import('bonus/trace-up-gl'),
+        name: 'bonus_trace-up-gl',
+        meta: {
+          title: '管理奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
         path: '/bonus/trace-down-fx',
@@ -1367,30 +1367,30 @@ export const constantRouterMap = [
           ],
         },
       },
-        {
-            path: '/finance/recharge',
-            component: _import('finance/recharge'),
-            name: 'finance_recharge',
-            meta: {
-                title: '充值管理',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
+      {
+        path: '/finance/recharge',
+        component: _import('finance/recharge'),
+        name: 'finance_recharge',
+        meta: {
+          title: '充值管理',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
         },
-        {
-            path: '/finance/recharge-status',
-            component: _import('finance/recharge-status'),
-            name: 'finance_recharge-status',
-            meta: {
-                title: '状态管理',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
+      },
+      {
+        path: '/finance/recharge-status',
+        component: _import('finance/recharge-status'),
+        name: 'finance_recharge-status',
+        meta: {
+          title: '状态管理',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
         },
+      },
     ]
   },
   {

+ 1 - 1
backendEle/src/views/atlas/network-opt.vue

@@ -22,7 +22,7 @@
                     <span :class="'el-icon-loading '+ data.displayNone"></span>
                     <span :class="data.icon"></span>
                     <span>
-                      <el-tag type="danger">层数:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag>
+                      <el-tag type="danger">Number of Layers:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag>
                       <el-tag><!-- 会员编号 -->Member code:{{ node.label }}</el-tag>
                       <el-tag>Name<!-- 姓名 -->:{{data.REAL_NAME}}</el-tag>
                       <el-tag type="danger"><!-- 区位 -->Location:{{data.RELATIVE_LOCATION}}</el-tag>

+ 7 - 20
common/models/forms/RechargeForm.php

@@ -6,7 +6,6 @@ use common\components\Model;
 use common\helpers\Cache;
 use common\helpers\Date;
 use common\helpers\Form;
-use common\helpers\PayStack;
 use common\helpers\Tool;
 use common\helpers\user\Cash;
 use common\helpers\user\Info;
@@ -32,7 +31,6 @@ class RechargeForm extends Model {
 //    public $bankCounty;
 
     public $sn;
-    public $currency;
     public $amount;
     public $bankRealName;
 
@@ -44,7 +42,7 @@ class RechargeForm extends Model {
     public function rules() {
         return [
             [['userName', 'idCard', 'applyAmount', 'auditStatus', 'remark', 'selectedIds', 'sn','amount', 'bankRealName', 'bankNo'], 'trim'],
-            [['selectedIds', 'auditStatus', 'userName','applyAmount', 'currency'/*,'openBank','bankNo','bankAddress'*/], 'required'],
+            [['selectedIds', 'auditStatus', 'userName','applyAmount','openBank','bankNo'/*,'bankAddress'*/], 'required'],
             [['selectedIds'], 'exist', 'targetClass' => Recharge::class, 'targetAttribute' => 'ID', 'message' => '充值申请不存在'],
             [['userName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => '会员不存在'],
             [['applyAmount'], 'price'],
@@ -62,7 +60,7 @@ class RechargeForm extends Model {
         $parentScenarios = parent::scenarios();
         $customScenarios = [
             'addByAdmin' => ['userName', 'applyAmount'],
-            'addByUser' => ['applyAmount','openBank','bankNo','bankAddress','currency'],
+            'addByUser' => ['applyAmount','openBank','bankNo','bankAddress'/*,'currency'*/],
             'statusByAdmin' => ['selectedIds', 'auditStatus', 'createRemark'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -76,10 +74,9 @@ class RechargeForm extends Model {
             'selectedIds' => '充值申请ID',
             'userName' => '会员编号',
             'applyAmount' => '申请充值的金额',
-//            'openBank' => '汇款银行',
-//            'bankNo' => '汇款账号',
+            'openBank' => '汇款银行',
+            'bankNo' => '汇款账号',
 //            'bankAddress' => '银行支行',
-            'currency' => '货币',
 //            'bankProvince' => '银行省',
 //            'bankCity' => '银行市',
 //            'bankCounty' => '银行县',
@@ -188,12 +185,6 @@ class RechargeForm extends Model {
         }
         $db = \Yii::$app->db;
         $transaction = $db->beginTransaction();
-        // 向paystack发起订单
-        $userInfo = Info::baseInfo($this->_userId);
-        $rechargeOrder = PayStack::transactionInit($this->currency, $this->applyAmount, $userInfo['EMAIL']);
-        if($rechargeOrder['status']!=1){
-            throw new Exception('api error');
-        }
         try {
             $nowTime = Date::nowTime();
             $period = Recharge::getPeriod($nowTime);
@@ -208,14 +199,10 @@ class RechargeForm extends Model {
             $rechargeModel->RECHARGE_PERIOD_NUM = $period['nowPeriodNum'];
             $rechargeModel->RECHARGE_YEAR = $period['nowYear'];
             $rechargeModel->RECHARGE_MONTH = $period['nowMonth'];
-            $rechargeModel->CURRENCY = $this->currency;
             $rechargeModel->AMOUNT = $this->applyAmount;
-            $rechargeModel->RECHARGE_REF = $rechargeOrder['data']['reference'];
-            $rechargeModel->RECHARGE_ORDER_ID = $rechargeOrder['data']['access_code'];
-            $rechargeModel->RECHARGE_STATUS = 0;
-            $rechargeModel->OPEN_BANK = 'a';
-            $rechargeModel->BANK_ADDRESS = 'b';
-            $rechargeModel->BANK_NO = 'c';
+            $rechargeModel->OPEN_BANK = $this->openBank;
+            $rechargeModel->BANK_ADDRESS = $this->bankAddress;
+            $rechargeModel->BANK_NO = $this->bankNo;
 //            $rechargeModel->BANK_PROVINCE = $this->bankProvince ?? 0;
 //            $rechargeModel->BANK_CITY = $this->bankCity ?? 0;
 //            $rechargeModel->BANK_COUNTY = $this->bankCounty ?? 0;

+ 5 - 4
frontendApi/config/menu.php

@@ -55,7 +55,7 @@ return [
         ]
     ],
     'atlas'=>[
-        'name'=>'网络图谱',
+        'name'=>'Network Atlas',
         'class' => '',
         'icon'=>'el-icon-data-line',
         'controller'=>'atlas',
@@ -63,7 +63,7 @@ return [
         'routePath'=>'atlas',
         'show'=>1,
         'child'=>[
-            ['name'=>'安置网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>1,],
+            ['name'=>'Placement network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>1,],
         ]
     ],
     'bonus'=>[
@@ -84,6 +84,8 @@ return [
 //            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
             ['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'=>1,],
         ]
     ],
 //    'finance'=>[
@@ -98,8 +100,7 @@ return [
 ////            ['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'=>[

+ 2 - 0
frontendApi/modules/v1/controllers/AtlasController.php

@@ -51,6 +51,7 @@ class AtlasController extends BaseController {
         $baseInfo = Info::baseInfo($userId, $periodNum);
         $decLevelConfig = Cache::getDecLevelConfig();
         $empLevelConfig = Cache::getEmpLevelConfig();
+        $starLevelConfig = Cache::getStarCrownLevelConfig();
         return static::notice([
             [
                 'TOP_RELATION_DEEP' => $baseInfo['RELATION_DEEP'],
@@ -61,6 +62,7 @@ class AtlasController extends BaseController {
                 'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                 'EMP_LV_NAME' => $empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME'],
+                'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
                 'leaf' => false,
                 'icon' => 'el-icon-user-solid',
                 'children' => null,

+ 1 - 1
frontendApi/modules/v1/controllers/FinanceController.php

@@ -501,7 +501,7 @@ class FinanceController extends BaseController {
             //$data['list'][$key]['BANK_PROVINCE_NAME'] = $value['BANK_PROVINCE'] ? Region::getCnName($value['BANK_PROVINCE']) : '';
             //$data['list'][$key]['BANK_CITY_NAME'] = $value['BANK_CITY'] ? Region::getCnName($value['BANK_CITY']) : '';
             //$data['list'][$key]['BANK_COUNTY_NAME'] = $value['BANK_COUNTY'] ? Region::getCnName($value['BANK_COUNTY']) : '';
-            $data['list'][$key]['STATUS_NAME'] = Recharge::RECHARGE_STATUS_NAME[$value['RECHARGE_STATUS']];
+            $data['list'][$key]['STATUS_NAME'] = Recharge::RECHARGE_STATUS_NAME[$value['AUDIT_STATUS']];
         }
         return static::notice($data);
     }

+ 3 - 1
frontendApi/modules/v1/controllers/UserController.php

@@ -435,7 +435,9 @@ class UserController extends BaseController {
             $isLocation = [1 => '左-', 2 => '右-'];
             if($allChildUser) {
                 foreach ($allChildUser as $child) {
-                    $isLocation[$child['RELATIVE_LOCATION']].= '满';
+                    if ($child['RELATIVE_LOCATION']<'3'){
+                        $isLocation[$child['RELATIVE_LOCATION']].= '满';
+                    }
                 }
             }
             $userInfo['isLocation'] = '('.implode(',',$isLocation).')';

+ 24 - 24
frontendEle/src/router/index.js

@@ -476,32 +476,32 @@ export const constantRouterMap = [
           ],
         },
       },
-        {
-            path: '/finance/recharge',
-            component: _import('finance/recharge'),
-            name: 'finance_recharge',
-            meta: {
-                title: 'Recharge details',//充值明细
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},//首页
-                    {title: 'financial management', path: '/finance/index'},//财务管理
-                ],
-            },
+      {
+        path: '/finance/recharge',
+        component: _import('finance/recharge'),
+        name: 'finance_recharge',
+        meta: {
+          title: 'Recharge details', // 充值明细
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // 首页
+            {title: 'financial management', path: '/finance/index'}, // 财务管理
+          ],
         },
-        {
-            path: '/finance/recharge-add',
-            component: _import('finance/recharge-add'),
-            name: 'finance_recharge-add',
-            meta: {
-                title: 'Recharge',//我要充值
-                highLight: '/finance/recharge',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},//首页
-                    {title: 'financial management', path: '/finance/index'},//财务管理
-                    {title: 'Withdrawal details', path: '/finance/withdraw'},
-                ],
-            },
+      },
+      {
+        path: '/finance/recharge-add',
+        component: _import('finance/recharge-add'),
+        name: 'finance_recharge-add',
+        meta: {
+          title: 'Recharge', // 我要充值
+          highLight: '/finance/recharge',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // 首页
+            {title: 'financial management', path: '/finance/index'}, // 财务管理
+            {title: 'Withdrawal details', path: '/finance/withdraw'},
+          ],
         },
+      },
     ]
   },
   {

+ 8 - 1
frontendEle/src/views/atlas/network.vue

@@ -20,7 +20,14 @@
                     <span :class="'el-icon-loading '+ data.displayNone"></span>
                     <span :class="data.icon"></span>
                     <span>
-                      <el-tag type="danger">层数:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag> <el-tag>会员编号:{{ node.label }}</el-tag> <el-tag>姓名:{{data.REAL_NAME}}</el-tag> <el-tag type="danger">区位:{{data.RELATIVE_LOCATION}}</el-tag> <el-tag type="success">级别:{{data.DEC_LV_NAME}}</el-tag> <el-tag type="warning">聘级:{{data.EMP_LV_NAME}}</el-tag> <el-tag>加入期数:{{data.PERIOD_AT}}</el-tag></span>
+                      <el-tag type="danger">Number of Layers: {{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag>
+                      <el-tag>Member Code: {{ node.label }}</el-tag>
+                      <el-tag>Name: {{data.REAL_NAME}}</el-tag>
+                      <el-tag type="danger">Location: {{data.RELATIVE_LOCATION}}</el-tag>
+                      <el-tag type="success">Level: {{data.DEC_LV_NAME}}</el-tag>
+                      <el-tag type="warning">Rank: {{data.EMP_LV_NAME}}</el-tag>
+                      <el-tag type="warning">Star: {{data.STAR_LV_NAME}}</el-tag>
+                      <el-tag>Number of joining periods: {{data.PERIOD_AT}}</el-tag></span>
                 </span>
         </el-tree>
     </div>

+ 88 - 79
frontendEle/src/views/finance/recharge-add.vue

@@ -1,89 +1,98 @@
 <template>
-  <div v-loading="loading">
-    <div class="white-box">
-      <el-form ref="form"  label-width="250px" class="form-page">
-        <el-form-item label="Currency">
-          <el-select v-model="form.currency" placeholder="Select">
-            <el-option
-              v-for="item in currencyList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="Recharge amount">
-            <el-input v-model="form.applyAmount"></el-input>
-        </el-form-item>
-        <el-form-item>
-            <el-button type="primary" @click="onSubmits" :loading="submitButtonStat">SAVE</el-button>
-        </el-form-item>
-      </el-form>
+    <div v-loading="loading">
+        <div class="white-box">
+            <el-form ref="form"  label-width="250px" class="form-page">
+                <el-form-item label="充值金额">
+                    <el-input v-model="form.applyAmount"></el-input>
+                </el-form-item>
+                <el-form-item label="银行账号">
+                    <el-input v-model="form.bankNo"></el-input>
+                </el-form-item>
+                <el-form-item label="汇款银行">
+                    <el-select v-model="form.openBank" placeholder="请选择开户行">
+                        <el-option v-for="(item,index) in allOpenBank" :key="index" :label="item.BANK_NAME"
+                                   :value="item.BANK_CODE"></el-option>
+                    </el-select>
+                </el-form-item>
+
+<!--                <el-form-item label="开户支行">-->
+<!--                    <el-input v-model="form.bankAddress"></el-input>-->
+<!--                </el-form-item>-->
+
+                <el-form-item>
+                    <el-button type="primary" @click="onSubmits" :loading="submitButtonStat">保存</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
     </div>
-  </div>
 </template>
 
 <script>
-import Vue from 'vue'
-import network from '@/utils/network'
-import baseInfo from '@/utils/baseInfo'
-import store from '@/utils/vuexStore'
-export default {
-  name: "recharge-add",
-  mounted() {
-    this.getData()
-  },
-  data(){
-    return{
-      currencyList: {
-        'NGN': {
-          'value': 'NGN',
-          'label': 'Nigeria naira (NGN)'
+    import Vue from 'vue'
+    import network from '@/utils/network'
+    import baseInfo from '@/utils/baseInfo'
+    import store from '@/utils/vuexStore'
+    export default {
+        name: "recharge-add",
+        mounted() {
+            this.getData()
+        },
+        data(){
+            return{
+
+                form:{
+                    applyAmount:'',
+                    bankNo:'',
+                    bankAddress:'',
+                    openBank:'',
+
+
+                },
+                loading: false,
+                allOpenBank: null,
+                submitButtonStat: false
+            }
+        },
+        methods: {
+            getData () {
+
+                network.getData(`/finance/recharge-add`).then(response => {
+                    console.log(response)
+                    this.loading = false;
+                    this.allOpenBank = response.allOpenBank;
+
+                }).catch(() => {
+                });
+
+            },
+            onSubmits() {
+                this.submitButtonStat = true
+                let path = '/finance/recharge-add'
+                let postData = {
+                    openBank: this.form.openBank,
+                    bankAddress: this.form.bankAddress,
+                    bankNo: this.form.bankNo,
+                    applyAmount: this.form.applyAmount,
+
+
+                };
+
+                return network.postData(path, postData).then(response => {
+                    console.log(response);
+                    this.$message({
+                        message: response,
+                        type: 'success'
+                    })
+                    this.submitButtonStat = false
+                    this.$router.go(-1)
+                }).catch(() => {
+                    this.submitButtonStat = false
+                })
+            },
         }
-      },
-      form:{
-        currency: 'NGN',
-        applyAmount: '',
-        // bankNo: '',
-        // bankAddress: '',
-        // openBank: '',
-      },
-      loading: false,
-      allOpenBank: null,
-      submitButtonStat: false
+
+
     }
-  },
-  methods: {
-    getData () {
-      network.getData(`/finance/recharge-add`).then(response => {
-        console.log(response)
-        this.loading = false;
-        this.allOpenBank = response.allOpenBank;
-      }).catch(() => {
-      });
-    },
-    onSubmits() {
-      this.submitButtonStat = true
-      let path = '/finance/recharge-add'
-      let postData = {
-        currency: this.form.currency,
-        applyAmount: this.form.applyAmount,
-      };
-      return network.postData(path, postData).then(response => {
-        // console.log(postData)
-        // console.log(response);
-        this.$message({
-          message: response,
-          type: 'success'
-        })
-        this.submitButtonStat = false
-        this.$router.go(-1)
-      }).catch(() => {
-        this.submitButtonStat = false
-      })
-    },
-  }
-}
 </script>
 
 <style scoped>

+ 28 - 50
frontendEle/src/views/finance/recharge.vue

@@ -3,71 +3,49 @@
         <div v-loading="loading">
             <div class="white-box">
                 <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-                    <el-table-column label="Serial Number" prop="SN" width="200px">
-                    </el-table-column>
-                    <el-table-column label="Creation time"><!-- 创建时间 -->
+
+                    <el-table-column label="创建时间">
                         <template slot-scope="scope">
                             {{tool.formatDate(scope.row.CREATED_AT)}}
                         </template>
                     </el-table-column>
-<!--                    <el-table-column label="RECHARGE ORDER ID" prop="RECHARGE_ORDER_ID" width="200px">&lt;!&ndash;PS订单ID&ndash;&gt;-->
-<!--                    </el-table-column>-->
-                    <el-table-column label="Currency" prop="CURRENCY" width="100px"><!--货币名称-->
-                    </el-table-column>
-                    <el-table-column label="Amount" prop="AMOUNT" width="150px">
-                    </el-table-column>
 
-                    <el-table-column label="Recharge status name" width="200px"><!-- 充值状态名称 -->
-                      <template slot-scope="scope">
-                        <el-tag :type="tool.statusType(scope.row.RECHARGE_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
-                      </template>
+                    <el-table-column label="充值金额" prop="AMOUNT">
+
                     </el-table-column>
 
-                    <el-table-column label="Acitons">
-                      <template slot-scope="scope">
-                        <template v-if="scope.row.RECHARGE_STATUS==0">
-                          <el-button type="primary" plain>To pay<!-- 去支付 --></el-button>
-                          <el-button type="info" plain disabled>verification<!-- 验证 --></el-button>
-                        </template>
-                        <template v-else-if="scope.row.RECHARGE_STATUS==1">
-                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
-                          <el-button type="primary" plain>verification<!-- 验证 --></el-button>
-                        </template>
-                        <template v-else-if="scope.row.RECHARGE_STATUS==2">
-                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
-                          <el-button type="info" plain disabled>Verified<!-- 已验证 --></el-button>
-                        </template>
-                        <template v-else>
-                          <el-button type="danger" plain disabled>Payment failed<!-- 支付失败 --></el-button>
-                          <el-button type="danger" plain disabled>verification<!-- 验证 --></el-button>
+                    <el-table-column label="充值状态名称">
+                        <template slot-scope="scope">
+                        <el-tag :type="tool.statusType(scope.row.AUDIT_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
                         </template>
-                      </template>
                     </el-table-column>
-<!--                    <el-table-column label="Remitting bank" prop="OPEN_BANK_NAME">&lt;!&ndash; 汇款银行 &ndash;&gt;-->
+                    <el-table-column label="汇款银行" prop="OPEN_BANK_NAME">
+
+                    </el-table-column>
+
+                    <el-table-column label="我的汇款账号" prop="BANK_NO">
 
-<!--                    </el-table-column>-->
+                    </el-table-column>
 
-<!--                    <el-table-column label="My remittance account number" prop="BANK_NO">&lt;!&ndash; 我的汇款账号 &ndash;&gt;-->
+                      <el-table-column label="打印凭证" width="200">
+                            <template slot-scope="scope">
+                                <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"
+                                           v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">上传凭证
+                                </el-button>
 
-<!--                    </el-table-column>-->
+                                <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"
+                                           v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">查看凭证
+                                </el-button>
+                            </template>
+                        </el-table-column>
 
-<!--                      <el-table-column label="Print voucher" width="200">&lt;!&ndash; 打印凭证 &ndash;&gt;-->
-<!--                            <template slot-scope="scope">-->
-<!--                                <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"-->
-<!--                                           v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">Upload voucher&lt;!&ndash; 上传凭证 &ndash;&gt;-->
-<!--                                </el-button>-->
 
-<!--                                <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"-->
-<!--                                           v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">View voucher&lt;!&ndash; 查看凭证 &ndash;&gt;-->
-<!--                                </el-button>-->
-<!--                            </template>-->
-<!--                        </el-table-column>-->
                 </el-table>
                 <div class="white-box-footer">
-                    <el-button type="primary" size="small" @click="handleAdd">Recharge<!-- 我要充值 --></el-button>
+                    <el-button type="primary" size="small" @click="handleAdd">我要充值</el-button>
                     <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
                 </div>
-                <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
+                <el-dialog title="上传凭证" :visible.sync="dialogAddInvoiceVisible">
                     <div v-loading="dialogAddInvoiceLoading">
                         <el-alert type="warning" :closable="false">
                             <slot name="title">
@@ -80,12 +58,12 @@
                     </div>
                 </el-dialog>
 
-                <el-dialog title="View recharge voucher" :visible.sync="dialogInvoiceVisible"><!-- 查看充值凭证 -->
+                <el-dialog title="查看充值凭证" :visible.sync="dialogInvoiceVisible">
                     <div v-loading="dialogInvoiceLoading">
                         <a :href="invoiceUrl" target="_blank"><img :src="urlimg" alt="" style="max-width: 100%"></a>
                     </div>
                     <div slot="footer" class="dialog-footer">
-                        <el-button @click="dialogInvoiceVisible = false">Confirm</el-button><!-- 确定 -->
+                        <el-button @click="dialogInvoiceVisible = false">确 定</el-button>
                     </div>
                 </el-dialog>
             </div>
@@ -210,7 +188,7 @@
             handleSuccess(response, file) {
                 this.getData()
                 this.$message({
-                    message: 'Upload voucher completed!',//上传凭证完成
+                    message: '上传凭证完成!',
                     type: 'success'
                 })
                 //this.form.image = imageUrl;