feat(bonusCount): 奖金计算添加loading
This commit is contained in:
parent
e8e0cf246d
commit
3bb0fea82d
|
@ -20,23 +20,23 @@
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 一层 -->
|
<!-- 一层 -->
|
||||||
<el-col :span="4" >
|
<el-col :span="4">
|
||||||
<el-form-item :label="$t('MN_F_T_930')">
|
<el-form-item :label="$t('MN_F_T_930')">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div>
|
<div>
|
||||||
<el-input v-model="select.period" clearable />
|
<el-input v-model="select.period" clearable />
|
||||||
</div>
|
</div>
|
||||||
<!-- <span style="margin: 0 10px">至</span>-->
|
<!-- <span style="margin: 0 10px">至</span>-->
|
||||||
<!-- <div>-->
|
<!-- <div>-->
|
||||||
<!-- <el-input v-model="select.endPeriod" clearable />-->
|
<!-- <el-input v-model="select.endPeriod" clearable />-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<div v-show="isActive">
|
<div v-show="isActive">
|
||||||
<el-col :span="4" >
|
<el-col :span="4">
|
||||||
<el-form-item :label="$t('MN_F_T_931')">
|
<el-form-item :label="$t('MN_F_T_931')">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="select.isRetry"
|
v-model="select.isRetry"
|
||||||
|
@ -111,8 +111,8 @@
|
||||||
:range-separator="$t('w_0139')"
|
:range-separator="$t('w_0139')"
|
||||||
:start-placeholder="$t('CK_KS_4')"
|
:start-placeholder="$t('CK_KS_4')"
|
||||||
:end-placeholder="$t('CK_KS_5')"
|
:end-placeholder="$t('CK_KS_5')"
|
||||||
@change="changeTime"
|
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
|
@change="changeTime"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
class="my_search"
|
class="my_search"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openFullScreen"
|
@click="searchHandle"
|
||||||
> {{ $t('MN_T_2') }}</el-button>
|
> {{ $t('MN_T_2') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
class="my_reset"
|
class="my_reset"
|
||||||
|
@ -142,42 +142,47 @@
|
||||||
<div class="maintop">
|
<div class="maintop">
|
||||||
<div class="mainbtn">
|
<div class="mainbtn">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-has-buttons="['bonusCountSettlement']"
|
||||||
size="small"
|
size="small"
|
||||||
style="background-color: #48B2FD;"
|
style="background-color: #48B2FD;"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
|
:loading="calculateOperatorLoading"
|
||||||
@click="balance"
|
@click="balance"
|
||||||
v-has-buttons="['bonusCountSettlement']"
|
|
||||||
>{{ $t('MN_F_T_934') }}</el-button>
|
>{{ $t('MN_F_T_934') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-has-buttons="['bonusCountPublish']"
|
||||||
size="small"
|
size="small"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
|
:loading="calculateOperatorLoading"
|
||||||
@click="publish"
|
@click="publish"
|
||||||
v-has-buttons="['bonusCountPublish']"
|
|
||||||
>{{ $t('MN_F_T_935') }}</el-button>
|
>{{ $t('MN_F_T_935') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
|
:loading="calculateOperatorLoading"
|
||||||
@click="publish1"
|
@click="publish1"
|
||||||
>{{ $t('MN_F_T_936') }}</el-button>
|
>{{ $t('MN_F_T_936') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-has-buttons="['bonusCountGrant']"
|
||||||
size="small"
|
size="small"
|
||||||
style="background-color: #009B58"
|
style="background-color: #009B58"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
v-has-buttons="['bonusCountGrant']"
|
:loading="calculateOperatorLoading"
|
||||||
@click="grant"
|
@click="grant"
|
||||||
>{{ $t('MN_F_T_937') }}</el-button>
|
>{{ $t('MN_F_T_937') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-has-buttons="['bonusCountCash']"
|
||||||
size="small"
|
size="small"
|
||||||
style="background-color: #48B2FD"
|
style="background-color: #48B2FD"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
|
:loading="calculateOperatorLoading"
|
||||||
@click="withdraw"
|
@click="withdraw"
|
||||||
v-has-buttons="['bonusCountCash']"
|
|
||||||
>{{ $t('MN_F_T_938') }}</el-button>
|
>{{ $t('MN_F_T_938') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-dropdown :hide-on-click="false">
|
<el-dropdown :hide-on-click="false">
|
||||||
<span class="el-dropdown-link kuang">
|
<span class="el-dropdown-link kuang">
|
||||||
{{$t('MN_F_T_939')}}<i class="el-icon-arrow-down el-icon--right" />
|
{{ $t('MN_F_T_939') }}<i class="el-icon-arrow-down el-icon--right" />
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
@ -205,7 +210,7 @@
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection"> </el-table-column>
|
<el-table-column type="selection" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="pkId"
|
prop="pkId"
|
||||||
|
@ -275,15 +280,15 @@
|
||||||
:label="$t('MN_F_T_945')+'(%)'"
|
:label="$t('MN_F_T_945')+'(%)'"
|
||||||
:formatter="stateFormat"
|
:formatter="stateFormat"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column-->
|
<!-- <el-table-column-->
|
||||||
<!-- v-for="item in menuList"-->
|
<!-- v-for="item in menuList"-->
|
||||||
<!-- v-if="item.checked&&item.id != 0&&item.id < 5"-->
|
<!-- v-if="item.checked&&item.id != 0&&item.id < 5"-->
|
||||||
<!-- :key="item.id"-->
|
<!-- :key="item.id"-->
|
||||||
<!-- align="center"-->
|
<!-- align="center"-->
|
||||||
<!-- width="130"-->
|
<!-- width="130"-->
|
||||||
<!-- :prop="item.prop"-->
|
<!-- :prop="item.prop"-->
|
||||||
<!-- :label="item.text"-->
|
<!-- :label="item.text"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="isSettleVal"
|
prop="isSettleVal"
|
||||||
|
@ -354,17 +359,17 @@
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="heji">-->
|
<!-- <div class="heji">-->
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
<!-- v-for="item in menuList"-->
|
<!-- v-for="item in menuList"-->
|
||||||
<!-- v-if="item.checked&&item.id != 0&&item.id > 13"-->
|
<!-- v-if="item.checked&&item.id != 0&&item.id > 13"-->
|
||||||
<!-- :key="item.id"-->
|
<!-- :key="item.id"-->
|
||||||
<!-- class="dis"-->
|
<!-- class="dis"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <div>{{ item.text }}</div>-->
|
<!-- <div>{{ item.text }}</div>-->
|
||||||
<!-- <div>{{ tableData[item.prop] }}</div>-->
|
<!-- <div>{{ tableData[item.prop] }}</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<pagination
|
<pagination
|
||||||
|
@ -384,23 +389,23 @@ import * as api from '@/api/settle.js'
|
||||||
import { classifyUpdate, classifySave } from '@/api/product'
|
import { classifyUpdate, classifySave } from '@/api/product'
|
||||||
import * as log from '@/api/logistics'
|
import * as log from '@/api/logistics'
|
||||||
import { getcountryAllList } from '@/api/exchangerate'
|
import { getcountryAllList } from '@/api/exchangerate'
|
||||||
import {getDealerYesno, settleBonus, publishBonus, grantBonus, withdrawalBonus, noPublishBonus,} from '@/api/member'
|
import { getDealerYesno, settleBonus, publishBonus, grantBonus, withdrawalBonus, noPublishBonus } from '@/api/member'
|
||||||
import { listPeriod } from '@/api/bonus'
|
import { listPeriod } from '@/api/bonus'
|
||||||
import { Message } from 'element-ui'
|
import { Message } from 'element-ui'
|
||||||
import {isLocal, isLocalSymbol, stateFormat} from "@/utils/numberToCurrency";
|
import { isLocal, isLocalSymbol, stateFormat } from '@/utils/numberToCurrency'
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex'
|
||||||
import { Loading } from 'element-ui';
|
import { Loading } from 'element-ui'
|
||||||
export default {
|
export default {
|
||||||
name: 'Bzpz',
|
name: 'Bzpz',
|
||||||
components: {
|
components: {
|
||||||
topBar
|
topBar
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
isAgree(val) {
|
isAgree(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
return this.$t('ENU_POPUP_TYPE_1');
|
return this.$t('ENU_POPUP_TYPE_1')
|
||||||
} else {
|
} else {
|
||||||
return this.$t('ENU_POPUP_TYPE_2');
|
return this.$t('ENU_POPUP_TYPE_2')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -421,18 +426,18 @@ export default {
|
||||||
digList: [
|
digList: [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: this.$t('ENU_POPUP_TYPE_1'),
|
label: this.$t('ENU_POPUP_TYPE_1')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: this.$t('ENU_POPUP_TYPE_2'),
|
label: this.$t('ENU_POPUP_TYPE_2')
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
menuList: [
|
menuList: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
text: this.$t('MN_F_T_948'),
|
text: this.$t('MN_F_T_948'),
|
||||||
checked: true,
|
checked: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
@ -444,19 +449,19 @@ export default {
|
||||||
id: 2,
|
id: 2,
|
||||||
text: `${this.$t('MN_F_T_843')}(${isLocalSymbol()})`,
|
text: `${this.$t('MN_F_T_843')}(${isLocalSymbol()})`,
|
||||||
checked: true,
|
checked: true,
|
||||||
prop: 'upgradeAmountDollar',
|
prop: 'upgradeAmountDollar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
text: `${this.$t('MN_F_T_854')}(${isLocalSymbol()})`,
|
text: `${this.$t('MN_F_T_854')}(${isLocalSymbol()})`,
|
||||||
checked: true,
|
checked: true,
|
||||||
prop: 'repurchaseAmountDollar',
|
prop: 'repurchaseAmountDollar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
text: `${this.$t('MN_F_T_943')}(${isLocalSymbol()})`,
|
text: `${this.$t('MN_F_T_943')}(${isLocalSymbol()})`,
|
||||||
checked: true,
|
checked: true,
|
||||||
prop: 'fansAmountDollar',
|
prop: 'fansAmountDollar'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
creationTime: [],
|
creationTime: [],
|
||||||
|
@ -495,10 +500,7 @@ export default {
|
||||||
yieldStatus: [],
|
yieldStatus: [],
|
||||||
countryList: [],
|
countryList: [],
|
||||||
orderTypeList: [],
|
orderTypeList: [],
|
||||||
button1Flag:false,
|
calculateOperatorLoading: false
|
||||||
button2Flag:false,
|
|
||||||
button3Flag:false,
|
|
||||||
button4Flag:false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -529,6 +531,7 @@ export default {
|
||||||
const verify = this.verifySelect()
|
const verify = this.verifySelect()
|
||||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
this.calculateOperatorLoading = true
|
||||||
settleBonus({ 'settleDate': time }).then((res) => {
|
settleBonus({ 'settleDate': time }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
|
@ -541,6 +544,8 @@ export default {
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.calculateOperatorLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -549,6 +554,7 @@ export default {
|
||||||
const verify = this.verifySelect()
|
const verify = this.verifySelect()
|
||||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
this.calculateOperatorLoading = true
|
||||||
noPublishBonus({ 'settleDate': time }).then((res) => {
|
noPublishBonus({ 'settleDate': time }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
|
@ -561,6 +567,8 @@ export default {
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.calculateOperatorLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -569,6 +577,7 @@ export default {
|
||||||
const verify = this.verifySelect()
|
const verify = this.verifySelect()
|
||||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
this.calculateOperatorLoading = true
|
||||||
publishBonus({ 'settleDate': time }).then((res) => {
|
publishBonus({ 'settleDate': time }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
|
@ -581,6 +590,8 @@ export default {
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.calculateOperatorLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -589,6 +600,7 @@ export default {
|
||||||
const verify = this.verifySelect()
|
const verify = this.verifySelect()
|
||||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
this.calculateOperatorLoading = true
|
||||||
grantBonus({ 'settleDate': time }).then((res) => {
|
grantBonus({ 'settleDate': time }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
|
@ -601,6 +613,8 @@ export default {
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.calculateOperatorLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -609,6 +623,7 @@ export default {
|
||||||
const verify = this.verifySelect()
|
const verify = this.verifySelect()
|
||||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
this.calculateOperatorLoading = true
|
||||||
withdrawalBonus({ 'settleDate': time }).then((res) => {
|
withdrawalBonus({ 'settleDate': time }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
|
@ -621,6 +636,8 @@ export default {
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.calculateOperatorLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -654,7 +671,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
if(val){
|
if (val) {
|
||||||
this.select.startDate = val[0]
|
this.select.startDate = val[0]
|
||||||
this.select.endDate = val[1]
|
this.select.endDate = val[1]
|
||||||
}
|
}
|
||||||
|
@ -675,7 +692,7 @@ export default {
|
||||||
const sums = []
|
const sums = []
|
||||||
columns.forEach((column, index) => {
|
columns.forEach((column, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
sums[index] = this.$t('MN_F_T_951') +'(¥)'
|
sums[index] = this.$t('MN_F_T_951') + '(¥)'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
|
@ -750,36 +767,36 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDataList() {
|
getDataList() {
|
||||||
if(this.select.period){
|
if (this.select.period) {
|
||||||
this.select.period=parseInt(this.select.period)
|
this.select.period = parseInt(this.select.period)
|
||||||
}
|
}
|
||||||
if (this.creationTime == '' || this.creationTime == null) {
|
if (this.creationTime == '' || this.creationTime == null) {
|
||||||
this.select.startDate = ''
|
this.select.startDate = ''
|
||||||
this.select.endDate = ''
|
this.select.endDate = ''
|
||||||
}
|
}
|
||||||
Number(this.select)
|
Number(this.select)
|
||||||
listPeriod(Object.assign({}, this.select),`?pageNum=${this.queryParams.pageNum}&pageSize=${this.queryParams.pageSize}`)
|
listPeriod(Object.assign({}, this.select), `?pageNum=${this.queryParams.pageNum}&pageSize=${this.queryParams.pageSize}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.tableData.censusSummaryList = res.rows
|
this.tableData.censusSummaryList = res.rows
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openFullScreen(){
|
searchHandle() {
|
||||||
const loading = Loading.service({
|
const loading = Loading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading',
|
text: 'Loading',
|
||||||
background: 'rgba(0, 0, 0, 0.7)',
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.close()
|
loading.close()
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {},
|
handleSelectionChange(val) {},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams
|
const queryParams = this.queryParams
|
||||||
this.$confirm( this.$t('MN_F_T_407'), this.$t('MN_F_T_304'), {
|
this.$confirm(this.$t('MN_F_T_407'), this.$t('MN_F_T_304'), {
|
||||||
confirmButtonText: this.$t('w_0035'),
|
confirmButtonText: this.$t('w_0035'),
|
||||||
cancelButtonText: this.$t('ENU_P_TYPE0'),
|
cancelButtonText: this.$t('ENU_P_TYPE0'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|
Loading…
Reference in New Issue