feat(bonusCount): operator btn add loading
This commit is contained in:
parent
99ae5a99fb
commit
8e79b93744
|
@ -20,23 +20,19 @@
|
|||
>
|
||||
<el-row>
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4" >
|
||||
<el-form-item :label="'奖金期数'">
|
||||
<el-col :span="4">
|
||||
<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>
|
||||
|
||||
<el-collapse-transition>
|
||||
<div v-show="isActive">
|
||||
<el-col :span="4" >
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'重算状态'">
|
||||
<el-select
|
||||
v-model="select.isRetry"
|
||||
|
@ -111,8 +107,8 @@
|
|||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
format="yyyy-MM-dd"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -133,51 +129,51 @@
|
|||
|
||||
</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>
|
||||
<el-dropdown :hide-on-click="false">
|
||||
<span class="el-dropdown-link kuang">
|
||||
{{'筛选字段'}}<i class="el-icon-arrow-down el-icon--right" />
|
||||
{{ '筛选字段' }}<i class="el-icon-arrow-down el-icon--right" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
|
@ -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,22 +339,22 @@ 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: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
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: [],
|
||||
|
@ -472,7 +426,7 @@ export default {
|
|||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
loading:false,
|
||||
loading: false,
|
||||
tableData: {
|
||||
censusSummaryList: []
|
||||
},
|
||||
|
@ -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
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -655,7 +620,7 @@ export default {
|
|||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
if(val){
|
||||
if (val) {
|
||||
this.select.startDate = val[0]
|
||||
this.select.endDate = val[1]
|
||||
}
|
||||
|
@ -676,7 +641,7 @@ export default {
|
|||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计' +'(¥)'
|
||||
sums[index] = '小计' + '(¥)'
|
||||
return
|
||||
}
|
||||
if (index === 1) {
|
||||
|
@ -752,15 +717,15 @@ export default {
|
|||
},
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
if(this.select.period){
|
||||
this.select.period=parseInt(this.select.period)
|
||||
if (this.select.period) {
|
||||
this.select.period = parseInt(this.select.period)
|
||||
}
|
||||
if (this.creationTime == '' || this.creationTime == null) {
|
||||
this.select.startDate = ''
|
||||
this.select.endDate = ''
|
||||
}
|
||||
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) => {
|
||||
this.loading = false
|
||||
this.tableData.censusSummaryList = res.rows
|
||||
|
@ -771,7 +736,7 @@ export default {
|
|||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams
|
||||
this.$confirm( '是否确认导出所有数据项?', '警告', {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
|
Loading…
Reference in New Issue