|
|
@@ -1,43 +1,81 @@
|
|
|
<template>
|
|
|
<div class="app-container" v-loading="loading">
|
|
|
- <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>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="welcomeBonusSwitch === 1">
|
|
|
+ <el-card shadow="hover" style="margin: 10px auto;">
|
|
|
+ <el-result icon="success" :title="$t('bonus.welcomeBonus')" :subTitle="tableData.BONUS_TG.value | toThousandFilter"></el-result>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="teamBonusSwitch === 1">
|
|
|
+ <el-card shadow="hover" style="margin: 10px auto;">
|
|
|
+ <el-result icon="success" :title="$t('bonus.teamBonus')" :subTitle="tableData.ORI_BONUS_QY.value | toThousandFilter"></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')" :subTitle="tableData.ORI_BONUS_BS.value | toThousandFilter"></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')" :subTitle="tableData.ORI_BONUS_QUARTER.value | toThousandFilter"></el-result>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-show="stockistCommissionSwitch === 1">
|
|
|
+ <el-card shadow="hover" style="margin: 10px auto;">
|
|
|
+ <el-result icon="success" :title="$t('bonus.stockistCommission')" :subTitle="tableData.BONUS_BD.value | toThousandFilter"></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')" :subTitle="tableData.BONUS_TOTAL.value | toThousandFilter"></el-result>
|
|
|
+ </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>
|
|
|
|
|
|
@@ -65,7 +103,7 @@ export default {
|
|
|
this.loading = true
|
|
|
fetchHistoricalCumulativeBonus().then(response => {
|
|
|
const {tableData, bonusSwitch} = response.data
|
|
|
- this.tableData = tableData
|
|
|
+ this.tableData = tableData.length > 0 ? tableData[0] : {}
|
|
|
this.welcomeBonusSwitch = bonusSwitch.welcomeBonusSwitch
|
|
|
this.teamBonusSwitch = bonusSwitch.teamBonusSwitch
|
|
|
this.stockistCommissionSwitch = bonusSwitch.stockistCommissionSwitch
|