|
|
@@ -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) {
|