|
|
@@ -0,0 +1,54 @@
|
|
|
+<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" :label="$t('bonus.welcomeBonus')" prop="BONUS_TG.value" v-show="welcomeBonusSwitch === 1"></el-table-column>
|
|
|
+ <el-table-column align="center" :label="$t('bonus.teamBonus')" prop="ORI_BONUS_QY.value" v-show="teamBonusSwitch === 1"></el-table-column>
|
|
|
+ <el-table-column align="center" :label="$t('bonus.directorBonus')" prop="ORI_BONUS_BS.value"></el-table-column>
|
|
|
+ <el-table-column align="center" :label="$t('bonus.quarterlyBonus')" prop="ORI_BONUS_QUARTER.value"></el-table-column>
|
|
|
+ <el-table-column align="center" :label="$t('bonus.stockistCommission')" prop="BONUS_BD.value" v-show="stockistCommissionSwitch === 1"></el-table-column>
|
|
|
+ <el-table-column align="center" :label="$t('bonus.totalBonus')" prop="BONUS_TOTAL.value"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {fetchHistoricalCumulativeBonus} from '@/api/bonus'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'historicalCumulativeBonus',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData: [],
|
|
|
+ total: 0,
|
|
|
+ loading: true,
|
|
|
+
|
|
|
+ welcomeBonusSwitch: 0,
|
|
|
+ teamBonusSwitch: 0,
|
|
|
+ stockistCommissionSwitch: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ this.loading = true
|
|
|
+ fetchHistoricalCumulativeBonus().then(response => {
|
|
|
+ const {tableData, bonusSwitch} = response.data
|
|
|
+ this.tableData = tableData
|
|
|
+ this.welcomeBonusSwitch = bonusSwitch.welcomeBonusSwitch
|
|
|
+ this.teamBonusSwitch = bonusSwitch.teamBonusSwitch
|
|
|
+ this.stockistCommissionSwitch = bonusSwitch.stockistCommissionSwitch
|
|
|
+
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|