feat(bonusCount): operator btn add loading
This commit is contained in:
parent
99ae5a99fb
commit
8e79b93744
|
@ -21,15 +21,11 @@
|
|||
<el-row>
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'奖金期数'">
|
||||
<el-form-item label="奖金期数">
|
||||
<div style="display: flex">
|
||||
<div>
|
||||
<el-input v-model="select.period" clearable />
|
||||
</div>
|
||||
<!-- <span style="margin: 0 10px">至</span>-->
|
||||
<!-- <div>-->
|
||||
<!-- <el-input v-model="select.endPeriod" clearable />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -111,8 +107,8 @@
|
|||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
format="yyyy-MM-dd"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -133,45 +129,45 @@
|
|||
|
||||
</el-row>
|
||||
|
||||
<!-- <div class="openClose" @click="changeActive">-->
|
||||
<!-- <i :class="isActive ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>-->
|
||||
<!-- <div>{{ isActive ? '点击收起' : '点击展开' }}</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</el-form>
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountSettlement']"
|
||||
size="small"
|
||||
style="background-color: #48B2FD;"
|
||||
class="thebtn2"
|
||||
:loading="operatorLoading"
|
||||
@click="balance"
|
||||
v-has-buttons="['bonusCountSettlement']"
|
||||
>{{ '结算' }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountPublish']"
|
||||
size="small"
|
||||
class="thebtn2"
|
||||
:loading="operatorLoading"
|
||||
@click="publish"
|
||||
v-has-buttons="['bonusCountPublish']"
|
||||
>{{ '公布' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="thebtn2"
|
||||
:loading="operatorLoading"
|
||||
@click="publish1"
|
||||
>{{ '不公布' }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountGrant']"
|
||||
size="small"
|
||||
style="background-color: #009B58"
|
||||
class="thebtn2"
|
||||
v-has-buttons="['bonusCountGrant']"
|
||||
:loading="operatorLoading"
|
||||
@click="grant"
|
||||
>{{ '发放' }}</el-button>
|
||||
<el-button
|
||||
v-has-buttons="['bonusCountCash']"
|
||||
size="small"
|
||||
style="background-color: #48B2FD"
|
||||
class="thebtn2"
|
||||
:loading="operatorLoading"
|
||||
@click="withdraw"
|
||||
v-has-buttons="['bonusCountCash']"
|
||||
>{{ '提现' }}</el-button>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -196,9 +192,9 @@
|
|||
<div class="itemTrading">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="loading"
|
||||
height="690px"
|
||||
class="content"
|
||||
v-loading="loading"
|
||||
:data="tableData.censusSummaryList"
|
||||
style="width: 100%;"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
|
@ -206,7 +202,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"
|
||||
|
@ -276,15 +272,6 @@
|
|||
:label="'当月复购拨比'+'(%)'"
|
||||
:formatter="stateFormat"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- v-for="item in menuList"-->
|
||||
<!-- v-if="item.checked&&item.id != 0&&item.id < 5"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- align="center"-->
|
||||
<!-- width="130"-->
|
||||
<!-- :prop="item.prop"-->
|
||||
<!-- :label="item.text"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="isSettleVal"
|
||||
|
@ -331,41 +318,8 @@
|
|||
width="auto"
|
||||
label=""
|
||||
/>
|
||||
<!-- <el-table-column align="center"-->
|
||||
<!-- prop="time"-->
|
||||
<!-- :label="'操作'" fixed="right" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button @click="toFixed(scope.row.pkId)"-->
|
||||
<!-- type="text"-->
|
||||
<!-- size="small">-->
|
||||
<!-- 修改-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button @click="toFixed(scope.row.pkId)"-->
|
||||
<!-- type="text"-->
|
||||
<!-- size="small">-->
|
||||
<!-- 查看-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button @click="handleDelete(scope.row.pkId)"-->
|
||||
<!-- type="text"-->
|
||||
<!-- size="small"-->
|
||||
<!-- style="color: #c73030">-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- <div class="heji">-->
|
||||
<!-- <div-->
|
||||
<!-- v-for="item in menuList"-->
|
||||
<!-- v-if="item.checked&&item.id != 0&&item.id > 13"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- class="dis"-->
|
||||
<!-- >-->
|
||||
<!-- <div>{{ item.text }}</div>-->
|
||||
<!-- <div>{{ tableData[item.prop] }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
|
@ -385,11 +339,11 @@ 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 { isLocal, isLocalSymbol, stateFormat } from '@/utils/numberToCurrency'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
|
@ -398,9 +352,9 @@ export default {
|
|||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许';
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止';
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -421,18 +375,18 @@ export default {
|
|||
digList: [
|
||||
{
|
||||
value: 0,
|
||||
label: '允许',
|
||||
label: '允许'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '禁止',
|
||||
},
|
||||
label: '禁止'
|
||||
}
|
||||
],
|
||||
menuList: [
|
||||
{
|
||||
id: 0,
|
||||
text: '全选',
|
||||
checked: true,
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
|
@ -444,19 +398,19 @@ export default {
|
|||
id: 2,
|
||||
text: `${'复购金额'}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'upgradeAmountDollar',
|
||||
prop: 'upgradeAmountDollar'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: `${'首购金额'}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'repurchaseAmountDollar',
|
||||
prop: 'repurchaseAmountDollar'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: `${'当月首购拨比'}(${isLocalSymbol()})`,
|
||||
checked: true,
|
||||
prop: 'fansAmountDollar',
|
||||
prop: 'fansAmountDollar'
|
||||
}
|
||||
],
|
||||
creationTime: [],
|
||||
|
@ -496,10 +450,7 @@ export default {
|
|||
yieldStatus: [],
|
||||
countryList: [],
|
||||
orderTypeList: [],
|
||||
button1Flag:false,
|
||||
button2Flag:false,
|
||||
button3Flag:false,
|
||||
button4Flag:false,
|
||||
operatorLoading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -530,6 +481,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.operatorLoading = true
|
||||
settleBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -542,6 +494,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.operatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -550,6 +504,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.operatorLoading = true
|
||||
noPublishBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -562,6 +517,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.operatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -570,6 +527,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.operatorLoading = true
|
||||
publishBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -582,6 +540,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.operatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -602,6 +562,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.operatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -610,6 +572,7 @@ export default {
|
|||
const verify = this.verifySelect()
|
||||
const time = this.$refs.multipleTable.selection[0].settleDate
|
||||
if (verify) {
|
||||
this.operatorLoading = true
|
||||
withdrawalBonus({ 'settleDate': time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Message({
|
||||
|
@ -622,6 +585,8 @@ export default {
|
|||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.operatorLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue