web-zk-admin/src/views/settlementCenter/topPerformance/index.vue

876 lines
23 KiB
Vue
Raw Normal View History

2025-03-23 10:03:12 +08:00
<!--
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-10-24 15:45:01
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
2025-06-08 15:19:03 +08:00
:top-list="topList"
2025-03-23 10:03:12 +08:00
:moren="moren"
2025-06-08 15:19:03 +08:00
/>
2025-03-23 10:03:12 +08:00
<div class="main">
<el-form
ref="select"
:model="select"
style="padding: 0 10px 0 0"
label-width="80px"
>
<el-row>
<!-- 一层 -->
<!-- <el-col :span="4">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'收益展示'">
2025-03-23 10:03:12 +08:00
<el-select clearable
2025-05-26 10:41:35 +08:00
:placeholder="'请选择'"
2025-03-23 10:03:12 +08:00
v-model="select.websiteType">
<el-option v-for="item in acList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'币种展示'">
2025-03-23 10:03:12 +08:00
<el-select clearable
2025-05-26 10:41:35 +08:00
:placeholder="'请选择'"
2025-03-23 10:03:12 +08:00
v-model="select.websiteType">
<el-option v-for="item in acList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="8">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'业绩时间'">
2025-03-23 10:03:12 +08:00
<el-date-picker
v-model="creationTime"
value-format="yyyy-MM-dd"
type="daterange"
2025-05-26 10:41:35 +08:00
:range-separator="'至'"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
2025-06-08 15:19:03 +08:00
@change="changeTime"
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="顶点">
<el-select v-model="select.pkVertex">
<el-option
v-for="item in verList"
:key="item.pkVertex"
:label="`${item.memberCode} (${item.memberName})`"
:value="item.pkVertex"
2025-06-08 15:19:03 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 10px">
<el-button type="primary" @click="getDataList">
2025-06-08 15:19:03 +08:00
{{ '搜索' }}</el-button>
2025-03-23 10:03:12 +08:00
<el-button type="primary" @click="reset">
2025-06-08 15:19:03 +08:00
{{ '重置' }}</el-button>
2025-03-23 10:03:12 +08:00
<el-button
v-hasButtons="['TopPerformanceTotal']"
2025-06-08 15:19:03 +08:00
type="primary"
2025-03-23 10:03:12 +08:00
@click="getNewData"
>
2025-06-08 15:19:03 +08:00
统计</el-button>
2025-03-23 10:03:12 +08:00
</el-col>
</el-row>
2025-06-08 15:19:03 +08:00
<el-row />
2025-03-23 10:03:12 +08:00
<!-- <el-row>
<el-col>
2025-05-26 10:41:35 +08:00
<el-form-item :label="'隶属体系'">
2025-03-23 10:03:12 +08:00
<el-checkbox-group @change="getpkVertex"
v-model="select.pkVertexList">
<el-checkbox v-for="item in verList"
:key="item.value"
:value="item.pkId"
:label="item.pkId">{{ item.vertexName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
2025-05-26 10:41:35 +08:00
<el-form-item :label="'隶属团队'">
2025-03-23 10:03:12 +08:00
<el-checkbox-group @change="getTeam"
v-model="select.pkMemberTeamList">
<el-checkbox v-for="item in memberList"
:key="item.value"
:value="item.pkId"
:label="item.pkId">{{ item.vertexName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row> -->
<!-- <el-row style="margin-left:10px">
<el-col :span="4">
<el-button type="primary"
2025-05-26 10:41:35 +08:00
@click="getDataList"> {{ '搜索' }}</el-button>
2025-03-23 10:03:12 +08:00
<el-button type="primary"
2025-05-26 10:41:35 +08:00
@click="reset"> {{ '重置' }}</el-button>
2025-03-23 10:03:12 +08:00
</el-col>
</el-row> -->
</el-form>
<div class="maintop">
<div class="mainbtn">
<el-button
v-hasButtons="['TopPerformanceExport']"
2025-06-08 15:19:03 +08:00
size="small"
2025-03-23 10:03:12 +08:00
class="thebtn2"
2025-06-08 15:19:03 +08:00
@click="handleExport"
2025-03-23 10:03:12 +08:00
>
2025-06-08 15:19:03 +08:00
{{ '导出' }}</el-button>
2025-03-23 10:03:12 +08:00
</div>
<!-- <div>
<el-dropdown :hide-on-click="false" placement="top">
<span class="el-dropdown-link kuang">
2025-05-26 10:41:35 +08:00
{{ '下拉菜单' }}<i class="el-icon-arrow-down el-icon--right"></i>
2025-03-23 10:03:12 +08:00
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item in menuList"
:key="item.id" >
<el-checkbox v-model="item.checked"
@change="getMenu($event,item.id)">{{ item.text }}</el-checkbox></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> -->
</div>
<div class="maintable">
<!-- <div class="itemTrading"> -->
<el-table
2025-06-08 15:19:03 +08:00
ref="mainTable"
2025-03-23 10:03:12 +08:00
v-loading="loading"
:data="tableData"
height="700px"
:header-cell-style="{ background: '#EEEEEE' }"
:summary-method="getSummaries"
show-summary
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
>
2025-06-08 15:19:03 +08:00
<el-table-column type="selection" width="60" />
2025-03-23 10:03:12 +08:00
<el-table-column
v-for="(item, index) in menuList"
2025-06-08 15:19:03 +08:00
v-if="item.id != 0"
2025-03-23 10:03:12 +08:00
:key="item.id"
align="center"
width="150"
:prop="item.prop"
:label="item.text"
>
<template slot-scope="scope">
<div v-if="index > 4">
{{ scope.row[item.prop] | numberToCurrency }}
</div>
<div v-if="index <= 4">{{ scope.row[item.prop] }}</div>
</template>
</el-table-column>
</el-table>
<!-- </div> -->
</div>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getDataList"
/>
</div>
</template>
<script>
2025-06-08 15:19:03 +08:00
import topBar from '@/components/topBar'
import * as api from '@/api/settle.js'
import { classifyUpdate, classifySave } from '@/api/product'
import { getRouters } from '@/api/settle.js'
import { isOther, numberToCurrencyNo } from '@/utils/numberToCurrency'
2025-03-23 10:03:12 +08:00
export default {
2025-06-08 15:19:03 +08:00
name: 'Bzpz',
2025-03-23 10:03:12 +08:00
components: {
2025-06-08 15:19:03 +08:00
topBar
2025-03-23 10:03:12 +08:00
},
filters: {
isAgree(val) {
if (!val) {
2025-06-08 15:32:44 +08:00
return '允许'
2025-03-23 10:03:12 +08:00
} else {
2025-06-08 15:32:44 +08:00
return '禁止'
2025-03-23 10:03:12 +08:00
}
2025-06-08 15:19:03 +08:00
}
2025-03-23 10:03:12 +08:00
},
data() {
return {
loading: false,
typeList: [
{
value: 0,
2025-06-08 15:32:44 +08:00
label: '前台'
2025-03-23 10:03:12 +08:00
},
{
value: 1,
2025-06-08 15:32:44 +08:00
label: '后台'
2025-06-08 15:19:03 +08:00
}
2025-03-23 10:03:12 +08:00
],
digList: [
{
value: 0,
2025-06-08 15:32:44 +08:00
label: '允许'
2025-03-23 10:03:12 +08:00
},
{
value: 1,
2025-06-08 15:32:44 +08:00
label: '禁止'
2025-06-08 15:19:03 +08:00
}
2025-03-23 10:03:12 +08:00
],
menuList: [
{
id: 0,
2025-06-08 15:32:44 +08:00
text: '全选',
2025-06-08 15:19:03 +08:00
checked: false
2025-03-23 10:03:12 +08:00
},
{
id: 1,
2025-06-08 15:19:03 +08:00
text: '顶点编号',
2025-03-23 10:03:12 +08:00
checked: true,
2025-06-08 15:19:03 +08:00
prop: 'memberCode'
2025-03-23 10:03:12 +08:00
},
{
id: 2,
2025-06-08 15:19:03 +08:00
text: '顶点名称',
2025-03-23 10:03:12 +08:00
checked: true,
2025-06-08 15:19:03 +08:00
prop: 'memberName'
2025-03-23 10:03:12 +08:00
},
{
id: 3,
2025-06-08 15:32:44 +08:00
text: '业绩时间',
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'creationTime'
2025-03-23 10:03:12 +08:00
},
// {
// id: 2,
2025-06-08 15:32:44 +08:00
// text: '隶属团队',
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "teamName",
// },
// {
// id: 28,
// text: "首购PV拨比(%)",
// checked: true,
// prop: "mainBonusPvRate",
// total: "mainBonusPvRateSum",
// },
// {
// id: 29,
// text: "复购PV拨比(%)",
// checked: true,
// prop: "repurBonusPvRate",
// total: "repurBonusPvRateSum",
// },
{
id: 4,
2025-06-08 15:32:44 +08:00
text: `${'注册专区'}`,
2025-03-23 10:03:12 +08:00
checked: true,
2025-06-08 15:19:03 +08:00
prop: 'mainRegAmount',
total: 'mainRegAmountSum'
2025-03-23 10:03:12 +08:00
},
{
id: 5,
2025-06-08 15:32:44 +08:00
text: `${'升级专区'}`,
2025-03-23 10:03:12 +08:00
checked: true,
2025-06-08 15:19:03 +08:00
prop: 'mainUpAmount',
total: 'mainUpAmountSum'
2025-03-23 10:03:12 +08:00
},
// {
// id: 5,
2025-06-08 15:32:44 +08:00
// text: `${'云代注册'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "agentRegAmount",
// total: "agentRegAmountSum",
// },
// {
// id: 6,
2025-06-08 15:32:44 +08:00
// text: `${'云代升级'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "agentUpAmount",
// total: "agentUpAmountSum",
// },
{
id: 6,
2025-06-08 15:32:44 +08:00
text: `${'首购金额'}(¥)`,
2025-03-23 10:03:12 +08:00
checked: true,
2025-06-08 15:19:03 +08:00
prop: 'firstPurchaseAll',
total: 'firstPurchaseAllSum'
2025-03-23 10:03:12 +08:00
},
2025-03-23 10:03:12 +08:00
// {
// id: 8,
2025-06-08 15:32:44 +08:00
// text: `${'直推收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "introduceBonus",
// total: "introduceBonusSum",
// },
// {
// id: 9,
2025-06-08 15:32:44 +08:00
// text: `${'拓展收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "orgBonus",
// total: "orgBonusSum",
// },
// {
// id: 10,
2025-06-08 15:32:44 +08:00
// text: `${'辅导收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "leaderBonus",
// total: "leaderBonusSum",
// },
// {
// id: 11,
2025-06-08 15:32:44 +08:00
// text: `${'分红收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "shareBonus",
// total: "shareBonusSum",
// },
// {
// id: 12,
2025-06-08 15:32:44 +08:00
// text: `${'服务补贴'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "serviceBonus",
// total: "serviceBonusSum",
// },
2025-06-08 15:19:03 +08:00
2025-03-23 10:03:12 +08:00
// {
// id: 13,
2025-06-08 15:32:44 +08:00
// text: `${'云代直推'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "agentIntroduceBonus",
// total: "agentIntroduceBonusSum",
// },
// {
// id: 14,
2025-06-08 15:32:44 +08:00
// text: `${'云代首购'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "agentFirstAmount",
// total: "agentFirstAmountSum",
// },
// {
// id: 15,
2025-06-08 15:32:44 +08:00
// text: `${'云代复购'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "agentRepurAmount",
// total: "agentRepurAmountSum",
// },
// {
// id: 16,
2025-06-08 15:32:44 +08:00
// text: `${'复购专区'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "mainRepurAmount",
// total: "mainRepurAmountSum",
// },
// {
// id: 17,
2025-06-08 15:32:44 +08:00
// text: `${'海粉专区'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: true,
// prop: "hifansRegAmount",
// total: "hifansRegAmountSum",
// },
// {
// id: 16,
2025-06-08 15:32:44 +08:00
// text: `${'云代复购'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: 'agentRepurAmount',
// },
{
id: 7,
2025-06-08 15:32:44 +08:00
text: `${'复购金额'}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'mainRepurAmount',
total: 'mainRepurAmountSum'
2025-03-23 10:03:12 +08:00
},
{
id: 8,
2025-06-08 15:19:03 +08:00
text: `${this.$t('重消金额')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailConsumeAmount',
total: 'retailConsumeAmountSum'
2025-03-23 10:03:12 +08:00
},
{
id: 9,
2025-06-08 15:19:03 +08:00
text: `${this.$t('合计金额')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'totalAmount',
total: 'totalAmountSum'
2025-03-23 10:03:12 +08:00
},
{
id: 10,
2025-06-08 15:19:03 +08:00
text: `${this.$t('极差收益')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailRangeIncome',
total: 'retailRangeIncomeSum'
2025-03-23 10:03:12 +08:00
},
{
id: 11,
2025-06-08 15:19:03 +08:00
text: '极差收益拨比(%)',
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailRangeIncomeRate',
total: 'retailRangeIncomeRateSum'
2025-03-23 10:03:12 +08:00
},
// {
// id: 12,
// text: `${this.$t("平级收益")}(¥)`,
// checked: false,
// prop: "retailSameLevelIncome",
// total: "retailSameLevelIncomeSum",
// },
{
id: 12,
2025-06-08 15:19:03 +08:00
text: `${this.$t('平级收益V1-V4')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailSameLevelIncomeV1V4',
total: 'retailSameLevelIncomeV1V4Sum'
2025-03-23 10:03:12 +08:00
},
{
id: 13,
2025-06-08 15:19:03 +08:00
text: `${this.$t('平级收益V1-V4拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailSameLevelIncomeV1V4Rate',
total: 'sameLevelIncomeV1V4RateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 14,
2025-06-08 15:19:03 +08:00
text: `${this.$t('平级收益V5')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailSameLevelIncomeV5',
total: 'retailSameLevelIncomeV5Sum'
2025-03-23 10:03:12 +08:00
},
{
id: 15,
2025-06-08 15:19:03 +08:00
text: `${this.$t('平级收益V5拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailSameLevelIncomeV5Rate',
total: 'sameLevelIncomeV5RateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 16,
2025-06-08 15:19:03 +08:00
text: `${this.$t('区域收益')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailAreaIncome',
total: 'retailAreaIncomeSum'
2025-03-23 10:03:12 +08:00
},
{
id: 17,
2025-06-08 15:19:03 +08:00
text: `${this.$t('区域收益拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailAreaIncomeRate',
total: 'retailAreaIncomeRateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 18,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利平均收益')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitAvgIncome',
total: 'retailBenefitAvgIncomeSum'
2025-03-23 10:03:12 +08:00
},
{
id: 19,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利平均收益拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitAvgIncomeRate',
total: 'retailBenefitAvgIncomeRateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 20,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利加权收益')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitIncome',
total: 'retailBenefitIncomeSum'
2025-03-23 10:03:12 +08:00
},
{
id: 21,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利加权收益拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitIncomeRate',
total: 'retailBenefitIncomeRateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 22,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利极差收益')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitRangeIncome',
total: 'retailBenefitRangeIncomeSum'
2025-03-23 10:03:12 +08:00
},
{
id: 23,
2025-06-08 15:19:03 +08:00
text: `${this.$t('福利极差收益拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'retailBenefitRangeIncomeRate',
total: 'benefitRangeIncomeRateSum'
2025-03-23 10:03:12 +08:00
},
{
id: 24,
2025-06-08 15:19:03 +08:00
text: `${this.$t('商城重消')}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'backPoints',
total: 'backPointsSum'
2025-03-23 10:03:12 +08:00
},
{
id: 25,
2025-06-08 15:19:03 +08:00
text: `${this.$t('商城重消拨比')}(%)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'backPointsRate',
total: 'backPointsRateSum'
2025-03-23 10:03:12 +08:00
},
// {
// id: 19,
2025-06-08 15:32:44 +08:00
// text: `${'复购极差收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "repurRangeBonus",
// total: "repurRangeBonusSum",
// },
// {
// id: 20,
2025-06-08 15:32:44 +08:00
// text: `${'复购拓展收益'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "repurOrgBonus",
// total: "repurOrgBonusSum",
// },
// {
// id: 21,
2025-06-08 15:32:44 +08:00
// text: `${'首购拨出金额'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "mainBonus",
// total: "mainBonusSum",
// },
// {
// id: 22,
2025-06-08 15:32:44 +08:00
// text: '首购拨出比例' + "(%)",
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "mainBonusRate",
// total: "mainBonusRateSum",
// },
// {
// id: 23,
2025-06-08 15:32:44 +08:00
// text: `${'复购拨出金额'}(¥)`,
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "repurBonus",
// total: "repurBonusSum",
// },
// {
// id: 24,
2025-06-08 15:32:44 +08:00
// text: '复购拨出比例' + "(%)",
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: "repurBonusRate",
// total: "repurBonusRateSum",
// },
{
id: 26,
2025-06-08 15:32:44 +08:00
text: `${'总拨出金额'}(¥)`,
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'totalBonus',
total: 'totalBonusSum'
2025-03-23 10:03:12 +08:00
},
{
id: 27,
2025-06-08 15:32:44 +08:00
text: '总拨出比例' + '(%)',
2025-03-23 10:03:12 +08:00
checked: false,
2025-06-08 15:19:03 +08:00
prop: 'totalBonusRate',
total: 'totalBonusRateSum'
}
2025-03-23 10:03:12 +08:00
// {
// id: 28,
2025-06-08 15:32:44 +08:00
// text: '截止日期',
2025-03-23 10:03:12 +08:00
// checked: false,
// prop: 'endDate',
// },
],
creationTime: [],
creationTime1: [],
select: {
pkVertexList: [],
2025-06-08 15:19:03 +08:00
pkMemberTeamList: []
2025-03-23 10:03:12 +08:00
},
// 查询参数
queryParams: {
pageNum: 1,
2025-06-08 15:19:03 +08:00
pageSize: 50
2025-03-23 10:03:12 +08:00
},
2025-06-08 15:19:03 +08:00
addOrEdit: '',
2025-03-23 10:03:12 +08:00
total: 0,
dialogVisible: false,
tableData: [],
2025-06-08 15:19:03 +08:00
moren: '/settlementCenter/topPerformance',
2025-03-23 10:03:12 +08:00
topList: [
{
2025-06-08 15:19:03 +08:00
name: '顶点奖金拨比列表统计',
path: '/settlementCenter/topPerformance',
url: 'topPerformance',
changed: false
}
2025-03-23 10:03:12 +08:00
],
form: {},
verList: [],
memberList: [],
acList: [],
tableList: {},
props: {
multiple: true,
2025-06-08 15:19:03 +08:00
expandTrigger: 'hover',
value: 'pkId',
label: 'vertexName',
children: 'childList'
}
}
2025-03-23 10:03:12 +08:00
},
mounted() {
// 获取下拉
2025-06-08 15:19:03 +08:00
this.getData()
2025-03-23 10:03:12 +08:00
// 获取列表
2025-06-08 15:19:03 +08:00
this.getDataList()
2025-03-23 10:03:12 +08:00
// this.getUserRoute();
},
methods: {
getPkBdVertexStr(e) {
2025-06-08 15:19:03 +08:00
const arr = e.map((item) => item[1])
const pkBdVertexStr = arr.join(',')
this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr)
2025-03-23 10:03:12 +08:00
},
// getpkVertex() {
// let pkBdVertexStr = this.select.pkVertexList.join(',')
// this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr)
// },
// getTeam() {
// let pkTeamCodeStr = this.select.pkMemberTeamList.join(',')
// this.$set(this.select, 'pkTeamCodeStr', pkTeamCodeStr)
// },
getTotal() {
api
.topSubtotal(Object.assign({}, this.queryParams, this.select))
.then((res) => {
if (res.code == 200) {
2025-06-08 15:19:03 +08:00
this.tableList = res.data
2025-03-23 10:03:12 +08:00
}
2025-06-08 15:19:03 +08:00
})
2025-03-23 10:03:12 +08:00
},
getSummaries(param) {
2025-06-08 15:19:03 +08:00
const arr = []
2025-03-23 10:03:12 +08:00
this.menuList.forEach((item) => {
for (var i in this.tableList) {
if (i == item.total) {
2025-06-08 15:19:03 +08:00
arr.push(numberToCurrencyNo(this.tableList[i]))
2025-03-23 10:03:12 +08:00
}
}
2025-06-08 15:19:03 +08:00
})
arr.unshift('合计', '', '', '')
arr.push('')
2025-03-23 10:03:12 +08:00
this.$nextTick(() => {
2025-06-08 15:19:03 +08:00
this.$refs.mainTable.doLayout()
})
return arr
2025-03-23 10:03:12 +08:00
// return []
},
getUserRoute() {
getRouters().then((res) => {
res.data.forEach((item) => {
this.topList.forEach((items) => {
if (item.routeName == items.url) {
2025-06-08 15:19:03 +08:00
items.changed = true
2025-03-23 10:03:12 +08:00
}
2025-06-08 15:19:03 +08:00
})
})
})
2025-03-23 10:03:12 +08:00
},
reset() {
this.select = {
pkVertexList: [],
pkMemberTeamList: [],
2025-06-08 15:19:03 +08:00
pkTeamCodeStr: '',
pkBdVertexStr: ''
}
this.creationTime = []
2025-03-23 10:03:12 +08:00
},
getData() {
api.accountList().then((res) => {
2025-06-08 15:19:03 +08:00
this.acList = res.data
})
2025-03-23 10:03:12 +08:00
// api.vertexList().then((res) => {
// this.verList = res.data
// })
// api.memberTeam().then((res) => {
// this.memberList = res.rows
// })
api.topVertexList().then((res) => {
2025-06-08 15:19:03 +08:00
this.verList = res.rows
})
2025-03-23 10:03:12 +08:00
},
changeTime(val) {
2025-06-08 15:19:03 +08:00
this.select.startDate = val ? val[0] : ''
this.select.endDate = val ? val[1] : ''
2025-03-23 10:03:12 +08:00
},
changeTime1(val) {
2025-06-08 15:19:03 +08:00
this.select.startEffectDate = val ? val[0] : ''
this.select.endEffectDate = val ? val[1] : ''
2025-03-23 10:03:12 +08:00
},
getNewData() {
2025-06-08 15:19:03 +08:00
this.loading = true
2025-03-23 10:03:12 +08:00
api
.topBonusListHistory(Object.assign({}, this.queryParams, this.select))
.then((res) => {
2025-06-08 15:19:03 +08:00
this.getDataList()
})
2025-03-23 10:03:12 +08:00
},
getDataList() {
api
.topBonusList(Object.assign({}, this.queryParams, this.select))
.then((res) => {
2025-06-08 15:19:03 +08:00
this.loading = false
2025-03-23 10:03:12 +08:00
if (res.code == 200) {
2025-06-08 15:19:03 +08:00
this.tableData = res.rows
this.total = res.total
this.getTotal()
2025-03-23 10:03:12 +08:00
}
2025-06-08 15:19:03 +08:00
})
2025-03-23 10:03:12 +08:00
},
handleSelectionChange(val) {},
/** 导出按钮操作 */
handleExport() {
2025-06-08 15:32:44 +08:00
this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
2025-06-08 15:19:03 +08:00
type: 'warning'
2025-03-23 10:03:12 +08:00
}).then((_) => {
this.download(
2025-06-08 15:19:03 +08:00
'/member/manage/bonus-vertex-statis/export',
2025-03-23 10:03:12 +08:00
Object.assign({}, this.queryParams, this.select),
`顶点奖金拨比列表统计-${new Date().getTime()}.xlsx`
2025-06-08 15:19:03 +08:00
)
})
2025-03-23 10:03:12 +08:00
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
2025-06-08 15:19:03 +08:00
return 'warning-row'
2025-03-23 10:03:12 +08:00
} else if (rowIndex % 2 == 0) {
2025-06-08 15:19:03 +08:00
return 'success-row'
2025-03-23 10:03:12 +08:00
}
2025-06-08 15:19:03 +08:00
return ''
}
}
}
2025-03-23 10:03:12 +08:00
</script>
<style scoped lang="scss">
::v-deep .el-table .warning-row {
background: #f9f9f9;
}
::v-deep .el-table .success-row {
background: #ffffff;
}
::v-deep .el-table thead {
color: #000000;
}
::v-deep .el-select {
width: 100%;
}
.uploadIcon ::v-deep .el-upload--picture-card {
display: none !important; /* 上传按钮隐藏 */
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
flex-direction: column;
.maintop {
display: flex;
// padding: 0 10px;
justify-content: space-between;
align-items: center;
.mainbtn {
.thebtn1 {
background: #3181e5;
color: #ffffff;
}
.thebtn2 {
background: #ffad41;
color: #ffffff;
}
}
.maintitle {
font-size: 10px;
font-family: MicrosoftYaHei;
color: #999999;
}
}
.maintable {
flex: 1;
}
}
.tem {
display: flex;
align-items: center;
justify-content: center;
img {
width: 28px;
height: 20px;
margin-right: 3px;
}
}
.isRed {
color: #ed1d25;
}
.isGreen {
color: #1ab62b;
}
.bgImg {
width: 48px;
height: 48px;
}
}
.openClose {
text-align: right;
margin-right: 10px;
color: #3181e5;
}
.kuang {
padding: 5px 20px;
background: rgba(255, 255, 255, 0);
border-radius: 4px;
border: 1px solid #cccccc;
}
.heji {
margin-top: 10px;
.dis {
display: flex;
justify-content: right;
padding: 5px 10px;
font-size: 14px;
color: #333333;
:nth-child(1) {
font-size: 14px;
font-weight: bold;
color: #333333;
margin-right: 20px;
}
}
}
::v-deep .el-date-editor--daterange,
.el-cascader {
width: 100%;
}
::v-deep .el-input__suffix {
top: -3px;
}
</style>