787 行
46 KiB
HTML
787 行
46 KiB
HTML
{include file="/shopro/common/script" /}
|
||
|
||
<style>
|
||
.agent-detail {
|
||
background: #fff;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.agent-detail .panel-block {
|
||
height: 100%;
|
||
}
|
||
|
||
.agent-detail .detail-header-bar {
|
||
padding: 12px 16px;
|
||
margin-bottom: 16px;
|
||
background: #fff;
|
||
border-radius: 6px;
|
||
border: 1px solid var(--sa-border);
|
||
}
|
||
|
||
.agent-detail .detail-title-text {
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
margin-left: 12px;
|
||
color: var(--sa-title);
|
||
}
|
||
|
||
.agent-detail .agent-detail-scrollbar>.el-scrollbar__wrap {
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
.agent-detail .agent-detail-scrollbar>.el-scrollbar__bar.is-horizontal {
|
||
display: none;
|
||
}
|
||
|
||
.agent-detail .agent-content {
|
||
min-height: 450px;
|
||
height: auto;
|
||
line-height: 1;
|
||
padding: 20px;
|
||
background: var(--sa-table-header-bg);
|
||
border-radius: 8px;
|
||
margin: 0 0 20px;
|
||
}
|
||
|
||
.agent-detail .user-content .refresh {
|
||
line-height: 16px;
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
color: var(--sa-font);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.agent-detail .user-content .refresh .el-icon {
|
||
font-size: 16px;
|
||
margin-right: 4px;
|
||
}
|
||
|
||
.agent-detail .user-content .nickname {
|
||
line-height: 22px;
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
color: var(--sa-subtitle);
|
||
}
|
||
|
||
.agent-detail .user-content .status {
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
color: #999999;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.agent-content .el-form-item--small {
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.agent-detail .user-content .commission-item {
|
||
width: 30%;
|
||
line-height: 18px;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.agent-detail .user-content .commission-item .title {
|
||
height: 24px;
|
||
line-height: 24px;
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.agent-detail .apply-content .sa-image {
|
||
width: 140px;
|
||
height: 90px;
|
||
}
|
||
|
||
.agent-detail .dashboard-content {
|
||
height: fit-content;
|
||
}
|
||
|
||
.agent-detail .dashboard-content .title {
|
||
height: 18px;
|
||
line-height: 18px;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
color: var(--sa-title);
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.agent-detail .dashboard-content>.el-col {
|
||
border-bottom: 1px dashed var(--sa-border);
|
||
margin-bottom: 16px;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.agent-detail .dashboard-content>.el-col:last-of-type {
|
||
border-bottom: none;
|
||
margin-bottom: 0;
|
||
padding-bottom: 0;
|
||
}
|
||
|
||
.agent-detail .dashboard-content .item {
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.agent-detail .dashboard-content .left {
|
||
line-height: 16px;
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
color: var(--sa-subfont);
|
||
margin-bottom: 8px;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.agent-detail .dashboard-content .item {
|
||
line-height: 22px;
|
||
font-size: 18px;
|
||
font-weight: 500;
|
||
color: var(--sa-font);
|
||
}
|
||
|
||
.agent-detail .dashboard-content .unit {
|
||
font-size: 12px;
|
||
font-weight: 400;
|
||
color: var(--sa-font);
|
||
margin-left: 4px;
|
||
}
|
||
|
||
.agent-detail .rewards-item {
|
||
margin-right: 8px;
|
||
|
||
}
|
||
|
||
.agent-detail .rewards-item:last-of-type {
|
||
margin-right: 0;
|
||
}
|
||
</style>
|
||
|
||
<div id="detail" class="agent-detail panel panel-default panel-intro" v-cloak>
|
||
<el-container class="panel-block">
|
||
<el-main>
|
||
<el-scrollbar class="agent-detail-scrollbar" height="100%">
|
||
<div class="detail-header-bar sa-flex sa-row-between">
|
||
<div class="sa-flex">
|
||
<el-button icon="Back" size="small" @click="onBack">返回</el-button>
|
||
<span class="detail-title-text">
|
||
分销商详情
|
||
<template v-if="state.data.user">
|
||
- {{ state.data.user.nickname || state.data.user_id }}
|
||
</template>
|
||
<template v-else-if="state.id">
|
||
#{{ state.id }}
|
||
</template>
|
||
</span>
|
||
</div>
|
||
<div class="sa-flex">
|
||
<el-button icon="RefreshRight" size="small" circle @click="getDetail" title="刷新"></el-button>
|
||
</div>
|
||
</div>
|
||
<el-row :gutter="20">
|
||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||
<div class="user-content agent-content">
|
||
<div class="title sa-flex sa-row-between">
|
||
<span>分销商信息</span>
|
||
<span class="refresh sa-flex" @click="getDetail">
|
||
<el-icon>
|
||
<refresh-right />
|
||
</el-icon>
|
||
刷新
|
||
</span>
|
||
</div>
|
||
<div v-if="state.data.user" class="sa-flex sa-row-center">
|
||
<sa-image :url="state.data.user.avatar" size="80" radius="40">
|
||
</sa-image>
|
||
</div>
|
||
<div class="nickname sa-flex sa-row-center mt-1">
|
||
{{
|
||
state.data.user
|
||
? state.data.user.nickname
|
||
: state.data.user_id
|
||
}}
|
||
</div>
|
||
<el-form size="small" label-position="right" label-width="116px" style="margin-top: 12px;">
|
||
<div style="font-weight: 600; font-size: 13px; color: var(--sa-title); margin: 8px 0 12px; padding-bottom: 4px; border-bottom: 1px solid var(--sa-border);">
|
||
基础分销信息
|
||
</div>
|
||
<el-form-item label="分销商状态:">
|
||
<el-dropdown popper-class="agent-popover" trigger="click" @command="onChangeStatus">
|
||
<span class="status" :style="{
|
||
color: statusStyle[state.data.status]?.color,
|
||
}">
|
||
{{ state.data.status_text }}
|
||
<el-icon>
|
||
<arrow-down />
|
||
</el-icon>
|
||
</span>
|
||
<template #dropdown>
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-dropdown-menu>
|
||
<el-dropdown-item class="status" :style="{
|
||
color: value.color,
|
||
}" v-for="(value, key) in statusStyle" :key="key" :command="key">{{ value.label }}
|
||
</el-dropdown-item>
|
||
</el-dropdown-menu>
|
||
{/if}
|
||
</template>
|
||
</el-dropdown>
|
||
</el-form-item>
|
||
<el-form-item label="分销等级:">
|
||
<template v-if="state.data.level_info">
|
||
<div>{{ state.data.level_info.name }}</div>
|
||
<div class="ml-1" style="color: var(--sa-subfont);">(等级{{ state.data.level_info.level }})</div>
|
||
</template>
|
||
<template v-if="!state.data.level_info">
|
||
{{ state.data.level }}
|
||
</template>
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-button class="ml-2" type="primary" link @click="onChangeLevel">更换</el-button>
|
||
{/if}
|
||
</el-form-item>
|
||
<el-form-item v-if="state.data.level_status > 0" label="待升级等级:">
|
||
<div v-if="state.data.level_status_info">
|
||
{{ state.data.level_status_info.name }}
|
||
</div>
|
||
<div>(等级{{ state.data.level_status || '-' }})</div>
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-button class="ml-2" type="primary" link
|
||
@click="onEdit({level_status: state.data.level_status})">同意</el-button>
|
||
<el-button type="danger" link @click="onEdit({level_status: 0})">拒绝</el-button>
|
||
{/if}
|
||
</el-form-item>
|
||
<el-form-item label="上级分销商:">
|
||
<sa-user-profile type="agent" :user="state.data.user?.parent_user"
|
||
:id="state.data.user?.parent_user_id" :isavatar="false"></sa-user-profile>
|
||
<el-button class="ml-2" type="primary" link @click="onChangeParentUser">更换
|
||
</el-button>
|
||
</el-form-item>
|
||
<<<<<<< Updated upstream
|
||
<el-form-item v-if="state.data.partner_mode" label="佣金规则:">
|
||
<div class="tip" style="color: var(--sa-subfont); line-height: 1.4;">
|
||
已切换为收益中心固定金额规则,旧百分比不再生效。
|
||
</div>
|
||
=======
|
||
<el-form-item v-if="state.data.partner_mode" label="佣金比例:">
|
||
<div class="tip">已切换为收益中心固定金额,旧百分比不再生效。</div>
|
||
>>>>>>> Stashed changes
|
||
</el-form-item>
|
||
<el-form-item v-else label="佣金比例:">
|
||
<div class="commission-item">
|
||
<div class="title">一级(自购)</div>
|
||
<div>
|
||
{{
|
||
state.data.level_info
|
||
? state.data.level_info.commission_rules.commission_1
|
||
: '0.00'
|
||
}}%
|
||
</div>
|
||
</div>
|
||
<div class="commission-item">
|
||
<div class="title">二级</div>
|
||
<div>
|
||
{{
|
||
state.data.level_info
|
||
? state.data.level_info.commission_rules.commission_2
|
||
: '0.00'
|
||
}}%
|
||
</div>
|
||
</div>
|
||
<div class="commission-item">
|
||
<div class="title">三级</div>
|
||
<div>
|
||
{{
|
||
state.data.level_info
|
||
? state.data.level_info.commission_rules.commission_3
|
||
: '0.00'
|
||
}}%
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item label="允许自动升级:">
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-switch v-model="state.data.upgrade_lock" :active-value="0" :inactive-value="1"
|
||
@change="state.data.user_id?onEdit({upgrade_lock: state.data.upgrade_lock}): ''">
|
||
</el-switch>
|
||
{/if}
|
||
</el-form-item>
|
||
<el-form-item label="直推奖(推三返一):">
|
||
<div>第 {{ state.data.direct_order_seq || 0 }} 单,{{ state.data.next_push3_text || '' }}</div>
|
||
</el-form-item>
|
||
<el-form-item label="累计直推开拓奖:">
|
||
<div>{{ state.data.push3_cash_income || '0.00' }} 元</div>
|
||
</el-form-item>
|
||
|
||
<div style="font-weight: 600; font-size: 13px; color: var(--sa-title); margin: 16px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--sa-border);" class="sa-flex sa-row-between">
|
||
<span>角色身份与进阶权益</span>
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-button type="primary" size="small" link @click="onOpenIdentity">开通 / 调整身份</el-button>
|
||
{/if}
|
||
</div>
|
||
|
||
<template v-if="state.data.is_advanced">
|
||
<el-form-item label="身份标签:">
|
||
<el-tag type="warning" effect="dark" size="small">{{ state.data.identity_text }}</el-tag>
|
||
</el-form-item>
|
||
<el-form-item :label="(state.data.custom_role_names?.maker || '创客') + '等级:'">
|
||
<el-tag size="small" :type="Number(state.data.level) >= 2 ? 'primary' : 'info'">
|
||
{{ Number(state.data.level) >= 2 ? (state.data.maker_level_name || (state.data.custom_role_names?.maker || '创客') + 'V' + (Number(state.data.level) - 1)) : '未升级' + (state.data.custom_role_names?.maker || '创客') }}
|
||
</el-tag>
|
||
</el-form-item>
|
||
<el-form-item :label="(state.data.custom_role_names?.venue || '酒道馆') + ':'">
|
||
<el-tag size="small" :type="state.data.is_venue ? 'success' : 'info'">
|
||
{{ state.data.is_venue ? '已开通' : '未开通' }}
|
||
</el-tag>
|
||
</el-form-item>
|
||
<el-form-item :label="(state.data.custom_role_names?.county || '区县代理') + ':'">
|
||
<el-tag size="small" :type="state.data.is_county ? 'warning' : 'info'">
|
||
{{ state.data.is_county ? '已开通' + (state.data.county_code ? ' (' + state.data.county_code + ')' : '') : '未开通' }}
|
||
</el-tag>
|
||
</el-form-item>
|
||
<el-form-item :label="(state.data.custom_role_names?.partner || '合伙股东') + ':'">
|
||
<el-tag size="small" :type="state.data.is_partner ? 'danger' : 'info'">
|
||
{{ state.data.is_partner ? '已授予' + (state.data.custom_role_names?.partner || '合伙股东') : '未开通' }}
|
||
</el-tag>
|
||
</el-form-item>
|
||
<el-form-item label="30天自购考核:">
|
||
<span v-if="state.data.active_30d" style="color: #52c41a; font-weight: 500;">
|
||
🟢 正常领取
|
||
</span>
|
||
<span v-else style="color: #f56c6c; font-weight: 500;">
|
||
🔴 {{ state.data.active_status_text || '已超期暂停' }}
|
||
</span>
|
||
</el-form-item>
|
||
<el-form-item label="最近自购时间:">
|
||
{{ state.data.last_self_order_text || '从未下单' }}
|
||
</el-form-item>
|
||
<el-form-item label="进阶团队分润:">
|
||
<strong>{{ state.data.partner_exclusive_cash || '0.00' }}</strong> 元
|
||
</el-form-item>
|
||
<el-form-item label="每日贡献马豆:">
|
||
{{ state.data.madow || 0 }}(约合 ¥{{ state.data.madow_value || '0.00' }})
|
||
</el-form-item>
|
||
<el-form-item label="消费补贴兑换券:">
|
||
总额 {{ state.data.voucher_total || 0 }} / 已释放 {{ state.data.voucher_released || 0 }} /
|
||
已使用 {{ state.data.voucher_used || 0 }} / 可用 {{ state.data.voucher_available || 0 }}
|
||
</el-form-item>
|
||
</template>
|
||
|
||
<template v-else>
|
||
<el-form-item label="当前身份:">
|
||
<el-tag type="info" effect="plain" size="small">{{ state.data.identity_text || ('基础会员 · ' + (state.data.custom_role_names?.taster || '品酒师')) }}</el-tag>
|
||
</el-form-item>
|
||
<div style="font-size: 12px; color: var(--sa-subfont); line-height: 1.6; background: #f8fafc; border: 1px dashed var(--sa-border); border-radius: 4px; padding: 8px 12px; margin: 4px 0 10px;">
|
||
💡 <strong>进阶角色体系说明</strong>:系统拥有{{ state.data.custom_role_names?.maker || '创客' }}(V1~V6)、{{ state.data.custom_role_names?.venue || '酒道馆' }}、{{ state.data.custom_role_names?.county || '区县代理' }}、{{ state.data.custom_role_names?.partner || '合伙股东' }}等独立进阶角色,享有团队分润与平台日结分红。当前会员为基础会员,享有推三返一,<strong>免自购考核</strong>。
|
||
</div>
|
||
<el-form-item label="自购考核要求:">
|
||
<el-tag size="small" type="info">免自购考核 (基础会员/{{ state.data.custom_role_names?.taster || '品酒师' }})</el-tag>
|
||
</el-form-item>
|
||
<el-form-item label="进阶权益:">
|
||
<span style="color: var(--sa-subfont);">升级创客或开通馆/县/股东后即可享有团队奖、极差奖与马豆分红</span>
|
||
</el-form-item>
|
||
</template>
|
||
|
||
<div style="font-weight: 600; font-size: 13px; color: var(--sa-title); margin: 16px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--sa-border);">
|
||
收益中心资产汇总
|
||
</div>
|
||
<el-form-item label="收益中心累计现金:">
|
||
<span style="font-size: 16px; font-weight: 600; color: #f56c6c;">
|
||
{{ state.data.income_total_cash || state.data.partner_cash_income || '0.00' }}
|
||
</span>
|
||
<span class="ml-1" style="font-size: 12px; color: var(--sa-subfont);">元</span>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" link
|
||
@click="Fast.api.open('shopro/partner/reward/index?user_id='+state.data.user_id, 'TA的收益流水')">
|
||
TA 的收益流水
|
||
</el-button>
|
||
{if $auth->check('shopro/partner/reward/reissue')}
|
||
<el-button type="primary" link
|
||
@click="Fast.api.open('shopro/partner/reward/index?user_id='+state.data.user_id+'&reissue=1', '手工补发')">
|
||
手工补发 / 扣回
|
||
</el-button>
|
||
{/if}
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</el-col>
|
||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||
<div class="apply-content agent-content">
|
||
<el-form size="small" label-position="right" label-width="76px">
|
||
<div class="title sa-flex sa-row-between mb-4">
|
||
<span>申请信息</span>
|
||
<div>
|
||
{if $auth->check('shopro/commission/agent/edit')}
|
||
<el-button v-if="!applyInfo.flag" type="primary" link
|
||
@click="applyInfo.flag = true">编辑</el-button>
|
||
<div v-if="applyInfo.flag" class="sa-flex">
|
||
<el-button type="danger" link @click="onCancelApplyInfo">
|
||
取消
|
||
</el-button>
|
||
<el-button type="primary" link @click="onSaveApplyInfo">保存
|
||
</el-button>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
<template v-for="(item, index) in applyInfo.data" :key="item">
|
||
<el-form-item :label="`${item.name}:`">
|
||
<div class="sa-flex sa-col-top">
|
||
<template v-if="item.type == 'text' || item.type == 'number'">
|
||
<el-input v-if="applyInfo.flag" class="sa-w-140" v-model="item.value">
|
||
</el-input>
|
||
<template v-if="!applyInfo.flag">
|
||
{{ item.value }}
|
||
</template>
|
||
</template>
|
||
<sa-image v-if="item.type == 'image'" :url="item.value"></sa-image>
|
||
<el-button v-if="applyInfo.flag" class="ml-2" type="danger" link
|
||
size="small" @click="onDeleteApplyInfo(index)">
|
||
删除
|
||
</el-button>
|
||
</div>
|
||
</el-form-item>
|
||
</template>
|
||
</el-form>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="sa-col-24" :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||
<el-row class="dashboard-content agent-content">
|
||
<el-col :span="24">
|
||
<div class="title sa-flex">
|
||
<span>团队统计</span>
|
||
{if $auth->check('shopro/commission/agent/team')}
|
||
<el-button class="ml-2" type="primary" link @click="onTeam">查看团队</el-button>
|
||
{/if}
|
||
</div>
|
||
<el-row>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">团队人数:</div>
|
||
<div class="right">
|
||
{{ state.data.child_user_count_all }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">一级团队人数:</div>
|
||
<div class="right">
|
||
{{ state.data.child_user_count_1 }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">二级团队人数:</div>
|
||
<div class="right">
|
||
{{ state.data.child_user_count_2 }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">
|
||
团队分销商人数:
|
||
<el-popover placement="top" trigger="hover">
|
||
<div v-for="(value, key) in state.data.child_agent_level_all"
|
||
:key="key">
|
||
等级{{ key }}:{{ value }}人
|
||
</div>
|
||
<template #reference>
|
||
<div class="sa-flex">
|
||
<el-icon v-if="state.data.child_agent_count_all"
|
||
class="warning">
|
||
<Warning />
|
||
</el-icon>
|
||
</div>
|
||
</template>
|
||
</el-popover>
|
||
</div>
|
||
<div class="right">
|
||
{{ state.data.child_agent_count_all }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">
|
||
一级分销商人数:
|
||
<el-popover placement="top" trigger="hover">
|
||
<div v-for="(value, key) in state.data.child_agent_level_1" :key="key">
|
||
等级{{ key }}:{{ value }}人
|
||
</div>
|
||
<template #reference>
|
||
<div class="sa-flex">
|
||
<el-icon v-if="state.data.child_agent_count_1" class="warning">
|
||
<Warning />
|
||
</el-icon>
|
||
</div>
|
||
</template>
|
||
</el-popover>
|
||
</div>
|
||
<div class="right">
|
||
{{ state.data.child_agent_count_1 }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">二级分销商人数:</div>
|
||
<div class="right">
|
||
{{ state.data.child_agent_count_2 }}
|
||
<span class="unit">人</span>
|
||
</div>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<div class="title sa-flex">
|
||
<span>业绩统计</span>
|
||
</div>
|
||
<el-row>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">团队分销总金额:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_money_all }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">一级分销总金额:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_money_1 }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">二级分销总金额:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_money_2 }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">
|
||
自购分销总金额:
|
||
<el-popover popper-class="sa-popper" placement="top" trigger="hover"
|
||
content="分销商自购分销商品金额统计">
|
||
<template #reference>
|
||
<div class="sa-flex">
|
||
<el-icon class="warning">
|
||
<Warning />
|
||
</el-icon>
|
||
</div>
|
||
</template>
|
||
</el-popover>
|
||
</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_money_0 }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">团队分销订单:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_count_all }}
|
||
<span class="unit">单</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">一级分销订单:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_count_1 }}
|
||
<span class="unit">单</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">二级分销订单:</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_count_2 }}
|
||
<span class="unit">单</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
|
||
<div class="left">
|
||
自购分销订单:
|
||
<el-popover popper-class="sa-popper" placement="top" trigger="hover"
|
||
content="分销商自购分销订单数量统计">
|
||
<template #reference>
|
||
<div class="sa-flex">
|
||
<el-icon class="warning">
|
||
<Warning />
|
||
</el-icon>
|
||
</div>
|
||
</template>
|
||
</el-popover>
|
||
</div>
|
||
<div class="right">
|
||
{{ state.data.child_order_count_0 }}
|
||
<span class="unit">单</span>
|
||
</div>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<div class="title sa-flex">
|
||
<span>资产信息</span>
|
||
</div>
|
||
<el-row>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">累计佣金:</div>
|
||
<div class="right">
|
||
{{ state.data.total_income }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">待入账佣金:</div>
|
||
<div class="right">
|
||
{{ state.data.pending_reward }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
<el-col class="item" :xs="12" :sm="8" :md="8" :lg="8" :xl="8">
|
||
<div class="left">消费金额:</div>
|
||
<div class="right">
|
||
{{ state.data.user?.total_consume || 0 }}
|
||
<span class="unit">元</span>
|
||
</div>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
</el-row>
|
||
<el-tabs class="sa-tabs" v-model="log.tabActive" @tab-change="onChangeTab">
|
||
<el-tab-pane label="分销动态" name="log"></el-tab-pane>
|
||
<el-tab-pane label="分销订单" name="order"></el-tab-pane>
|
||
<el-tab-pane label="佣金明细" name="reward"></el-tab-pane>
|
||
</el-tab-pane>
|
||
</el-tabs>
|
||
<el-table v-if="log.tabActive=='log'" class="sa-table" :data="log.data" stripe>
|
||
<el-table-column prop="id" label="ID" min-width="90"></el-table-column>
|
||
<el-table-column label="分销商" min-width="160">
|
||
<template #default="scope">
|
||
<sa-user-profile :user="scope.row.agent" :id="scope.row.agent_id"></sa-user-profile>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="remark" label="内容" min-width="300"></el-table-column>
|
||
<el-table-column label="操作人" min-width="160">
|
||
<template #default="scope">
|
||
<sa-user-profile type="oper" :user="scope.row.oper" :id="scope.row.oper_id">
|
||
</sa-user-profile>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="createtime" label="动态时间" width="172"></el-table-column>
|
||
</el-table>
|
||
<el-table v-if="log.tabActive=='order'" class="sa-table" :data="log.data" stripe>
|
||
<el-table-column prop="id" label="ID" min-width="90"></el-table-column>
|
||
<el-table-column label="订单号" min-width="260">
|
||
<template #default="scope">
|
||
{{ scope.row.order?.order_sn || scope.row.order_id }}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="下单用户" min-width="160">
|
||
<template #default="scope">
|
||
<sa-user-profile :user="scope.row.buyer" :id="scope.row.buyer_id"></sa-user-profile>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="分佣状态" min-width="100">
|
||
<template #default="scope">
|
||
<span :class="`sa-color--${log.status[scope.row.commission_reward_status]}`">
|
||
{{ scope.row.commission_reward_status_text }}
|
||
</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="商品结算金额" min-width="160">
|
||
<template #default="scope"> {{ scope.row.amount }}元 </template>
|
||
</el-table-column>
|
||
<el-table-column label="分销总金额/到账金额" min-width="160">
|
||
<template #default="scope">
|
||
{{ countCommission(scope.row.rewards) }}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="佣金详情" min-width="200" align="center">
|
||
<template #default="scope">
|
||
<div class="sa-flex sa-row-center">
|
||
<div class="rewards-item sa-flex sa-flex-col" v-for="rewards in scope.row.rewards"
|
||
:key="rewards">
|
||
<template v-if="rewards.agent">
|
||
<sa-image :url="rewards.agent.avatar" size="32" radius="16"></sa-image>
|
||
</template>
|
||
<template v-if="!rewards.agent">
|
||
{{ rewards.agent_id }}
|
||
</template>
|
||
<div class="commission sa-m-t-6">{{ rewards.commission }}元</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="commission_time" label="加入时间" width="172"></el-table-column>
|
||
</el-table>
|
||
<el-table v-if="log.tabActive=='reward'" class="sa-table" :data="log.data" stripe>
|
||
<el-table-column prop="id" label="ID" min-width="90"></el-table-column>
|
||
<el-table-column label="订单号" min-width="260">
|
||
<template #default="scope">
|
||
{{ scope.row.order?.order_sn || scope.row.order_id }}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="下单用户" min-width="160">
|
||
<template #default="scope">
|
||
<sa-user-profile :user="scope.row.buyer" :id="scope.row.buyer_id"></sa-user-profile>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="分销用户" min-width="160">
|
||
<template #default="scope">
|
||
<sa-user-profile :user="scope.row.agent" :id="scope.row.agent_id"></sa-user-profile>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="分销金额" min-width="160">
|
||
<template #default="scope"> {{ scope.row.commission }}元 </template>
|
||
</el-table-column>
|
||
<el-table-column label="入账状态" min-width="80">
|
||
<template #default="scope">
|
||
<span :class="`sa-color--${log.status[scope.row.status]}`">
|
||
{{ scope.row.status_text }}
|
||
</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="type_text" label="入账方式" min-width="80"></el-table-column>
|
||
<el-table-column prop="commission_time" label="分佣时间" width="172"></el-table-column>
|
||
</el-table>
|
||
<el-footer class="sa-footer sa-flex sa-row-right">
|
||
<sa-pagination v-model="pagination" @pagination-change="getLog"></sa-pagination>
|
||
</el-footer>
|
||
</el-scrollbar>
|
||
</el-main>
|
||
</el-container>
|
||
<el-dialog v-model="identity.visible" title="开通 / 调整身份" width="520px" destroy-on-close>
|
||
<el-form label-width="100px">
|
||
<el-form-item label="用户">{{ identity.form.nickname || state.data.user_id }}</el-form-item>
|
||
<el-form-item label="当前身份">{{ identity.form.before_text || '-' }}</el-form-item>
|
||
<el-form-item label="创客等级" required>
|
||
<el-select v-model="identity.form.level" style="width:100%">
|
||
<el-option v-for="item in identity.levels" :key="item.level" :label="item.name"
|
||
:value="item.level"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="酒道馆">
|
||
<el-switch v-model="identity.form.is_venue" :active-value="1" :inactive-value="0"></el-switch>
|
||
</el-form-item>
|
||
<el-form-item label="区县代理">
|
||
<el-switch v-model="identity.form.is_county" :active-value="1" :inactive-value="0"></el-switch>
|
||
</el-form-item>
|
||
<el-form-item v-if="identity.form.is_county" label="区县" required>
|
||
<el-cascader v-model="identity.form.area_arr" :options="identity.areaSelect" :props="{
|
||
value: 'id', label: 'name', children: 'children', checkStrictly: true, emitPath: true
|
||
}" clearable filterable style="width:100%" @change="onIdentityAreaChange"></el-cascader>
|
||
</el-form-item>
|
||
<el-form-item label="升级锁定">
|
||
<el-switch v-model="identity.form.upgrade_lock" :active-value="1" :inactive-value="0"></el-switch>
|
||
</el-form-item>
|
||
<el-form-item label="备注">
|
||
<el-input v-model="identity.form.remark" type="textarea"></el-input>
|
||
</el-form-item>
|
||
</el-form>
|
||
<template #footer>
|
||
<el-button @click="identity.visible=false">取消</el-button>
|
||
<el-button type="primary" :loading="identity.loading" @click="onSubmitIdentity">确定</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
</div> |