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

Merge branch 'feature/NG-74' of guanli/ngfrontend into master

Tyler пре 1 година
родитељ
комит
b75e167249

+ 0 - 2
src/components/TreeChart/index.vue

@@ -183,8 +183,6 @@ export default {
               "</span>" +
               '<span style="color: #000000;">' +
               params.data.EMP_LV_NAME +
-              "," +
-              params.data.CROWN_LV_NAME +
               "</span>" +
               "</div>" +
               "<div>" +

+ 26 - 6
src/lang/en.js

@@ -259,14 +259,21 @@ export default {
   },
   decLvs: {
     // 等级配置
-    '67ABC6AO8YTK2LN0E055736AECE8644D': 'BA',
-    '67ABCB8C1F7D5519E055736AECE8644D': 'Elite',
-    '67ABCCE20A9F5553E055736AECE8644D': 'Pro',
-    '67ABCE0ECE705575E055736AECE8644D': 'VIP'
+    '67ABC6AO8YTK2LN0E055736AECE8644D': 'NA',
+    '67ABCCE20A9F5553E055736AECE8677A': 'Silver',
+    '67ABCE0ECE705575E055736AECE8677C': 'Gold'
+  },
+  eliteLevels: {
+    // 等级配置
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF7C': 'Supper Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF7V': 'Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF8V': 'Pro Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8NA7V': 'NA',
   },
   dashboard: {
     highestDirector: 'Highest Director',
     highestCrown: 'Highest Crown',
+    eliteLevel: 'Elite Level',
     memberLevel: 'Member Level',
     payCycle: 'Current Pay Cycle',
     remainBv: 'Remain BV',
@@ -307,7 +314,8 @@ export default {
     uploadHints: 'Uploading, please hold on. Do not close the window!',
     canNotBeBlank: ' cannot be blank',
     require: 'is required',
-    language: "Language"
+    language: "Language",
+    noData: 'No Data'
   },
 
   shop: {
@@ -442,6 +450,7 @@ export default {
     memberLevel: 'Member Level',
     highestDirector: 'Highest Director',
     highestCrown: 'Highest Crown',
+    eliteLevel: 'Elite Level',
     latestDirector: 'Latest Director',
     latestCrown: 'Latest Crown',
     currentPayCycle: 'Current Pay Cycle',
@@ -483,6 +492,7 @@ export default {
     viewRecord: 'View Record',
     bonusFlowTitle: '%s Trading Record',
     transTime: 'Trans Date',
+    expiredTime: 'Expired Date',
     transType: 'Trans Type',
     preTransactionBalance: 'Pre Trans Balance',
     transAmount: 'Trans Amount',
@@ -496,7 +506,17 @@ export default {
     PGS: 'PGS',
     teamDetails: 'Team Details',
     latestCalculationTime: 'Latest calculation time',
-    totalBV: 'Total BV'
+    totalBV: 'Total BV',
+    eliteBonus: 'Elite Bonus',
+    proEliteBonus: 'Pro Elite Bonus',
+    superEliteBonus: 'Super Elite Bonus',
+    stockistBonus: 'Stockist Bonus',
+    leaderShipBonus: 'LeaderShip Bonus',
+    carBonus: 'Car Bonus',
+    userPerformanceBonus: 'User Performance Bonus',
+    No:'No.',
+    amount: 'Amount',
+    originalAmount: 'Original Amount'
   },
   finance: {
     applyTransfer: 'Apply For Transfer',

+ 36 - 17
src/lang/zh.js

@@ -237,14 +237,13 @@ export default {
   },
   empLevels: {
     // 级别配置
-    '67BE1C6C21F81B32E055736AECE8644D': '无级别',
-    'E121497617216708615': '1星经理',
-    '67BE5FE7857C216AE055736AECE8644D': '2星经理',
-    'E121497617216708616': '3星经理',
-    '67BE6A4D03C52288E055736AECE8644D': '4星经理',
-    '67BE6EA2070D22EBE055736AECE8644D': '5星经理',
-    '67BE742A336F2370E055736AECE8644D': '6星经理',
-    '67BE805032C22492E055736AECE8644D': '7星经理'
+    '67BE1C6C21F81B32E055736AECE8644D': "No Rank",
+    '67BE6A4D03C52288E055736AECE8644D': '1 Star Director',
+    '67BE6EA2070D22EBE055736AECE8644D': '2 Star Director',
+    '67BE742A336F2370E055736AECE8644D': '3 Star Director',
+    '67BE805032C22492E055736AECE8644D': 'Diamond',
+    '67BE805032C22492E066736AECE8644D': '2 Star Diamond',
+    '67BE805032C22492E077736AECE8644D': '3 Star Diamond'
   },
   crownLevels: {
     // 级别配置
@@ -259,16 +258,23 @@ export default {
   },
   decLvs: {
     // 等级配置
-    '67ABC6AO8YTK2LN0E055736AECE8644D': '品牌大使',
-    '67ABCB8C1F7D5519E055736AECE8644D': '银卡',
-    '67ABCCE20A9F5553E055736AECE8644D': '金卡',
-    '67ABCE0ECE705575E055736AECE8644D': '钻卡'
+    '67ABC6AO8YTK2LN0E055736AECE8644D': '无级别',
+    '67ABCCE20A9F5553E055736AECE8677A': '银卡',
+    '67ABCE0ECE705575E055736AECE8677C': '金卡'
+  },
+  eliteLevels: {
+    // 等级配置
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF7C': 'Supper Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF7V': 'Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8MF8V': 'Pro Elite',
+    'N0RI23JKCP4OBLZ6GAXYWH9D1QS8NA7V': 'NA',
   },
   dashboard: {
-    highestDirector: '最高管理星级',
+    highestDirector: '最高荣衔级别',
     highestCrown: '最高皇冠星级',
     memberLevel: '会员级别',
     payCycle: '当前业绩期',
+    eliteLevel: 'Elite 级别',
     remainBv: '剩余PV',
     activeDeadline: '活跃日期截止',
     more: '更多',
@@ -306,7 +312,8 @@ export default {
     uploadHints: '正在上传,请稍后。请勿关闭窗口!',
     canNotBeBlank: '不能为空',
     require: '必须填写',
-    language: '语言'
+    language: '语言',
+    noData: '暂无数据'
   },
   shop: {
     product: '商品',
@@ -438,8 +445,9 @@ export default {
     currentSystemTime: '系统时间',
     memberJoinTime: '加入时间',
     memberLevel: '会员等级',
-    highestDirector: '最高管理聘级',
+    highestDirector: '最高荣耀等级',
     highestCrown: '最高皇冠星级',
+    eliteLevel: 'Elite 级别',
     latestDirector: '最新管理星级',
     latestCrown: '最新皇冠星级',
     joiningPeriod: '加入期数',
@@ -463,7 +471,7 @@ export default {
   },
   bonus: {
     payCycle: '期数',
-    welcomeBonus: '销售奖金',
+    welcomeBonus: '迎新奖',
     teamBonus: '绩效奖',
     directorBonus: '管理奖',
     quarterlyBonus: '季度分红',
@@ -478,6 +486,7 @@ export default {
     viewRecord: '查看流水',
     bonusFlowTitle: '%s交易记录',
     transTime: '交易时间',
+    expiredTime: '过期时间',
     transType: '交易类型',
     preTransactionBalance: '交易前余额',
     transAmount: '交易额',
@@ -491,7 +500,17 @@ export default {
     PGS: '累计业绩',
     teamDetails: '团队情况',
     latestCalculationTime: '最新计算时间',
-    totalBV: '合计'
+    totalBV: '合计',
+    eliteBonus: 'Elite奖金',
+    proEliteBonus: 'Pro Elite奖金',
+    superEliteBonus: 'Super Elite奖金',
+    stockistBonus: '店铺奖',
+    leaderShipBonus: 'LeaderShip奖金',
+    carBonus: '车奖',
+    userPerformanceBonus: '绩效奖金',
+    No:'编号',
+    amount: '金额',
+    originalAmount: '原始金额'
   },
   finance: {
     applyTransfer: '转账',

+ 2 - 1
src/store/modules/user.js

@@ -117,7 +117,8 @@ const actions = {
           MOBILE: ret.MOBILE,
           CREATED_AT: ret.CREATED_AT,
           REAL_NAME: ret.REAL_NAME,
-          COUNTRY_ID: ret.COUNTRY_ID
+          COUNTRY_ID: ret.COUNTRY_ID,
+          ELITE_LV: ret.ELITE_LV
         })
         resolve(response)
       }).catch(error => {

+ 1 - 1
src/views/atlas/sponsor-network.vue

@@ -20,7 +20,7 @@
           <el-tag type="danger">{{ node.label }}</el-tag>
           <el-tag>{{ data.REAL_NAME }}</el-tag>
           <el-tag type="success">{{ data.DEC_LV_NAME }}</el-tag>
-          <el-tag type="warning">Highest: {{ data.EMP_LV_NAME }}, {{ data.CROWN_LV_NAME }}</el-tag>
+          <el-tag type="warning">Highest: {{ data.EMP_LV_NAME }}</el-tag>
           <el-tag>{{ data.PERIOD_AT }}</el-tag>
         </span>
       </span>

+ 35 - 1
src/views/bonus/account-list.vue

@@ -106,6 +106,35 @@
         </el-col>
       </el-row>
     </el-dialog>
+
+    <el-dialog v-loading="loading" :title="bonusFlowType" :visible.sync="userPerformanceBonusDialog" :width="screenWidth" style="margin-top: -80px;">
+      <el-table
+        :data="bonusData"
+        border
+        fit
+        highlight-current-row
+        style="margin-top: 10px;"
+        :xs="24"
+        :sm="24"
+        :lg="6"
+      >
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.No')" prop="ID" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.amount')" prop="AMOUNTS" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.originalAmount')" prop="ORIGINAL" />
+        <el-table-column :label="$t('bonus.expiredTime')" align="center" min-width="140px">
+          <template slot-scope="{row}">
+            <span>{{ row.EXPIRED_AT | parseTime('{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+
+      </el-table>
+
+      <el-row :gutter="10">
+        <el-col :xs="24" :sm="24" :lg="24" :span="24">
+          <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="handleBonusFlow(listQuery.walletType, walletName)" />
+        </el-col>
+      </el-row>
+    </el-dialog>
   </div>
 </template>
 
@@ -127,6 +156,7 @@ export default {
       dealTypeSwitch: true,
 
       dialog: false,
+      userPerformanceBonusDialog: false,
       bonusFlowType: '',
       walletName: '',
       dealTypeList: null,
@@ -165,7 +195,11 @@ export default {
         this.total = response.data.totalCount
         this.dealTypeList = response.data.dealTypes
         this.dealTypeSwitch = walletType !== 'cash'
-        this.dialog = true
+        if(this.listQuery.walletType === 'userPerformanceBonus'){
+          this.userPerformanceBonusDialog = true
+        }else {
+          this.dialog = true
+        }
         this.loading = false
       })
     },

+ 56 - 74
src/views/bonus/bonus-list.vue

@@ -1,72 +1,55 @@
 <template>
-  <div v-loading="loading" class="app-container">
-    <el-table
-      :data="tableData"
-      border
-      fit
-      highlight-current-row
-    >
-      <el-table-column align="center" min-width="100px" :label="$t('bonus.payCycle')" prop="PERIOD_NUM.value" />
-      <el-table-column v-if="welcomeBonusSwitch == 1" align="center" min-width="150px" :label="$t('bonus.welcomeBonus')" prop="BONUS_TG.value">
-        <template slot-scope="{row}">
-          {{ row.BONUS_TG.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column v-if="teamBonusSwitch == 1" align="center" min-width="130px" :label="$t('bonus.teamBonus')" prop="ORI_BONUS_QY.value">
-        <template slot-scope="{row}">
-          {{ row.ORI_BONUS_QY.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" min-width="130px" :label="$t('bonus.directorBonus')" prop="ORI_BONUS_BS.value">
-        <template slot-scope="{row}">
-          {{ row.ORI_BONUS_BS.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" min-width="150px" :label="$t('bonus.quarterlyBonus')" prop="ORI_BONUS_QUARTER.value">
-        <template slot-scope="{row}">
-          {{ row.ORI_BONUS_QUARTER.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column v-if="stockistCommissionSwitch == 1" align="center" min-width="170px" :label="$t('bonus.stockistCommission')" prop="BONUS_BD.value">
-        <template slot-scope="{row}">
-          {{ row.BONUS_BD.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" min-width="120px" :label="$t('bonus.actualBonus')" prop="BONUS_REAL.value">
-        <template slot-scope="{row}">
-          {{ row.BONUS_REAL.value | toThousandFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" min-width="100px" :label="$t('common.action')">
-        <template slot-scope="{row}">
-          <el-button-group>
-            <el-button type="primary" size="mini" @click="getOne(row.PERIOD_NUM.value)">{{ $t('common.view') }}</el-button>
-          </el-button-group>
-        </template>
-      </el-table-column>
-    </el-table>
+  <div class="app-container">
+    <div v-if="!loading" v-loading="loading" >
+      <el-table
+        :data="tableData"
+        border
+        fit
+        highlight-current-row
+      >
+        <el-table-column align="center" min-width="50px" :label="$t('bonus.payCycle')" prop="period" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.eliteBonus')" prop="welcomeBonus">
+          <template slot-scope="{row}">
+            {{ row.eliteBonus | toThousandFilter }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.proEliteBonus')" prop="proEliteBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.superEliteBonus')" prop="superEliteBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.stockistBonus')" prop="stockistBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.leaderShipBonus')" prop="leaderShipBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.welcomeBonus')" prop="welcomeBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.carBonus')" prop="carBonus" />
+        <el-table-column align="center" min-width="100px" :label="$t('bonus.userPerformanceBonus')" prop="userPerformanceBonus" />
+
+        <el-table-column align="center" min-width="100px" :label="$t('common.action')">
+          <template slot-scope="{row}">
+            <el-button-group>
+              <el-button v-if="flowBonusSwitch === 1" type="primary" size="mini" @click="getOne(row.period)">{{ $t('common.view') }}</el-button>
+            </el-button-group>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div v-else>
+      <el-empty :description="$t('common.noData')"></el-empty>
+    </div>
 
     <el-dialog v-if="bonusData" :title="bonusPayCycle" :visible.sync="dialog" :width="screenWidth" style="margin-top: -80px">
       <el-descriptions title="" class="bonus-list" :column="column" border size="medium" style="width: 100%">
-        <el-descriptions-item label-class-name="labelClass" :label="$t('shop.memberCode')"><span style="white-space: nowrap;">{{ bonusData.USER_NAME.value }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.payCycle')"><span style="white-space: nowrap;">{{ bonusData.PERIOD_NUM.value }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.memberLevel')"><span style="white-space: nowrap;">{{ bonusData.LAST_DEC_LV.value }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.whetherActive')"><span style="white-space: nowrap;">{{ bonusData.IS_ACTIVE.value == 1 ? $t('common.yes') : $t('common.no') }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.latestDirector')"><span style="white-space: nowrap;">{{ bonusData.LAST_EMP_LV.value }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.latestCrown')"><span style="white-space: nowrap;">{{ bonusData.LAST_CROWN_LV.value }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.directorPGSPerformance')"><span style="white-space: nowrap;">{{ bonusData.DIRECTOR_BONUS_PGS.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.directorBonus')"><span style="white-space: nowrap;">{{ bonusData.ORI_BONUS_BS.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item v-if="bonusData.ORI_BONUS_TG_SWITCH == 1" label-class-name="labelClass" :label="$t('bonus.welcomeBonus')"><span style="white-space: nowrap;">{{ bonusData.ORI_BONUS_TG.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item v-if="bonusData.ORI_BONUS_QY_SWITCH == 1" label-class-name="labelClass" :label="$t('bonus.teamBonus')"><span style="white-space: nowrap;">{{ bonusData.ORI_BONUS_QY.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.quarterlyBonus')"><span style="white-space: nowrap;">{{ bonusData.ORI_BONUS_QUARTER.value | amountFilter }}</span></el-descriptions-item>
-        <el-descriptions-item v-if="bonusData.BONUS_BD_SWITCH == 1" label-class-name="labelClass" :label="$t('bonus.stockistCommission')"><span style="white-space: nowrap;">{{ bonusData.BONUS_BD.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.totalBonus')"><span style="white-space: nowrap;">{{ bonusData.BONUS_TOTAL.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.actualBonus')"><span style="white-space: nowrap;">{{ bonusData.BONUS_REAL.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.leftNewlyIncreasedPerformance')"><span style="white-space: nowrap;">{{ bonusData.PV_1L.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.leftSurplusPerformance')"><span style="white-space: nowrap;">{{ bonusData.SURPLUS_1L.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.rightNewlyIncreasedPerformance')"><span style="white-space: nowrap;">{{ bonusData.PV_2L.value | toThousandFilter }}</span></el-descriptions-item>
-        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.rightSurplusPerformance')"><span style="white-space: nowrap;">{{ bonusData.SURPLUS_2L.value | toThousandFilter }}</span></el-descriptions-item>
-      </el-descriptions>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('shop.memberCode')"><span style="white-space: nowrap;">{{ bonusData.userName }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.memberLevel')"><span style="white-space: nowrap;">{{ bonusData.decLevel }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.highestDirector')"><span style="white-space: nowrap;">{{ bonusData.empLevel }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('profile.eliteLevel')"><span style="white-space: nowrap;">{{ bonusData.eliteLevel }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.eliteBonus')"><span style="white-space: nowrap;">{{ bonusData.eliteBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.proEliteBonus')"><span style="white-space: nowrap;">{{ bonusData.proEliteBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.superEliteBonus')"><span style="white-space: nowrap;">{{ bonusData.superEliteBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.stockistBonus')"><span style="white-space: nowrap;">{{ bonusData.stockistBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.leaderShipBonus')"><span style="white-space: nowrap;">{{ bonusData.leaderShipBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.welcomeBonus')"><span style="white-space: nowrap;">{{ bonusData.welcomeBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.carBonus')"><span style="white-space: nowrap;">{{ bonusData.carBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.totalBonus')"><span style="white-space: nowrap;">{{ bonusData.totalBonus }}</span></el-descriptions-item>
+        <el-descriptions-item label-class-name="labelClass" :label="$t('bonus.userPerformanceBonus')"><span style="white-space: nowrap;">{{ bonusData.userPerformanceBonus }}</span></el-descriptions-item>
+     </el-descriptions>
     </el-dialog>
   </div>
 </template>
@@ -83,9 +66,7 @@ export default {
       total: 0,
       loading: true,
 
-      welcomeBonusSwitch: 0,
-      teamBonusSwitch: 0,
-      stockistCommissionSwitch: 0,
+      flowBonusSwitch: 0,
 
       dialog: false,
       bonusData: null,
@@ -102,13 +83,14 @@ export default {
     getList() {
       this.loading = true
       fetchBonusList().then(response => {
-        const { tableData, bonusSwitch } = response.data
+        const { tableData, flowBonusSwitch } = response.data
         this.tableData = tableData
-        this.welcomeBonusSwitch = parseInt(bonusSwitch.welcomeBonusSwitch)
-        this.teamBonusSwitch = parseInt(bonusSwitch.teamBonusSwitch)
-        this.stockistCommissionSwitch = parseInt(bonusSwitch.stockistCommissionSwitch)
-
-        this.loading = false
+        this.flowBonusSwitch = parseInt(flowBonusSwitch)
+        // this.teamBonusSwitch = parseInt(bonusSwitch.teamBonusSwitch)
+        // this.stockistCommissionSwitch = parseInt(bonusSwitch.stockistCommissionSwitch)
+        if(tableData.length > 0){
+          this.loading = false
+        }
       })
     },
     getOne(periodNum) {

+ 4 - 101
src/views/bonus/historical-cumulative-bonus.vue

@@ -1,59 +1,9 @@
 <template>
   <div v-loading="loading" class="app-container">
     <el-row :gutter="20">
-      <el-col v-if="welcomeBonusSwitch === 1" :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result :title="$t('bonus.welcomeBonus')" :sub-title="tableData.BONUS_TG.value | toThousandFilter">
-            <template slot="icon">
-              <i class="el-icon-money" />
-            </template>
-          </el-result>
-        </el-card>
-      </el-col>
-
-      <el-col v-show="teamBonusSwitch === 1" :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result icon="success" :title="$t('bonus.teamBonus')" :sub-title="tableData.ORI_BONUS_QY.value | toThousandFilter">
-            <template slot="icon">
-              <i class="el-icon-money" />
-            </template>
-          </el-result>
-        </el-card>
-      </el-col>
-
-      <el-col :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result icon="success" :title="$t('bonus.directorBonus')" :sub-title="tableData.ORI_BONUS_BS.value | toThousandFilter">
-            <template slot="icon">
-              <i class="el-icon-money" />
-            </template>
-          </el-result>
-        </el-card>
-      </el-col>
-
-      <el-col :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result icon="success" :title="$t('bonus.quarterlyBonus')" :sub-title="tableData.ORI_BONUS_QUARTER.value | toThousandFilter">
-            <template slot="icon">
-              <i class="el-icon-money" />
-            </template>
-          </el-result>
-        </el-card>
-      </el-col>
-
-      <el-col v-show="stockistCommissionSwitch === 1" :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result icon="success" :title="$t('bonus.stockistCommission')" :sub-title="tableData.BONUS_BD.value | toThousandFilter">
-            <template slot="icon">
-              <i class="el-icon-money" />
-            </template>
-          </el-result>
-        </el-card>
-      </el-col>
-
-      <el-col :xs="24" :sm="12" :lg="6" :span="6">
-        <el-card shadow="hover" style="margin: 10px auto;">
-          <el-result icon="success" :title="$t('bonus.totalBonus')" :sub-title="tableData.BONUS_TOTAL.value | toThousandFilter">
+      <el-col :xs="24" :sm="12" :lg="8" :span="6" v-for="(item,index) in tableData" :key="index">
+        <el-card shadow="hover" style="margin: 10px auto;" >
+          <el-result :title="$t(`bonus.${item.name}`)" :sub-title="item.bonus | toThousandFilter">
             <template slot="icon">
               <i class="el-icon-money" />
             </template>
@@ -61,45 +11,6 @@
         </el-card>
       </el-col>
     </el-row>
-
-    <!--    <el-table-->
-    <!--      :data="tableData"-->
-    <!--      border-->
-    <!--      fit-->
-    <!--      highlight-current-row-->
-    <!--      style="width: 100%; margin-top: 25px;"-->
-    <!--    >-->
-    <!--			<el-table-column align="center" min-width="130px" :label="$t('bonus.welcomeBonus')" prop="BONUS_TG.value" v-show="welcomeBonusSwitch === 1">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.BONUS_TG.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--      <el-table-column align="center" min-width="120px" :label="$t('bonus.teamBonus')" prop="ORI_BONUS_QY.value" v-show="teamBonusSwitch === 1">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.ORI_BONUS_QY.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--      <el-table-column align="center" min-width="130px" :label="$t('bonus.directorBonus')" prop="ORI_BONUS_BS.value">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.ORI_BONUS_BS.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--      <el-table-column align="center" min-width="140px" :label="$t('bonus.quarterlyBonus')" prop="ORI_BONUS_QUARTER.value">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.ORI_BONUS_QUARTER.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--			<el-table-column align="center" min-width="170px" :label="$t('bonus.stockistCommission')" prop="BONUS_BD.value" v-show="stockistCommissionSwitch === 1">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.BONUS_BD.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--			<el-table-column align="center" min-width="120px" :label="$t('bonus.totalBonus')" prop="BONUS_TOTAL.value">-->
-    <!--				<template slot-scope="{row}">-->
-    <!--					{{ row.BONUS_TOTAL.value | toThousandFilter }}-->
-    <!--				</template>-->
-    <!--			</el-table-column>-->
-    <!--    </el-table>-->
   </div>
 </template>
 
@@ -113,10 +24,6 @@ export default {
       tableData: [],
       total: 0,
       loading: true,
-
-      welcomeBonusSwitch: 0,
-      teamBonusSwitch: 0,
-      stockistCommissionSwitch: 0
     }
   },
   created() {
@@ -127,11 +34,7 @@ export default {
       this.loading = true
       fetchHistoricalCumulativeBonus().then(response => {
         const { tableData, bonusSwitch } = response.data
-        this.tableData = tableData.length > 0 ? tableData[0] : {}
-        this.welcomeBonusSwitch = bonusSwitch.welcomeBonusSwitch
-        this.teamBonusSwitch = bonusSwitch.teamBonusSwitch
-        this.stockistCommissionSwitch = bonusSwitch.stockistCommissionSwitch
-
+        this.tableData = tableData
         this.loading = false
       })
     }

+ 4 - 6
src/views/dashboard/admin/components/PanelGroup.vue

@@ -17,15 +17,13 @@
     </el-col>
 		<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
 			<div class="card-panel">
-				<!-- <div class="card-panel-icon-wrapper icon-people">
-					<svg-icon icon-class="star" class-name="card-panel-icon" />
-				</div> -->
+
 				<div class="card-panel-description">
 					<div class="card-panel-text">
-						{{ $t('dashboard.highestCrown') }}
+						{{ $t('dashboard.eliteLevel') }}
 					</div>
 					<div class="" style="padding: 10px;">
-						{{ $t(`crownLevels.${heightCrownLv}`) }}
+						{{ $t(`eliteLevels.${eliteLv}`) }}
 					</div>
 				</div>
 			</div>
@@ -100,7 +98,7 @@
 export default {
   props: {
     heightEmpLv : String,
-		heightCrownLv: String,
+    eliteLv: String,
     decLv: String,
     cycle: String,
     rmBv: String | Number,

+ 3 - 3
src/views/dashboard/admin/index.vue

@@ -17,7 +17,7 @@
         </el-carousel-item>
       </el-carousel>
     </el-row>
-    <panel-group @handleSetLineChartData="handleSetLineChartData" :rmBv="rmBv" :endTime="endTime" :heightEmpLv='heightEmpLv' :heightCrownLv='heightCrownLv' :decLv="decLv" :key="num" :cycle="cycle" />
+    <panel-group @handleSetLineChartData="handleSetLineChartData" :rmBv="rmBv" :endTime="endTime" :heightEmpLv='heightEmpLv' :eliteLv='eliteLv' :decLv="decLv" :key="num" :cycle="cycle" />
     <el-row :gutter="40" v-loading="loading">
       <el-col :xs="24" :sm="24" :lg="12" v-for="(item,key) in news" :key="key">
         <el-card class="box-card">
@@ -127,7 +127,7 @@ export default {
       activeEnd: '',
       baseEmpLevels: [],
       heightEmpLv: '', // 最高级别
-			heightCrownLv: '',
+			eliteLv: '',
       decLv:'', // 当前等级
       cycle: '',//当前业绩期
       rmBv: '',
@@ -196,7 +196,7 @@ export default {
       this.activeEnd = ret.activeEnd
       this.decLv = ret.decLv
       this.heightEmpLv = ret.empLv
-			this.heightCrownLv = ret.crownLv
+			this.eliteLv = ret.eliteLv
       this.cycle = ret.periodNum
       this.rmBv = ret.myRemainPv
       this.endTime = ret.activeEnd

+ 3 - 2
src/views/profile/components/UserCard.vue

@@ -89,12 +89,12 @@
 							<el-col :span="12">
 								<div class="grid-content bg-purple">
 									<i class="el-icon-medal-1"></i>
-									<span>{{ $t('profile.highestCrown') }}</span>
+									<span>{{ $t('profile.eliteLevel') }}</span>
 								</div>
 							</el-col>
 							<el-col :span="12">
 								<div class="grid-content bg-purple-light">
-									<span>{{ user.crownLv }}</span>
+									<span>{{ user.eliteLv }}</span>
 								</div>
 							</el-col>
 						</el-row>
@@ -124,6 +124,7 @@ export default {
 					empLv: '',
 					crownLv: '',
 					periodNum: '',
+          eliteLv: ''
         }
       }
     },

+ 3 - 3
src/views/profile/index.vue

@@ -79,8 +79,8 @@ export default {
         // avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
         decLv: usersInfo.getBaseInfo().decLevels[usersInfo.baseData().DEC_LV].LEVEL_NAME,
         empLv: usersInfo.getBaseInfo().empLevels[usersInfo.baseData().EMP_LV].LEVEL_NAME,
-        crownLv: usersInfo.getBaseInfo().crownLevels[usersInfo.baseData().CROWN_LV].LEVEL_NAME,
-        periodNum: usersInfo.getBaseInfo().periodNum
+        periodNum: usersInfo.getBaseInfo().periodNum,
+        eliteLv: usersInfo.getBaseInfo().eliteLevels[usersInfo.baseData().ELITE_LV].LEVEL_NAME,
       }
     }
   }
@@ -92,4 +92,4 @@ export default {
   display: flex;
   justify-content: center;
 }
-</style>
+</style>