feat(bonusCount): 奖金计算添加loading
This commit is contained in:
parent
e8e0cf246d
commit
3bb0fea82d
|
@ -111,8 +111,8 @@
|
|||
:range-separator="$t('w_0139')"
|
||||
:start-placeholder="$t('CK_KS_4')"
|
||||
:end-placeholder="$t('CK_KS_5')"
|
||||
@change="changeTime"
|
||||
format="yyyy-MM-dd"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -120,7 +120,7 @@
|
|||
<el-button
|
||||
class="my_search"
|
||||
type="primary"
|
||||
@click="openFullScreen"
|
||||
@click="searchHandle"
|
||||
> {{ $t('MN_T_2') }}</el-button>
|
||||
<el-button
|
||||
class="my_reset"
|
||||
|
@ -142,36 +142,41 @@
|
|||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountSettlement']"
|
||||
size="small"
|
||||
style="background-color: #48B2FD;"
|
||||
class="thebtn2"
|
||||
:loading="calculateOperatorLoading"
|
||||
@click="balance"
|
||||
v-has-buttons="['bonusCountSettlement']"
|
||||
>{{ $t('MN_F_T_934') }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountPublish']"
|
||||
size="small"
|
||||
class="thebtn2"
|
||||
:loading="calculateOperatorLoading"
|
||||
@click="publish"
|
||||
v-has-buttons="['bonusCountPublish']"
|
||||
>{{ $t('MN_F_T_935') }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="thebtn2"
|
||||
:loading="calculateOperatorLoading"
|
||||
@click="publish1"
|
||||
>{{ $t('MN_F_T_936') }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountGrant']"
|
||||
size="small"
|
||||
style="background-color: #009B58"
|
||||
class="thebtn2"
|
||||
v-has-buttons="['bonusCountGrant']"
|
||||
:loading="calculateOperatorLoading"
|
||||
@click="grant"
|
||||
>{{ $t('MN_F_T_937') }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountCash']"
|
||||
size="small"
|
||||
style="background-color: #48B2FD"
|
||||
class="thebtn2"
|
||||
:loading="calculateOperatorLoading"
|
||||
@click="withdraw"
|
||||
v-has-buttons="['bonusCountCash']"
|
||||
>{{ $t('MN_F_T_938') }}</el-button>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -205,7 +210,7 @@
|
|||
:summary-method="getSummaries"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection"> </el-table-column>
|
||||
<el-table-column type="selection" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="pkId"
|
||||
|
@ -384,12 +389,12 @@ import * as api from '@/api/settle.js'
|
|||
import { classifyUpdate, classifySave } from '@/api/product'
|
||||
import * as log from '@/api/logistics'
|
||||
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 { Message } from 'element-ui'
|
||||
import {isLocal, isLocalSymbol, stateFormat} from "@/utils/numberToCurrency";
|
||||
import {mapGetters} from "vuex";
|
||||
import { Loading } from 'element-ui';
|
||||
import { isLocal, isLocalSymbol, stateFormat } from '@/utils/numberToCurrency'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Loading } from 'element-ui'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
|
@ -398,9 +403,9 @@ export default {
|
|||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return this.$t('ENU_POPUP_TYPE_1');
|
||||
return this.$t('ENU_POPUP_TYPE_1')
|
||||
} else {
|
||||
return this.$t('ENU_POPUP_TYPE_2');
|
||||
return this.$t('ENU_POPUP_TYPE_2')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -421,18 +426,18 @@ export default {
|
|||
digList: [
|
||||
{
|
||||
value: 0,
|
||||
label: this.$t('ENU_POPUP_TYPE_1'),
|
||||
label: this.$t('ENU_POPUP_TYPE_1')
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: this.$t('ENU_POPUP_TYPE_2'),
|
||||
},
|
||||
label: this.$t('ENU_POPUP_TYPE_2')
|
||||
}
|
||||
],
|
||||
menuList: [
|
||||
{
|
||||
id: 0,
|
||||
text: this.$t('MN_F_T_948'),
|
||||
checked: true,
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
|
@ -444,19 +449,19 @@ export default {
|
|||
id: 2,
|
||||
text: `${this.$t('MN_F_T_843')}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'upgradeAmountDollar',
|
||||
prop: 'upgradeAmountDollar'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: `${this.$t('MN_F_T_854')}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'repurchaseAmountDollar',
|
||||
prop: 'repurchaseAmountDollar'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: `${this.$t('MN_F_T_943')}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'fansAmountDollar',
|
||||
prop: 'fansAmountDollar'
|
||||
}
|
||||
],
|
||||
creationTime: [],
|
||||
|
@ -495,10 +500,7 @@ export default {
|
|||
yieldStatus: [],
|
||||
countryList: [],
|
||||
orderTypeList: [],
|
||||
button1Flag:false,
|
||||
button2Flag:false,
|
||||
button3Flag:false,
|
||||
button4Flag:false,
|
||||
calculateOperatorLoading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -529,6 +531,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.calculateOperatorLoading = true
|
||||
settleBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -541,6 +544,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.calculateOperatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -549,6 +554,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.calculateOperatorLoading = true
|
||||
noPublishBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -561,6 +567,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.calculateOperatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -569,6 +577,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.calculateOperatorLoading = true
|
||||
publishBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -581,6 +590,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.calculateOperatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -589,6 +600,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.calculateOperatorLoading = true
|
||||
grantBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -601,6 +613,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.calculateOperatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -609,6 +623,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.calculateOperatorLoading = true
|
||||
withdrawalBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -621,6 +636,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.calculateOperatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -764,11 +781,11 @@ export default {
|
|||
this.total = res.total
|
||||
})
|
||||
},
|
||||
openFullScreen(){
|
||||
searchHandle() {
|
||||
const loading = Loading.service({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
|
|
Loading…
Reference in New Issue