|
|
@@ -20,8 +20,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('bonus.timeframe')" width="260"><!-- 时间范围 -->
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- 应开始于 -->Should start on:{{getWatTime(scope.row.START_TIME)}}<br/>
|
|
|
- <!-- 应结束于 -->Should end on:{{getWatTime(scope.row.END_TIME)}}
|
|
|
+ <!-- 应开始于 -->{{ $t('bonus.shouldStartOn') }}:{{getWatTime(scope.row.START_TIME)}}<br/>
|
|
|
+ <!-- 应结束于 -->{{ $t('bonus.shouldEndOn') }}:{{getWatTime(scope.row.END_TIME)}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('bonus.closingTime')" width="180"><!-- 封期时间 -->
|
|
|
@@ -37,8 +37,8 @@
|
|
|
<!-- </el-table-column>-->
|
|
|
<el-table-column :label="$t('bonus.timeOfGeneratingPerformanceSheet')" width="230"><!-- 生成业绩单时间 -->
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- 开始 -->start:{{getWatTime(scope.row.PERF_STARTED_AT)}}<br>
|
|
|
- <!-- 完成 -->complete:{{getWatTime(scope.row.PERFED_AT)}}
|
|
|
+ <!-- 开始 -->{{ $t('bonus.start') }}:{{getWatTime(scope.row.PERF_STARTED_AT)}}<br>
|
|
|
+ <!-- 完成 -->{{ $t('bonus.complete') }}:{{getWatTime(scope.row.PERFED_AT)}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="Settlement progress" width="80"><!– 结算进度 –>-->
|
|
|
@@ -49,8 +49,8 @@
|
|
|
<!-- </el-table-column>-->
|
|
|
<el-table-column :label="$t('bonus.settlementDate')" width="230"><!-- 结算时间 -->
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- 开始 -->start:{{getWatTime(scope.row.CALCULATE_STARTED_AT)}}<br>
|
|
|
- <!-- 完成 -->complete:{{getWatTime(scope.row.CALCULATED_AT)}}
|
|
|
+ <!-- 开始 -->{{ $t('bonus.start') }}:{{getWatTime(scope.row.CALCULATE_STARTED_AT)}}<br>
|
|
|
+ <!-- 完成 -->{{ $t('bonus.complete') }}:{{getWatTime(scope.row.CALCULATED_AT)}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="Network connection progress" width="80"><!– 挂网进度 –>-->
|
|
|
@@ -61,11 +61,11 @@
|
|
|
<!-- </el-table-column>-->
|
|
|
<el-table-column :label="$t('bonus.networkConnectionTime')" width="230"><!-- 挂网时间 -->
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- 开始 -->start:{{getWatTime(scope.row.SEND_STARTED_AT)}}<br/>
|
|
|
- <!-- 完成 -->complete:{{getWatTime(scope.row.SENT_AT)}}
|
|
|
+ <!-- 开始 -->{{ $t('bonus.start') }}:{{getWatTime(scope.row.SEND_STARTED_AT)}}<br/>
|
|
|
+ <!-- 完成 -->{{ $t('bonus.complete') }}:{{getWatTime(scope.row.SENT_AT)}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column fixed="right" :label="$t('common.action')" width=""><!-- 操作 -->
|
|
|
+ <el-table-column :fixed="fixed" :label="$t('common.action')" width=""><!-- 操作 -->
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" class="button" type="primary"-->
|
|
|
<!-- @click.native="trialCalcHandle(scope.row.PERIOD_NUM)" >-->
|
|
|
@@ -80,17 +80,17 @@
|
|
|
</el-button>
|
|
|
<el-button style="margin: 0 0 !important;" @click.native="sentHandle(scope.row)" type="primary" class="button"
|
|
|
v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">
|
|
|
- <!-- 挂网 -->spread a net
|
|
|
+ <!-- 挂网 -->{{ $t('bonus.spreadNet') }}
|
|
|
</el-button>
|
|
|
|
|
|
- <el-dialog :title="`第${currentPeriod}期计算任务日志`" :visible.sync="dialogTableVisible" append-to-body width="60%">
|
|
|
+ <el-dialog :title="$t('bonus.logTitle', { currentPeriod: currentPeriod })" :visible.sync="dialogTableVisible" append-to-body :width="screenWidth">
|
|
|
<el-row>
|
|
|
<el-button style="margin-left:10px;" class="button" type="primary" @click.native="getDialogData();dialogLoading=true;" >
|
|
|
{{$t('bonus.logRefresh')}}
|
|
|
</el-button>
|
|
|
</el-row>
|
|
|
<el-divider></el-divider>
|
|
|
-
|
|
|
+
|
|
|
<el-row>
|
|
|
<el-button class="button customstyle" style="margin-left:10px;" type="success" @click.native="autoCalcHandle(currentPeriod)"
|
|
|
v-if="permission.hasPermission(`bonus/calc-period`)"
|
|
|
@@ -101,8 +101,8 @@
|
|
|
<el-button class="button customstyle" type="primary" @click.native="pullPerfPeriodHandle(currentPeriod)" >{{$t('bonus.pullPeriodPerformance')}}</el-button>
|
|
|
<el-button class="button customstyle" type="primary" @click.native="calcBonusHandle(currentPeriod)" >{{$t('bonus.calculationOfBonus')}}</el-button>
|
|
|
<el-button class="button customstyle" type="primary" @click.native="pullBonusHandle(currentPeriod)" >{{$t('bonus.pullBonusData')}}</el-button>
|
|
|
- </el-row>
|
|
|
-
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<!-- <el-row><el-button class="button" type="primary" @click.native="autoPerfHandle(currentPeriod)" >计算和拉取期业绩</el-button></el-row>-->
|
|
|
<div>
|
|
|
<el-table :data="dialogData" height="550" v-loading="dialogLoading" style="width: 100%">
|
|
|
@@ -170,6 +170,7 @@ import Pagination from '@/components/Pagination'
|
|
|
import filterHelper from '../../utils/filterHelper'
|
|
|
import { fetchPeriod,fetchAutoWithdraw,fetchRecordList,fetchAutoCalc,fetchPerfOrderList,fetchInitData,fetchCalcPerfPeriod,fetchPullPerfPeriod,fetchCalcBonus,fetchSyncCalcRecord,fetchPullBonus,fetchClosePeriod,fetchCalcPeriod,fetchPerfPeriod,fetchSendPeriod } from '@/api/bonus'
|
|
|
import ElementUI from 'element-ui'
|
|
|
+import {getScreenWidth} from "@/utils";
|
|
|
|
|
|
export default {
|
|
|
name: 'bonus-period',
|
|
|
@@ -192,7 +193,7 @@ export default {
|
|
|
},
|
|
|
mounted () {
|
|
|
this.getData(this.currentPage, this.pageSize)
|
|
|
- store.state.socket.onMessageCallback = this.onMessageCallback
|
|
|
+ // store.state.socket.onMessageCallback = this.onMessageCallback
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -241,15 +242,18 @@ export default {
|
|
|
resource: '',
|
|
|
desc: ''
|
|
|
},
|
|
|
- formLabelWidth: '120px'
|
|
|
+ formLabelWidth: '120px',
|
|
|
+ fixed: getScreenWidth() < 500 ? false : 'right',
|
|
|
+ screenWidth: getScreenWidth() > 600 ? '600px' : getScreenWidth() + 'px',
|
|
|
+ labelPosition: getScreenWidth() >= 600 ? 'right' : 'top',
|
|
|
};
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
autoCalcHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to perform settlement operation for the auto current period?', 'Hint', { // '确定对当前期进行结算操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.autoSettlementHint'), this.$t('common.hint'), { // '确定对当前期进行结算操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
// return network.getData(`calc/auto-calc/${currentPeriod}`)
|
|
|
@@ -267,9 +271,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
perfOrderHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to generate performance order for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.generatePerformanceOrderHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchPerfOrderList(currentPeriod)
|
|
|
@@ -286,9 +290,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
initDataHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.generatePerformanceSheetHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchInitData(currentPeriod)
|
|
|
@@ -305,9 +309,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
perfPeriodHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.generatePerformanceSheetHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchCalcPerfPeriod(currentPeriod)
|
|
|
@@ -324,9 +328,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
pullPerfPeriodHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to pull performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.pullPerformanceSheetHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchPullPerfPeriod(currentPeriod)
|
|
|
@@ -343,9 +347,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
calcBonusHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.calculateBonusDataHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchCalcBonus(currentPeriod)
|
|
|
@@ -362,9 +366,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
calcBonusRecordHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to sync calculate bonus record for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.syncCalculateBonusRecordHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchSyncCalcRecord(currentPeriod)
|
|
|
@@ -381,9 +385,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
pullBonusHandle(currentPeriod) {
|
|
|
- this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.calculateBonusDataHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchPullBonus(currentPeriod)
|
|
|
@@ -400,9 +404,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// trialCalcHandle (currentPeriod) {
|
|
|
- // this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- // confirmButtonText: 'confirm', // 确定
|
|
|
- // cancelButtonText: 'cancel', // 取消
|
|
|
+ // this.$confirm('Confirm to calculate bonus data for the current period?', this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ // confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ // cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
// type: 'warning'
|
|
|
// }).then(() => {
|
|
|
// return network.getData(`calc/trial-calc/${currentPeriod}`)
|
|
|
@@ -429,9 +433,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
closeHandle (row) {
|
|
|
- this.$confirm('Confirm to manually seal the current period?', 'Hint', { // '确定对当前期进行手动封期操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.manuallySealHint'), this.$t('common.hint'), { // '确定对当前期进行手动封期操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchClosePeriod(row.PERIOD_NUM)
|
|
|
@@ -448,9 +452,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
calcHandle (row) {
|
|
|
- this.$confirm('Confirm to perform settlement operation for the current period?', 'Hint', { // '确定对当前期进行结算操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.performSettlementOperationHint'), this.$t('common.hint'), { // '确定对当前期进行结算操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchCalcPeriod(row.PERIOD_NUM)
|
|
|
@@ -467,9 +471,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
perfHandle (row) {
|
|
|
- this.$confirm('Confirm to generate performance sheet for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.generatePerformanceSheetHint'), this.$t('common.hint'), { // '确定对当前期进行生成业绩单操作?', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchPerfPeriod(row.PERIOD_NUM)
|
|
|
@@ -486,9 +490,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
sentHandle (row) {
|
|
|
- this.$confirm('Are you sure to connect the current period? Performance sheet and settlement cannot be generated after network connection', 'Hint', { // '确定对当前期进行挂网操作?挂网后无法生成业绩单和结算', '提示'
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.spreadNetHint'), this.$t('common.hint'), { // '确定对当前期进行挂网操作?挂网后无法生成业绩单和结算', '提示'
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return fetchSendPeriod(row.PERIOD_NUM)
|
|
|
@@ -505,9 +509,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
doAutoWithdraw () {
|
|
|
- this.$confirm('全部提现?', 'Hint', {
|
|
|
- confirmButtonText: 'confirm', // 确定
|
|
|
- cancelButtonText: 'cancel', // 取消
|
|
|
+ this.$confirm(this.$t('bonus.allWithdrawalHint'), this.$t('common.hint'), {
|
|
|
+ confirmButtonText: this.$t('common.confirm'), // 确定
|
|
|
+ cancelButtonText: this.$t('common.cancel'), // 取消
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
//return network.getData(`bonus/auto-withdraw`)
|