feat(dashboard): 从专业财富观角度重构升级后台收益与分成统计仪表盘

这个提交包含在:
chen
2026-09-17 08:22:23 +08:00
父节点 64a9563779
当前提交 b6287bf2e0
共有 40 个文件被更改,包括 5145 次插入 和 1015 次删除

查看文件

@@ -36,9 +36,15 @@
<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="180">
<el-table-column label="订单" min-width="190">
<template #default="scope">
{{ scope.row.order?.order_sn || scope.row.order_id }}
<div v-if="scope.row.order_id > 0" class="sa-flex sa-row-between">
<el-link type="primary" :underline="false" @click="onOrderTree(scope.row)">
{{ scope.row.order?.order_sn || scope.row.order_id }}
</el-link>
<el-button type="primary" link size="small" @click="onOrderTree(scope.row)">透视</el-button>
</div>
<span v-else>{{ scope.row.order?.order_sn || scope.row.order_id }}</span>
</template>
</el-table-column>
<el-table-column prop="reward_type_text" label="奖项" min-width="120"></el-table-column>
@@ -58,8 +64,9 @@
</template>
</el-table-column>
<el-table-column prop="formula" label="公式摘要" min-width="200"></el-table-column>
<el-table-column label="操作" min-width="120" fixed="right">
<el-table-column label="操作" min-width="180" fixed="right">
<template #default="scope">
<el-button v-if="scope.row.order_id > 0" type="primary" link @click="onOrderTree(scope.row)">整单透视</el-button>
<el-button type="primary" link @click="onViewExt(scope.row)">查看公式</el-button>
{if $auth->check('shopro/partner/reward/back')}
<el-button v-if="scope.row.status==1 && !scope.row.settle_date" type="danger" link
@@ -94,4 +101,79 @@
<el-button type="primary" @click="onReissue">确定</el-button>
</template>
</el-dialog>
<el-dialog v-model="orderTreeDialog.visible" title="订单分润透视(利益分配树)" width="860px" destroy-on-close>
<div v-loading="orderTreeDialog.loading">
<div style="background:#f8f9fa;padding:14px;border-radius:6px;margin-bottom:16px;">
<el-row :gutter="16">
<el-col :span="6">
<div style="color:#909399;font-size:12px;">订单编号</div>
<div style="font-weight:600;font-size:13px;margin-top:4px;">{{ orderTreeDialog.data.order?.order_sn || '-' }}</div>
</el-col>
<el-col :span="6">
<div style="color:#909399;font-size:12px;">买家信息</div>
<div style="font-weight:600;font-size:13px;margin-top:4px;">{{ orderTreeDialog.data.order?.buyer_nickname || '-' }}</div>
</el-col>
<el-col :span="6">
<div style="color:#909399;font-size:12px;">实付金额</div>
<div style="font-weight:600;font-size:15px;color:#e6a23c;margin-top:4px;">¥ {{ orderTreeDialog.data.order?.pay_fee || '0.00' }}</div>
</el-col>
<el-col :span="6">
<div style="color:#909399;font-size:12px;">状态 / 付款时间</div>
<div style="font-size:12px;margin-top:4px;">
<span class="sa-color--success">{{ orderTreeDialog.data.order?.status_text }}</span> / {{ orderTreeDialog.data.order?.paid_time }}
</div>
</el-col>
</el-row>
<el-divider style="margin:12px 0"></el-divider>
<el-row :gutter="16">
<el-col :span="8">
<div style="color:#909399;font-size:12px;">本单现金分润总额</div>
<div style="font-weight:bold;font-size:18px;color:#f56c6c;margin-top:2px;">¥ {{ orderTreeDialog.data.summary?.total_cash || '0.00' }}</div>
</el-col>
<el-col :span="8">
<div style="color:#909399;font-size:12px;">现金综合拨比率</div>
<div style="font-weight:bold;font-size:18px;margin-top:2px;" :style="{color: parseFloat(orderTreeDialog.data.summary?.payout_ratio || 0) > 70 ? '#e6a23c' : '#67c23a'}">
{{ orderTreeDialog.data.summary?.payout_ratio || '0%' }}
</div>
</el-col>
<el-col :span="8">
<div style="color:#909399;font-size:12px;">分红马豆 (1:1 GMV)</div>
<div style="font-weight:bold;font-size:18px;color:#409eff;margin-top:2px;">{{ orderTreeDialog.data.summary?.total_madow || '0.00000000' }}</div>
</el-col>
</el-row>
<div v-if="orderTreeDialog.data.voucher_plan" style="margin-top:12px;background:#fff;padding:8px 12px;border-radius:4px;border:1px dashed #dcdfe6;font-size:12px;color:#606266;">
<span style="font-weight:600;color:#303133;">1.5倍兑换券履约计划:</span>
总额 ¥ {{ orderTreeDialog.data.voucher_plan.total_amount }},已释放 ¥ {{ orderTreeDialog.data.voucher_plan.released_amount }} (已释放 {{ orderTreeDialog.data.voucher_plan.released_days }}/365天),状态:{{ orderTreeDialog.data.voucher_plan.status_text }}
</div>
</div>
<div style="font-weight:600;margin-bottom:8px;font-size:14px;">利益链分配明细</div>
<el-table :data="orderTreeDialog.data.rewards || []" size="small" border stripe max-height="320">
<el-table-column prop="role_text" label="受益角色" width="90"></el-table-column>
<el-table-column label="受益人" min-width="130">
<template #default="scope">
<span>{{ scope.row.user_nickname }} (ID:{{ scope.row.user_id }})</span>
</template>
</el-table-column>
<el-table-column prop="reward_type_text" label="奖项" width="130"></el-table-column>
<el-table-column label="现金金额" width="100">
<template #default="scope">
<span style="font-weight:600;color:#f56c6c;">¥ {{ scope.row.amount }}</span>
</template>
</el-table-column>
<el-table-column prop="madow" label="马豆" width="100"></el-table-column>
<el-table-column prop="status_text" label="状态" width="80">
<template #default="scope">
<span :class="scope.row.status == 1 ? 'sa-color--success' : (scope.row.status == -2 ? 'sa-color--danger' : 'sa-color--info')">
{{ scope.row.status_text }}
</span>
</template>
</el-table-column>
<el-table-column prop="formula" label="计算规则/说明" min-width="180"></el-table-column>
</el-table>
</div>
<template #footer>
<el-button @click="orderTreeDialog.visible = false">关闭</el-button>
</template>
</el-dialog>
</div>