|
@@ -31,17 +31,20 @@
|
|
|
<el-input v-model="query.promoter_account" placeholder="请输入推广账号" clearable />
|
|
<el-input v-model="query.promoter_account" placeholder="请输入推广账号" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<template v-if="activeTab === 'blocked'">
|
|
<template v-if="activeTab === 'blocked'">
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-button type="primary" @click="handleBlockedCreate">新增</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item prop="blocked_account">
|
|
|
|
|
|
|
+ <el-form-item label="会员账号" prop="account">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="query.blocked_account"
|
|
|
|
|
|
|
+ v-model="query.account"
|
|
|
placeholder="搜索禁止推广账号"
|
|
placeholder="搜索禁止推广账号"
|
|
|
clearable
|
|
clearable
|
|
|
- @input="handleBlockedSearch"
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item class="search-actions">
|
|
|
|
|
+ <el-button type="primary" :loading="loading" @click="onSubmit">查询</el-button>
|
|
|
|
|
+ <el-button @click="resetQuery">重置</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" @click="handleBlockedCreate">新增</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
<el-form-item v-if="activeTab !== 'blocked'" class="search-actions">
|
|
<el-form-item v-if="activeTab !== 'blocked'" class="search-actions">
|
|
|
<el-button type="primary" :loading="loading" @click="onSubmit">查询</el-button>
|
|
<el-button type="primary" :loading="loading" @click="onSubmit">查询</el-button>
|
|
@@ -53,7 +56,7 @@
|
|
|
<el-form :model="settingsForm" label-width="190px" class="settings-form">
|
|
<el-form :model="settingsForm" label-width="190px" class="settings-form">
|
|
|
<el-form-item label="分享赚钱开关(含前台显示)">
|
|
<el-form-item label="分享赚钱开关(含前台显示)">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- v-model="settingsForm.share_enabled"
|
|
|
|
|
|
|
+ v-model="settingsForm.enabled"
|
|
|
:active-value="1"
|
|
:active-value="1"
|
|
|
:inactive-value="0"
|
|
:inactive-value="0"
|
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
@@ -64,11 +67,11 @@
|
|
|
<el-input v-model="settingsForm.share_domain" />
|
|
<el-input v-model="settingsForm.share_domain" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="有效会员最低存款">
|
|
<el-form-item label="有效会员最低存款">
|
|
|
- <el-input v-model="settingsForm.minimum_deposit" />
|
|
|
|
|
|
|
+ <el-input v-model="settingsForm.valid_member_min_deposit" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="佣金/手续费减免设置">
|
|
<el-form-item label="佣金/手续费减免设置">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- v-model="settingsForm.commission_enabled"
|
|
|
|
|
|
|
+ v-model="settingsForm.benefit_enabled"
|
|
|
:active-value="1"
|
|
:active-value="1"
|
|
|
:inactive-value="0"
|
|
:inactive-value="0"
|
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
@@ -77,17 +80,17 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<div class="commission-settings">
|
|
<div class="commission-settings">
|
|
|
<el-form-item label="非卖家单笔阈值 >=">
|
|
<el-form-item label="非卖家单笔阈值 >=">
|
|
|
- <el-input v-model="settingsForm.non_seller_threshold" :disabled="!settingsForm.commission_enabled">
|
|
|
|
|
|
|
+ <el-input v-model="settingsForm.non_seller_threshold" :disabled="!settingsForm.benefit_enabled">
|
|
|
<template slot="append">元</template>
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="抽佣阶梯一">
|
|
<el-form-item label="抽佣阶梯一">
|
|
|
- <el-input v-model="settingsForm.commission_tier_one" :disabled="!settingsForm.commission_enabled">
|
|
|
|
|
|
|
+ <el-input v-model="settingsForm.tier_one_rate" :disabled="!settingsForm.benefit_enabled">
|
|
|
<template slot="append">%</template>
|
|
<template slot="append">%</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="抽佣阶梯二">
|
|
<el-form-item label="抽佣阶梯二">
|
|
|
- <el-input v-model="settingsForm.commission_tier_two" :disabled="!settingsForm.commission_enabled">
|
|
|
|
|
|
|
+ <el-input v-model="settingsForm.tier_two_rate" :disabled="!settingsForm.benefit_enabled">
|
|
|
<template slot="append">%</template>
|
|
<template slot="append">%</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -109,11 +112,11 @@
|
|
|
<el-table-column type="index" label="序号" width="100" align="center" />
|
|
<el-table-column type="index" label="序号" width="100" align="center" />
|
|
|
<el-table-column prop="date" label="日期" min-width="120" align="center" />
|
|
<el-table-column prop="date" label="日期" min-width="120" align="center" />
|
|
|
<el-table-column prop="promoter_account" label="推广账号" min-width="140" align="center" />
|
|
<el-table-column prop="promoter_account" label="推广账号" min-width="140" align="center" />
|
|
|
- <el-table-column prop="promoter_name" label="推广昵称" min-width="140" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="promoter_nickname" label="推广昵称" min-width="140" align="center" />
|
|
|
<el-table-column prop="deposit" label="存款" min-width="120" align="center" />
|
|
<el-table-column prop="deposit" label="存款" min-width="120" align="center" />
|
|
|
<el-table-column prop="commission" label="佣金" min-width="120" align="center" />
|
|
<el-table-column prop="commission" label="佣金" min-width="120" align="center" />
|
|
|
<el-table-column prop="sales_amount" label="销售额" min-width="120" align="center" />
|
|
<el-table-column prop="sales_amount" label="销售额" min-width="120" align="center" />
|
|
|
- <el-table-column prop="fee_reduction" label="手续费减免" min-width="160" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="fee_waiver_rate" label="手续费减免" min-width="160" align="center" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div v-if="activeTab === 'summary'" class="summary-footer">
|
|
<div v-if="activeTab === 'summary'" class="summary-footer">
|
|
|
<span>总佣金:<strong>{{ summaryCommission }}</strong></span>
|
|
<span>总佣金:<strong>{{ summaryCommission }}</strong></span>
|
|
@@ -127,8 +130,10 @@
|
|
|
class="share-money-list blocked-list"
|
|
class="share-money-list blocked-list"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="index" label="序号" width="100" align="center" />
|
|
<el-table-column type="index" label="序号" width="100" align="center" />
|
|
|
- <el-table-column prop="member_account" label="会员账号" min-width="180" align="center" />
|
|
|
|
|
- <el-table-column prop="prohibited_category" label="不能返佣的类目" min-width="260" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="account" label="会员账号" min-width="180" align="center" />
|
|
|
|
|
+ <el-table-column label="不能返佣的类目" min-width="260" align="center">
|
|
|
|
|
+ <template slot-scope="scope">{{ formatBlockedCategories(scope.row.blocked_categories) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="状态" min-width="160" align="center">
|
|
<el-table-column label="状态" min-width="160" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
<el-switch
|
|
@@ -169,19 +174,19 @@
|
|
|
<span>{{ scope.row.registered_members }}</span>
|
|
<span>{{ scope.row.registered_members }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="h5_register" label="H5注册" min-width="110" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="h5_registered" label="H5注册" min-width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.h5_register }}</span>
|
|
|
|
|
|
|
+ <span>{{ scope.row.h5_registered }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="ios_register" label="ios注册" min-width="110" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="ios_registered" label="ios注册" min-width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.ios_register }}</span>
|
|
|
|
|
|
|
+ <span>{{ scope.row.ios_registered }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="android_register" label="安卓注册" min-width="110" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="android_registered" label="安卓注册" min-width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.android_register }}</span>
|
|
|
|
|
|
|
+ <span>{{ scope.row.android_registered }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="deposit_total" label="存款总额" min-width="120" align="center">
|
|
<el-table-column prop="deposit_total" label="存款总额" min-width="120" align="center">
|
|
@@ -189,9 +194,9 @@
|
|
|
<span>{{ scope.row.deposit_total }}</span>
|
|
<span>{{ scope.row.deposit_total }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="consumption_total" label="消费金额" min-width="120" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="consume_total" label="投注扣款" min-width="120" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.consumption_total }}</span>
|
|
|
|
|
|
|
+ <span>{{ scope.row.consume_total }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="company_profit" label="公司盈利" min-width="120" align="center">
|
|
<el-table-column prop="company_profit" label="公司盈利" min-width="120" align="center">
|
|
@@ -235,7 +240,7 @@
|
|
|
<el-input v-model="detailQuery.member_id" placeholder="请输入会员ID" clearable />
|
|
<el-input v-model="detailQuery.member_id" placeholder="请输入会员ID" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="会员账号">
|
|
<el-form-item label="会员账号">
|
|
|
- <el-input v-model="detailQuery.member_account" placeholder="请输入会员账号" clearable />
|
|
|
|
|
|
|
+ <el-input v-model="detailQuery.account" placeholder="请输入会员账号" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="detail-search-actions">
|
|
<el-form-item class="detail-search-actions">
|
|
|
<el-button type="primary" @click="handleDetailSearch">查询</el-button>
|
|
<el-button type="primary" @click="handleDetailSearch">查询</el-button>
|
|
@@ -244,19 +249,20 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div class="detail-table">
|
|
<div class="detail-table">
|
|
|
<el-table :data="detailTableData" height="360" style="width: 100%;">
|
|
<el-table :data="detailTableData" height="360" style="width: 100%;">
|
|
|
|
|
+ <el-table-column type="index" label="序号" width="70" align="center" />
|
|
|
<el-table-column prop="date" label="日期" width="120" align="center" />
|
|
<el-table-column prop="date" label="日期" width="120" align="center" />
|
|
|
- <el-table-column prop="member_account" label="会员账号" width="120" align="center" />
|
|
|
|
|
- <el-table-column prop="member_name" label="会员昵称" width="120" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="account" label="会员账号" width="120" align="center" />
|
|
|
|
|
+ <el-table-column prop="nickname" label="会员昵称" width="120" align="center" />
|
|
|
<el-table-column prop="deposit_total" label="存款总额" width="110" align="center" />
|
|
<el-table-column prop="deposit_total" label="存款总额" width="110" align="center" />
|
|
|
- <el-table-column prop="register_count" label="注册人数" width="110" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="registered_count" label="注册人数" width="110" align="center" />
|
|
|
<el-table-column prop="commission" label="佣金" width="100" align="center">
|
|
<el-table-column prop="commission" label="佣金" width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.commission }}</span>
|
|
<span>{{ scope.row.commission }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="current_fee" label="当前手续费" min-width="120" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="current_fee_rate" label="当前一级比例" min-width="120" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.current_fee }}</span>
|
|
|
|
|
|
|
+ <span>{{ scope.row.current_fee_rate }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -275,8 +281,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="promotion-description">
|
|
<div class="promotion-description">
|
|
|
<p>佣金来源:</p>
|
|
<p>佣金来源:</p>
|
|
|
- <p>被邀请人单笔下注>={{ promotionRule.highBetAmount }}元,推广人可以抽取购买单价的{{ promotionRule.highCommissionRate }}%佣金。</p>
|
|
|
|
|
- <p>被邀请人单笔下注{{ promotionRule.lessThan }}{{ promotionRule.lowBetAmount }}元,推广人可以抽取购买单价的{{ promotionRule.lowCommissionRate }}%佣金。</p>
|
|
|
|
|
|
|
+ <p>被邀请人单笔下注{{ greaterThanOrEqualSymbol }}{{ settingsForm.non_seller_threshold }}元,推广人可以抽取购买单价的{{ settingsForm.tier_one_rate }}%佣金。</p>
|
|
|
|
|
+ <p>被邀请人单笔下注{{ lessThanSymbol }}{{ settingsForm.non_seller_threshold }}元,推广人可以抽取购买单价的{{ settingsForm.tier_two_rate }}%佣金。</p>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</Dialog>
|
|
</Dialog>
|
|
@@ -294,7 +300,7 @@
|
|
|
<el-input v-model="registerDetailQuery.member_id" placeholder="请输入会员ID" clearable />
|
|
<el-input v-model="registerDetailQuery.member_id" placeholder="请输入会员ID" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="会员账号">
|
|
<el-form-item label="会员账号">
|
|
|
- <el-input v-model="registerDetailQuery.member_account" placeholder="请输入会员账号" clearable />
|
|
|
|
|
|
|
+ <el-input v-model="registerDetailQuery.account" placeholder="请输入会员账号" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="detail-search-actions">
|
|
<el-form-item class="detail-search-actions">
|
|
|
<el-button type="primary" @click="handleRegisterDetailSearch">查询</el-button>
|
|
<el-button type="primary" @click="handleRegisterDetailSearch">查询</el-button>
|
|
@@ -303,13 +309,25 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div class="register-detail-table">
|
|
<div class="register-detail-table">
|
|
|
<el-table :data="registerDetailTableData" height="440" style="width: 100%;">
|
|
<el-table :data="registerDetailTableData" height="440" style="width: 100%;">
|
|
|
|
|
+ <el-table-column type="index" label="序号" width="70" align="center" />
|
|
|
<el-table-column prop="date" label="日期" min-width="120" align="center" />
|
|
<el-table-column prop="date" label="日期" min-width="120" align="center" />
|
|
|
- <el-table-column prop="member_account" label="会员账号" min-width="130" align="center" />
|
|
|
|
|
- <el-table-column prop="member_name" label="会员昵称" min-width="130" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="account" label="会员账号" min-width="130" align="center" />
|
|
|
|
|
+ <el-table-column prop="nickname" label="会员昵称" min-width="130" align="center" />
|
|
|
<el-table-column prop="deposit_total" label="存款总额" min-width="130" align="center" />
|
|
<el-table-column prop="deposit_total" label="存款总额" min-width="130" align="center" />
|
|
|
- <el-table-column prop="consumption_total" label="下注总额" min-width="130" align="center" />
|
|
|
|
|
- <el-table-column prop="withdrawal_total" label="提款总额" min-width="130" align="center" />
|
|
|
|
|
|
|
+ <el-table-column prop="bet_total" label="下注总额" min-width="130" align="center" />
|
|
|
|
|
+ <el-table-column prop="withdraw_total" label="提款总额" min-width="130" align="center" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ background
|
|
|
|
|
+ class="detail-pagination"
|
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
+ :current-page="registerDetailPage"
|
|
|
|
|
+ :page-size="registerDetailLimit"
|
|
|
|
|
+ :page-sizes="[10, 20, 50]"
|
|
|
|
|
+ :total="registerDetailTotal"
|
|
|
|
|
+ @size-change="handleRegisterDetailSizeChange"
|
|
|
|
|
+ @current-change="handleRegisterDetailCurrentChange"
|
|
|
|
|
+ />
|
|
|
<div class="detail-total">总人数:{{ registerDetailTotal }}</div>
|
|
<div class="detail-total">总人数:{{ registerDetailTotal }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -326,7 +344,7 @@
|
|
|
<template slot="content">
|
|
<template slot="content">
|
|
|
<el-form :model="blockedForm" label-width="120px" class="blocked-form">
|
|
<el-form :model="blockedForm" label-width="120px" class="blocked-form">
|
|
|
<el-form-item label="禁止推广账号">
|
|
<el-form-item label="禁止推广账号">
|
|
|
- <el-input v-model="blockedForm.member_account" />
|
|
|
|
|
|
|
+ <el-input v-model="blockedForm.account" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="不能返佣的类目">
|
|
<el-form-item label="不能返佣的类目">
|
|
|
<el-checkbox v-model="blockedForm.selectAll" @change="toggleBlockedCategories">全选</el-checkbox>
|
|
<el-checkbox v-model="blockedForm.selectAll" @change="toggleBlockedCategories">全选</el-checkbox>
|
|
@@ -337,11 +355,11 @@
|
|
|
>
|
|
>
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-for="category in categoryGroup"
|
|
v-for="category in categoryGroup"
|
|
|
- :key="category"
|
|
|
|
|
|
|
+ :key="category.value"
|
|
|
v-model="blockedForm.categories"
|
|
v-model="blockedForm.categories"
|
|
|
- :label="category"
|
|
|
|
|
|
|
+ :label="category.value"
|
|
|
@change="syncBlockedSelectAll"
|
|
@change="syncBlockedSelectAll"
|
|
|
- />
|
|
|
|
|
|
|
+ >{{ category.label }}</el-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<div class="blocked-dialog-actions">
|
|
<div class="blocked-dialog-actions">
|
|
@@ -357,6 +375,18 @@
|
|
|
<script>
|
|
<script>
|
|
|
import Dialog from '@/components/Dialog/index.vue'
|
|
import Dialog from '@/components/Dialog/index.vue'
|
|
|
import { disableFutureDate } from '@/utils/index'
|
|
import { disableFutureDate } from '@/utils/index'
|
|
|
|
|
+import {
|
|
|
|
|
+ getShareMembers,
|
|
|
|
|
+ getSharePromoters,
|
|
|
|
|
+ getShareRegistrations,
|
|
|
|
|
+ getShareSummary,
|
|
|
|
|
+ getShareSettings,
|
|
|
|
|
+ saveShareSettings,
|
|
|
|
|
+ getShareBlacklists,
|
|
|
|
|
+ saveShareBlacklist,
|
|
|
|
|
+ setShareBlacklistStatus,
|
|
|
|
|
+ deleteShareBlacklist
|
|
|
|
|
+} from '@/api/data'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'ShareMoney',
|
|
name: 'ShareMoney',
|
|
@@ -372,16 +402,18 @@ export default {
|
|
|
total: 0,
|
|
total: 0,
|
|
|
summaryTotal: 0,
|
|
summaryTotal: 0,
|
|
|
blockedTotal: 0,
|
|
blockedTotal: 0,
|
|
|
- summaryCommission: '534.9',
|
|
|
|
|
- summaryMaxFeeReduction: '-4%',
|
|
|
|
|
|
|
+ summaryCommission: 0,
|
|
|
|
|
+ summaryMaxFeeReduction: 0,
|
|
|
|
|
+ greaterThanOrEqualSymbol: '>=',
|
|
|
|
|
+ lessThanSymbol: '<',
|
|
|
settingsForm: {
|
|
settingsForm: {
|
|
|
- share_enabled: 1,
|
|
|
|
|
- share_domain: 'show888.com',
|
|
|
|
|
- minimum_deposit: 20,
|
|
|
|
|
- commission_enabled: 0,
|
|
|
|
|
|
|
+ enabled: 0,
|
|
|
|
|
+ share_domain: '',
|
|
|
|
|
+ valid_member_min_deposit: 0,
|
|
|
|
|
+ benefit_enabled: 0,
|
|
|
non_seller_threshold: 200,
|
|
non_seller_threshold: 200,
|
|
|
- commission_tier_one: 4,
|
|
|
|
|
- commission_tier_two: 6
|
|
|
|
|
|
|
+ tier_one_rate: 0,
|
|
|
|
|
+ tier_two_rate: 0
|
|
|
},
|
|
},
|
|
|
viewRow: null,
|
|
viewRow: null,
|
|
|
detailPage: 1,
|
|
detailPage: 1,
|
|
@@ -390,42 +422,28 @@ export default {
|
|
|
detailTotal: 0,
|
|
detailTotal: 0,
|
|
|
detailQuery: {
|
|
detailQuery: {
|
|
|
member_id: '',
|
|
member_id: '',
|
|
|
- member_account: ''
|
|
|
|
|
|
|
+ account: ''
|
|
|
},
|
|
},
|
|
|
|
|
+ registerDetailPage: 1,
|
|
|
|
|
+ registerDetailLimit: 10,
|
|
|
registerDetailTableData: [],
|
|
registerDetailTableData: [],
|
|
|
- registerDetailTotal: 223,
|
|
|
|
|
- registerDetailAllTableData: [],
|
|
|
|
|
registerDetailViewDate: '',
|
|
registerDetailViewDate: '',
|
|
|
|
|
+ registerDetailTotal: 0,
|
|
|
registerDetailQuery: {
|
|
registerDetailQuery: {
|
|
|
member_id: '',
|
|
member_id: '',
|
|
|
- member_account: ''
|
|
|
|
|
- },
|
|
|
|
|
- promotionRule: {
|
|
|
|
|
- highBetAmount: 200,
|
|
|
|
|
- lowBetAmount: 200,
|
|
|
|
|
- highCommissionRate: 4,
|
|
|
|
|
- lowCommissionRate: 6,
|
|
|
|
|
- lessThan: '<'
|
|
|
|
|
|
|
+ account: ''
|
|
|
},
|
|
},
|
|
|
- detailMockData: [
|
|
|
|
|
- { member_id: 10001, member_account: 'Monu2000', member_name: '原味小娥', deposit_total: 20, register_count: 3, is_seller: '否', commission: 8, current_fee: '-' },
|
|
|
|
|
- { member_id: 10002, member_account: 'Kiwq1200', member_name: '奶酪', deposit_total: 23, register_count: 23, is_seller: '是', commission: '-', current_fee: '-4%' },
|
|
|
|
|
- { member_id: 10003, member_account: 'Kiwq1200', member_name: '奶酪', deposit_total: 23, register_count: 6, is_seller: '是', commission: '-', current_fee: '-4%' },
|
|
|
|
|
- { member_id: 10004, member_account: 'Kiwq1200', member_name: '奶酪', deposit_total: 23, register_count: 6, is_seller: '是', commission: '-', current_fee: '-4%' },
|
|
|
|
|
- { member_id: 10005, member_account: 'Kiwq1200', member_name: '奶酪', deposit_total: 23, register_count: 6, is_seller: '是', commission: '-', current_fee: '-4%' },
|
|
|
|
|
- { member_id: 10006, member_account: 'Kiwq1200', member_name: '奶酪', deposit_total: 23, register_count: 6, is_seller: '是', commission: '-', current_fee: '-4%' }
|
|
|
|
|
- ],
|
|
|
|
|
- detailAllTableData: [],
|
|
|
|
|
- allTableData: [],
|
|
|
|
|
- summaryAllTableData: [],
|
|
|
|
|
summaryTableData: [],
|
|
summaryTableData: [],
|
|
|
- blockedAllTableData: [],
|
|
|
|
|
blockedTableData: [],
|
|
blockedTableData: [],
|
|
|
blockedCategoryGroups: [
|
|
blockedCategoryGroups: [
|
|
|
- ['体育', '彩票', '第三方游戏']
|
|
|
|
|
|
|
+ [
|
|
|
|
|
+ { label: '体育', value: 'sports' },
|
|
|
|
|
+ { label: '彩票', value: 'lottery' },
|
|
|
|
|
+ { label: '第三方游戏', value: 'third_party_game' }
|
|
|
|
|
+ ]
|
|
|
],
|
|
],
|
|
|
blockedForm: {
|
|
blockedForm: {
|
|
|
- member_account: '',
|
|
|
|
|
|
|
+ account: '',
|
|
|
categories: [],
|
|
categories: [],
|
|
|
selectAll: false
|
|
selectAll: false
|
|
|
},
|
|
},
|
|
@@ -434,198 +452,95 @@ export default {
|
|
|
query: {
|
|
query: {
|
|
|
date_range: [],
|
|
date_range: [],
|
|
|
promoter_account: '',
|
|
promoter_account: '',
|
|
|
- blocked_account: ''
|
|
|
|
|
|
|
+ account: ''
|
|
|
},
|
|
},
|
|
|
disableFutureDate,
|
|
disableFutureDate,
|
|
|
tableData: []
|
|
tableData: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- this.allTableData = this.getMockRows()
|
|
|
|
|
- this.detailAllTableData = this.getDetailMockData()
|
|
|
|
|
- this.registerDetailAllTableData = this.getRegisterDetailMockData()
|
|
|
|
|
- this.summaryAllTableData = this.getSummaryMockData()
|
|
|
|
|
- this.blockedAllTableData = this.getBlockedMockData()
|
|
|
|
|
|
|
+ this.loadSettings()
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getMockRows() {
|
|
|
|
|
- const firstRows = [
|
|
|
|
|
- {
|
|
|
|
|
- date: '2025-03-10',
|
|
|
|
|
- promoter_count: 20,
|
|
|
|
|
- registered_members: 223,
|
|
|
|
|
- h5_register: 23,
|
|
|
|
|
- ios_register: 150,
|
|
|
|
|
- android_register: 50,
|
|
|
|
|
- deposit_total: 1200,
|
|
|
|
|
- consumption_total: 1000,
|
|
|
|
|
- company_profit: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- date: '2025-03-10',
|
|
|
|
|
- promoter_count: 150,
|
|
|
|
|
- registered_members: 180,
|
|
|
|
|
- h5_register: 30,
|
|
|
|
|
- ios_register: 120,
|
|
|
|
|
- android_register: 50,
|
|
|
|
|
- deposit_total: 880,
|
|
|
|
|
- consumption_total: 500,
|
|
|
|
|
- company_profit: 75
|
|
|
|
|
|
|
+ getPageResult(response) {
|
|
|
|
|
+ const data = response && response.data ? response.data : {}
|
|
|
|
|
+ return { total: Number(data.total) || 0, rows: Array.isArray(data.data) ? data.data : [] }
|
|
|
|
|
+ },
|
|
|
|
|
+ getDateParams() {
|
|
|
|
|
+ const [start_date, end_date] = this.query.date_range || []
|
|
|
|
|
+ return { start_date, end_date }
|
|
|
|
|
+ },
|
|
|
|
|
+ async getList() {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (this.activeTab === 'members') {
|
|
|
|
|
+ const result = this.getPageResult(await getShareMembers({ ...this.getDateParams(), page: this.page, limit: this.limit }))
|
|
|
|
|
+ this.total = result.total
|
|
|
|
|
+ this.tableData = result.rows
|
|
|
|
|
+ } else if (this.activeTab === 'summary') {
|
|
|
|
|
+ const response = await getShareSummary({ ...this.getDateParams(), account: this.query.promoter_account, page: this.page, limit: this.limit })
|
|
|
|
|
+ const result = this.getPageResult(response)
|
|
|
|
|
+ this.summaryTotal = result.total
|
|
|
|
|
+ this.summaryTableData = result.rows
|
|
|
|
|
+ const data = response.data || {}
|
|
|
|
|
+ this.summaryCommission = data.summary && data.summary.total_commission != null ? data.summary.total_commission : 0
|
|
|
|
|
+ this.summaryMaxFeeReduction = data.summary && data.summary.highest_fee_waiver_rate != null ? data.summary.highest_fee_waiver_rate : 0
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const result = this.getPageResult(await getShareBlacklists({ account: this.query.account, page: this.page, limit: this.limit }))
|
|
|
|
|
+ this.blockedTotal = result.total
|
|
|
|
|
+ this.blockedTableData = result.rows
|
|
|
}
|
|
}
|
|
|
- ]
|
|
|
|
|
- const extraRows = Array.from({ length: 23 }, (_, index) => ({
|
|
|
|
|
- date: `2025-03-${String(9 - (index % 9)).padStart(2, '0')}`,
|
|
|
|
|
- promoter_count: 30 + index * 5,
|
|
|
|
|
- registered_members: 100 + index * 8,
|
|
|
|
|
- h5_register: 15 + index,
|
|
|
|
|
- ios_register: 60 + index * 3,
|
|
|
|
|
- android_register: 25 + index * 2,
|
|
|
|
|
- deposit_total: 400 + index * 35,
|
|
|
|
|
- consumption_total: 280 + index * 24,
|
|
|
|
|
- company_profit: 35 + index * 5
|
|
|
|
|
- }))
|
|
|
|
|
- return firstRows.concat(extraRows)
|
|
|
|
|
- },
|
|
|
|
|
- getSummaryMockData() {
|
|
|
|
|
- const firstRows = [
|
|
|
|
|
- { date: '2025-03-11', promoter_account: 'qq900', promoter_name: '原味大哥', deposit: 20, commission: 12, sales_amount: '--', fee_reduction: '--' },
|
|
|
|
|
- { date: '2025-03-10', promoter_account: 'tsa123', promoter_name: '七月玫瑰', deposit: '--', commission: '--', sales_amount: 100, fee_reduction: '-4%' },
|
|
|
|
|
- { date: '2025-03-09', promoter_account: 'qq900', promoter_name: '原味大哥', deposit: 30, commission: 1.2, sales_amount: '--', fee_reduction: '--' },
|
|
|
|
|
- { date: '2025-03-08', promoter_account: 'tsa123', promoter_name: '七月玫瑰', deposit: '--', commission: '--', sales_amount: 100, fee_reduction: '-2%' }
|
|
|
|
|
- ]
|
|
|
|
|
- const extraRows = Array.from({ length: 21 }, (_, index) => ({
|
|
|
|
|
- date: `2025-03-${String(7 - (index % 7)).padStart(2, '0')}`,
|
|
|
|
|
- promoter_account: index % 2 === 0 ? 'qq900' : 'tsa123',
|
|
|
|
|
- promoter_name: index % 2 === 0 ? '原味大哥' : '七月玫瑰',
|
|
|
|
|
- deposit: index % 2 === 0 ? 20 + index : '--',
|
|
|
|
|
- commission: index % 2 === 0 ? 10 + index : '--',
|
|
|
|
|
- sales_amount: index % 2 === 0 ? '--' : 100 + index,
|
|
|
|
|
- fee_reduction: index % 2 === 0 ? '--' : index % 3 === 0 ? '-4%' : '-2%'
|
|
|
|
|
- }))
|
|
|
|
|
- return firstRows.concat(extraRows)
|
|
|
|
|
- },
|
|
|
|
|
- getDetailMockData() {
|
|
|
|
|
- const extraRows = Array.from({ length: 19 }, (_, index) => ({
|
|
|
|
|
- member_id: 10007 + index,
|
|
|
|
|
- member_account: `Member${String(index + 3).padStart(4, '0')}`,
|
|
|
|
|
- member_name: `推广会员${index + 3}`,
|
|
|
|
|
- deposit_total: 25 + index * 3,
|
|
|
|
|
- register_count: 2 + index,
|
|
|
|
|
- is_seller: index % 2 === 0 ? '是' : '否',
|
|
|
|
|
- commission: index % 3 === 0 ? 6 + index : '-',
|
|
|
|
|
- current_fee: index % 2 === 0 ? '-4%' : '-'
|
|
|
|
|
- }))
|
|
|
|
|
- return this.detailMockData.concat(extraRows)
|
|
|
|
|
- },
|
|
|
|
|
- getRegisterDetailMockData() {
|
|
|
|
|
- const firstRows = [
|
|
|
|
|
- { member_id: 20001, member_account: 'Mo120', member_name: '原味大虾', deposit_total: 330, consumption_total: 134, is_seller: '否', sales_total: '--', withdrawal_total: '--' },
|
|
|
|
|
- { member_id: 20002, member_account: 'saa120', member_name: '七月玫瑰', deposit_total: '--', consumption_total: '--', is_seller: '是', sales_total: 500, withdrawal_total: 50 },
|
|
|
|
|
- { member_id: 20003, member_account: 'pe122', member_name: '原味小段', deposit_total: '--', consumption_total: '--', is_seller: '否', sales_total: '--', withdrawal_total: '--' },
|
|
|
|
|
- { member_id: 20004, member_account: 'tt232', member_name: '牙鸟', deposit_total: 300, consumption_total: 344, is_seller: '否', sales_total: '--', withdrawal_total: '--' },
|
|
|
|
|
- { member_id: 20005, member_account: 'ead3434', member_name: '卖原味', deposit_total: '--', consumption_total: '--', is_seller: '是', sales_total: '--', withdrawal_total: '--' }
|
|
|
|
|
- ]
|
|
|
|
|
- const extraRows = Array.from({ length: 10 }, (_, index) => ({
|
|
|
|
|
- member_id: 20006 + index,
|
|
|
|
|
- member_account: `register${String(index + 1).padStart(3, '0')}`,
|
|
|
|
|
- member_name: index % 2 === 0 ? '原味会员' : '推广会员',
|
|
|
|
|
- deposit_total: index % 2 === 0 ? 100 + index * 10 : '--',
|
|
|
|
|
- consumption_total: index % 3 === 0 ? 80 + index * 4 : '--',
|
|
|
|
|
- is_seller: index % 2 === 0 ? '否' : '是',
|
|
|
|
|
- sales_total: index % 2 === 0 ? '--' : 200 + index * 10,
|
|
|
|
|
- withdrawal_total: index % 4 === 0 ? 50 : '--'
|
|
|
|
|
- }))
|
|
|
|
|
- return firstRows.concat(extraRows)
|
|
|
|
|
- },
|
|
|
|
|
- getBlockedMockData() {
|
|
|
|
|
- const firstRow = {
|
|
|
|
|
- member_account: 'yad123',
|
|
|
|
|
- prohibited_category: '体育',
|
|
|
|
|
- status: 0
|
|
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ this.loading = false
|
|
|
}
|
|
}
|
|
|
- const categories = ['体育', '彩票', '第三方游戏']
|
|
|
|
|
- const extraRows = Array.from({ length: 11 }, (_, index) => ({
|
|
|
|
|
- member_account: `blocked${String(index + 1).padStart(3, '0')}`,
|
|
|
|
|
- prohibited_category: categories[index % categories.length],
|
|
|
|
|
- status: index % 3 === 0 ? 1 : 0
|
|
|
|
|
- }))
|
|
|
|
|
- return [firstRow].concat(extraRows)
|
|
|
|
|
},
|
|
},
|
|
|
- getList() {
|
|
|
|
|
- if (this.activeTab === 'summary') {
|
|
|
|
|
- this.getSummaryList()
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ async loadSettings() {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const response = await getShareSettings()
|
|
|
|
|
+ this.settingsForm = { ...this.settingsForm, ...(response.data || {}) }
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ this.loading = false
|
|
|
}
|
|
}
|
|
|
- if (this.activeTab === 'blocked') {
|
|
|
|
|
- this.getBlockedList()
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- const [startDate, endDate] = this.query.date_range || []
|
|
|
|
|
- const filteredRows = this.allTableData.filter(row => {
|
|
|
|
|
- return (!startDate || row.date >= startDate) && (!endDate || row.date <= endDate)
|
|
|
|
|
- })
|
|
|
|
|
- this.total = filteredRows.length
|
|
|
|
|
- this.tableData = filteredRows.slice((this.page - 1) * this.limit, this.page * this.limit)
|
|
|
|
|
- },
|
|
|
|
|
- getSummaryList() {
|
|
|
|
|
- const [startDate, endDate] = this.query.date_range || []
|
|
|
|
|
- const account = this.query.promoter_account || ''
|
|
|
|
|
- const filteredRows = this.summaryAllTableData.filter(row => {
|
|
|
|
|
- const dateMatched = (!startDate || row.date >= startDate) && (!endDate || row.date <= endDate)
|
|
|
|
|
- const accountMatched = !account || row.promoter_account.indexOf(account) > -1
|
|
|
|
|
- return dateMatched && accountMatched
|
|
|
|
|
- })
|
|
|
|
|
- this.summaryTotal = filteredRows.length
|
|
|
|
|
- this.summaryTableData = filteredRows.slice((this.page - 1) * this.limit, this.page * this.limit)
|
|
|
|
|
- },
|
|
|
|
|
- getBlockedList() {
|
|
|
|
|
- const keyword = this.query.blocked_account || ''
|
|
|
|
|
- const filteredRows = this.blockedAllTableData.filter(row => {
|
|
|
|
|
- return !keyword || row.member_account.indexOf(keyword) > -1
|
|
|
|
|
- })
|
|
|
|
|
- this.blockedTotal = filteredRows.length
|
|
|
|
|
- this.blockedTableData = filteredRows.slice((this.page - 1) * this.limit, this.page * this.limit)
|
|
|
|
|
},
|
|
},
|
|
|
onSubmit() {
|
|
onSubmit() {
|
|
|
this.page = 1
|
|
this.page = 1
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
|
resetQuery() {
|
|
resetQuery() {
|
|
|
- this.$refs.queryForm.resetFields()
|
|
|
|
|
|
|
+ this.query = { date_range: [], promoter_account: '', account: '' }
|
|
|
this.onSubmit()
|
|
this.onSubmit()
|
|
|
},
|
|
},
|
|
|
handleTabChange() {
|
|
handleTabChange() {
|
|
|
this.page = 1
|
|
this.page = 1
|
|
|
- this.getList()
|
|
|
|
|
|
|
+ if (this.activeTab === 'settings') this.loadSettings()
|
|
|
|
|
+ else this.getList()
|
|
|
},
|
|
},
|
|
|
- handleBlockedSearch() {
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.getBlockedList()
|
|
|
|
|
|
|
+ formatBlockedCategories(categories) {
|
|
|
|
|
+ const values = Array.isArray(categories) ? categories : []
|
|
|
|
|
+ const labels = { sports: '体育', lottery: '彩票', third_party_game: '第三方游戏' }
|
|
|
|
|
+ return values.map(category => labels[category] || category).join('、') || '--'
|
|
|
},
|
|
},
|
|
|
handleBlockedCreate() {
|
|
handleBlockedCreate() {
|
|
|
this.resetBlockedForm()
|
|
this.resetBlockedForm()
|
|
|
this.$refs.blockedDialog.open()
|
|
this.$refs.blockedDialog.open()
|
|
|
},
|
|
},
|
|
|
resetBlockedForm() {
|
|
resetBlockedForm() {
|
|
|
- this.blockedForm = {
|
|
|
|
|
- member_account: '',
|
|
|
|
|
- categories: [],
|
|
|
|
|
- selectAll: false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.blockedForm = { account: '', categories: [], selectAll: false }
|
|
|
this.blockedEditingRow = null
|
|
this.blockedEditingRow = null
|
|
|
this.blockedDialogTitle = '新增禁止推广账号'
|
|
this.blockedDialogTitle = '新增禁止推广账号'
|
|
|
},
|
|
},
|
|
|
toggleBlockedCategories(value) {
|
|
toggleBlockedCategories(value) {
|
|
|
- const categories = this.blockedCategoryGroups.reduce((result, group) => result.concat(group), [])
|
|
|
|
|
|
|
+ const categories = this.blockedCategoryGroups[0].map(category => category.value)
|
|
|
this.blockedForm.categories = value ? categories : []
|
|
this.blockedForm.categories = value ? categories : []
|
|
|
},
|
|
},
|
|
|
syncBlockedSelectAll() {
|
|
syncBlockedSelectAll() {
|
|
|
- const categories = this.blockedCategoryGroups.reduce((result, group) => result.concat(group), [])
|
|
|
|
|
|
|
+ const categories = this.blockedCategoryGroups[0].map(category => category.value)
|
|
|
this.blockedForm.selectAll = this.blockedForm.categories.length === categories.length
|
|
this.blockedForm.selectAll = this.blockedForm.categories.length === categories.length
|
|
|
},
|
|
},
|
|
|
- submitBlocked() {
|
|
|
|
|
- if (!this.blockedForm.member_account.trim()) {
|
|
|
|
|
|
|
+ async submitBlocked() {
|
|
|
|
|
+ if (!this.blockedForm.account.trim()) {
|
|
|
this.$message.warning('请输入禁止推广账号')
|
|
this.$message.warning('请输入禁止推广账号')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -633,54 +548,44 @@ export default {
|
|
|
this.$message.warning('请选择不能返佣的类目')
|
|
this.$message.warning('请选择不能返佣的类目')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- const blockedData = {
|
|
|
|
|
- member_account: this.blockedForm.member_account,
|
|
|
|
|
- prohibited_category: this.blockedForm.categories.join('、')
|
|
|
|
|
- }
|
|
|
|
|
- if (this.blockedEditingRow) {
|
|
|
|
|
- Object.assign(this.blockedEditingRow, blockedData)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.blockedAllTableData.unshift({
|
|
|
|
|
- ...blockedData,
|
|
|
|
|
- status: 0
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const payload = this.blockedEditingRow
|
|
|
|
|
+ ? { id: this.blockedEditingRow.id, blocked_categories: this.blockedForm.categories, status: this.blockedEditingRow.status }
|
|
|
|
|
+ : { account: this.blockedForm.account.trim(), blocked_categories: this.blockedForm.categories, status: 1 }
|
|
|
|
|
+ await saveShareBlacklist(payload)
|
|
|
this.$refs.blockedDialog.close()
|
|
this.$refs.blockedDialog.close()
|
|
|
- this.getBlockedList()
|
|
|
|
|
this.resetBlockedForm()
|
|
this.resetBlockedForm()
|
|
|
|
|
+ this.getList()
|
|
|
this.$message.success('提交成功')
|
|
this.$message.success('提交成功')
|
|
|
},
|
|
},
|
|
|
handleBlockedEdit(row) {
|
|
handleBlockedEdit(row) {
|
|
|
- const categories = this.blockedCategoryGroups.reduce((result, group) => result.concat(group), [])
|
|
|
|
|
- const selectedCategories = row.prohibited_category
|
|
|
|
|
- .split('、')
|
|
|
|
|
- .filter(category => categories.includes(category))
|
|
|
|
|
|
|
+ const categories = Array.isArray(row.blocked_categories) ? row.blocked_categories : []
|
|
|
this.blockedEditingRow = row
|
|
this.blockedEditingRow = row
|
|
|
this.blockedDialogTitle = '修改禁止推广账号'
|
|
this.blockedDialogTitle = '修改禁止推广账号'
|
|
|
- this.blockedForm = {
|
|
|
|
|
- member_account: row.member_account,
|
|
|
|
|
- categories: selectedCategories,
|
|
|
|
|
- selectAll: selectedCategories.length === categories.length
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.blockedForm = { account: row.account, categories: categories.slice(), selectAll: categories.length === 3 }
|
|
|
this.$refs.blockedDialog.open()
|
|
this.$refs.blockedDialog.open()
|
|
|
},
|
|
},
|
|
|
- handleBlockedToggle(row, value) {
|
|
|
|
|
- row.status = value ? 1 : 0
|
|
|
|
|
|
|
+ async handleBlockedToggle(row, value) {
|
|
|
|
|
+ const status = value ? 1 : 0
|
|
|
|
|
+ try {
|
|
|
|
|
+ await setShareBlacklistStatus({ id: row.id, status })
|
|
|
|
|
+ await this.getList()
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.$message.error('状态更新失败')
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
handleBlockedDelete(row) {
|
|
handleBlockedDelete(row) {
|
|
|
- this.$confirm(`确定删除会员账号“${row.member_account}”吗?`, '提示', {
|
|
|
|
|
|
|
+ this.$confirm(`确定删除会员账号“${row.account}”吗?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
- }).then(() => {
|
|
|
|
|
- const rowIndex = this.blockedAllTableData.indexOf(row)
|
|
|
|
|
- if (rowIndex > -1) {
|
|
|
|
|
- this.blockedAllTableData.splice(rowIndex, 1)
|
|
|
|
|
- this.getBlockedList()
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- submitSettings() {
|
|
|
|
|
|
|
+ }).then(async() => {
|
|
|
|
|
+ await deleteShareBlacklist({ id: row.id })
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ this.$message.success('删除成功')
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ },
|
|
|
|
|
+ async submitSettings() {
|
|
|
|
|
+ await saveShareSettings({ ...this.settingsForm })
|
|
|
this.$message.success('提交成功')
|
|
this.$message.success('提交成功')
|
|
|
},
|
|
},
|
|
|
handleSizeChange(value) {
|
|
handleSizeChange(value) {
|
|
@@ -695,10 +600,7 @@ export default {
|
|
|
handleView(row) {
|
|
handleView(row) {
|
|
|
this.viewRow = { ...row }
|
|
this.viewRow = { ...row }
|
|
|
this.detailPage = 1
|
|
this.detailPage = 1
|
|
|
- this.detailQuery = {
|
|
|
|
|
- member_id: '',
|
|
|
|
|
- member_account: ''
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.detailQuery = { member_id: '', account: '' }
|
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
|
this.$refs.viewDialog.open()
|
|
this.$refs.viewDialog.open()
|
|
|
},
|
|
},
|
|
@@ -709,17 +611,15 @@ export default {
|
|
|
resetDetailQuery() {
|
|
resetDetailQuery() {
|
|
|
this.detailQuery = {
|
|
this.detailQuery = {
|
|
|
member_id: '',
|
|
member_id: '',
|
|
|
- member_account: ''
|
|
|
|
|
|
|
+ account: ''
|
|
|
}
|
|
}
|
|
|
this.detailPage = 1
|
|
this.detailPage = 1
|
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
|
},
|
|
},
|
|
|
handleRegisterView(row) {
|
|
handleRegisterView(row) {
|
|
|
this.registerDetailViewDate = row.date
|
|
this.registerDetailViewDate = row.date
|
|
|
- this.registerDetailQuery = {
|
|
|
|
|
- member_id: '',
|
|
|
|
|
- member_account: ''
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.registerDetailPage = 1
|
|
|
|
|
+ this.registerDetailQuery = { member_id: '', account: '' }
|
|
|
this.getRegisterDetailList()
|
|
this.getRegisterDetailList()
|
|
|
this.$refs.registerDialog.open()
|
|
this.$refs.registerDialog.open()
|
|
|
},
|
|
},
|
|
@@ -729,40 +629,22 @@ export default {
|
|
|
resetRegisterDetailQuery() {
|
|
resetRegisterDetailQuery() {
|
|
|
this.registerDetailQuery = {
|
|
this.registerDetailQuery = {
|
|
|
member_id: '',
|
|
member_id: '',
|
|
|
- member_account: ''
|
|
|
|
|
|
|
+ account: ''
|
|
|
}
|
|
}
|
|
|
|
|
+ this.registerDetailPage = 1
|
|
|
this.getRegisterDetailList()
|
|
this.getRegisterDetailList()
|
|
|
},
|
|
},
|
|
|
- getDetailList() {
|
|
|
|
|
- const memberId = this.detailQuery.member_id.trim()
|
|
|
|
|
- const memberAccount = this.detailQuery.member_account.trim()
|
|
|
|
|
- const filteredRows = this.detailAllTableData.filter(item => {
|
|
|
|
|
- const idMatched = !memberId || String(item.member_id).indexOf(memberId) > -1
|
|
|
|
|
- const accountMatched = !memberAccount || item.member_account.indexOf(memberAccount) > -1
|
|
|
|
|
- return idMatched && accountMatched
|
|
|
|
|
- })
|
|
|
|
|
- const detailRows = filteredRows.slice(
|
|
|
|
|
- (this.detailPage - 1) * this.detailLimit,
|
|
|
|
|
- this.detailPage * this.detailLimit
|
|
|
|
|
- )
|
|
|
|
|
- this.detailTotal = filteredRows.length
|
|
|
|
|
- this.detailTableData = detailRows.map(item => ({
|
|
|
|
|
- ...item,
|
|
|
|
|
- date: this.viewRow.date
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ async getDetailList() {
|
|
|
|
|
+ const response = await getSharePromoters({ date: this.viewRow.date, page: this.detailPage, limit: this.detailLimit, member_id: this.detailQuery.member_id, account: this.detailQuery.account })
|
|
|
|
|
+ const result = this.getPageResult(response)
|
|
|
|
|
+ this.detailTotal = result.total
|
|
|
|
|
+ this.detailTableData = result.rows
|
|
|
},
|
|
},
|
|
|
- getRegisterDetailList() {
|
|
|
|
|
- const memberId = this.registerDetailQuery.member_id.trim()
|
|
|
|
|
- const memberAccount = this.registerDetailQuery.member_account.trim()
|
|
|
|
|
- const filteredRows = this.registerDetailAllTableData.filter(item => {
|
|
|
|
|
- const idMatched = !memberId || String(item.member_id).indexOf(memberId) > -1
|
|
|
|
|
- const accountMatched = !memberAccount || item.member_account.indexOf(memberAccount) > -1
|
|
|
|
|
- return idMatched && accountMatched
|
|
|
|
|
- })
|
|
|
|
|
- this.registerDetailTableData = filteredRows.map(item => ({
|
|
|
|
|
- ...item,
|
|
|
|
|
- date: this.registerDetailViewDate
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ async getRegisterDetailList() {
|
|
|
|
|
+ const response = await getShareRegistrations({ date: this.registerDetailViewDate, page: this.registerDetailPage, limit: this.registerDetailLimit, member_id: this.registerDetailQuery.member_id, account: this.registerDetailQuery.account })
|
|
|
|
|
+ const result = this.getPageResult(response)
|
|
|
|
|
+ this.registerDetailTotal = result.total
|
|
|
|
|
+ this.registerDetailTableData = result.rows
|
|
|
},
|
|
},
|
|
|
handleDetailSizeChange(value) {
|
|
handleDetailSizeChange(value) {
|
|
|
this.detailLimit = value
|
|
this.detailLimit = value
|
|
@@ -772,6 +654,15 @@ export default {
|
|
|
handleDetailCurrentChange(value) {
|
|
handleDetailCurrentChange(value) {
|
|
|
this.detailPage = value
|
|
this.detailPage = value
|
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
|
|
|
+ },
|
|
|
|
|
+ handleRegisterDetailSizeChange(value) {
|
|
|
|
|
+ this.registerDetailLimit = value
|
|
|
|
|
+ this.registerDetailPage = 1
|
|
|
|
|
+ this.getRegisterDetailList()
|
|
|
|
|
+ },
|
|
|
|
|
+ handleRegisterDetailCurrentChange(value) {
|
|
|
|
|
+ this.registerDetailPage = value
|
|
|
|
|
+ this.getRegisterDetailList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|