From c6a9c8d34225a551b1e45d852a46aac5eb9ea364 Mon Sep 17 00:00:00 2001
From: liangzai <2440983361@qq.com>
Date: Tue, 20 Jan 2026 20:18:49 +0800
Subject: [PATCH] f
---
src/views/AgentPromoteDetails.vue | 92 ++++++++++++++++++++++++++++---
1 file changed, 84 insertions(+), 8 deletions(-)
diff --git a/src/views/AgentPromoteDetails.vue b/src/views/AgentPromoteDetails.vue
index 66d7d22..ba7e8b2 100644
--- a/src/views/AgentPromoteDetails.vue
+++ b/src/views/AgentPromoteDetails.vue
@@ -12,16 +12,26 @@
{{ item.product_name }}
-
-
直接收益
-
- {{ item.status === 2 ? '-' : '+' }}{{ item.amount.toFixed(2) }}
-
+
+
直接收益
+
+
+
+ {{ getAmountPrefix(item) }}{{ (item.net_amount || 0).toFixed(2) }}
+
+
+
+ 原始 {{ item.amount.toFixed(2) }},已退 {{ item.refunded_amount.toFixed(2) }}
+
+
-
-
+
{{ desen(item.query_params?.name) || '-' }}
- 已退款
+
+
+ {{ getStatusText(item) }}
+
{{ item.create_time || '-' }}
@@ -88,6 +98,72 @@ const getDotColor = (name) => {
return (typeColors[name] || typeColors.default).dot
}
+// 获取金额颜色
+const getAmountColor = (item) => {
+ // 如果净佣金为0或状态为已退款,显示红色
+ if (item.net_amount <= 0 || item.status === 2) {
+ return 'text-red-500'
+ }
+ // 如果有部分退款,显示橙色
+ if (item.refunded_amount > 0) {
+ return 'text-orange-500'
+ }
+ // 正常情况显示绿色
+ return 'text-green-500'
+}
+
+// 获取金额前缀(+ 或 -)
+const getAmountPrefix = (item) => {
+ if (item.net_amount <= 0 || item.status === 2) {
+ return '-'
+ }
+ return '+'
+}
+
+// 获取状态文本
+const getStatusText = (item) => {
+ if (item.status === 2 || item.net_amount <= 0) {
+ return '已退款'
+ }
+ if (item.status === 1) {
+ // 冻结中
+ if (item.refunded_amount > 0) {
+ return '冻结中(部分退款)'
+ }
+ return '冻结中'
+ }
+ if (item.status === 0) {
+ // 已结算
+ if (item.refunded_amount > 0) {
+ return '已结算(部分退款)'
+ }
+ return '已结算'
+ }
+ return '未知状态'
+}
+
+// 获取状态样式
+const getStatusStyle = (item) => {
+ if (item.status === 2 || item.net_amount <= 0) {
+ return 'bg-red-100 text-red-800'
+ }
+ if (item.status === 1) {
+ // 冻结中
+ if (item.refunded_amount > 0) {
+ return 'bg-orange-100 text-orange-800'
+ }
+ return 'bg-yellow-100 text-yellow-800'
+ }
+ if (item.status === 0) {
+ // 已结算
+ if (item.refunded_amount > 0) {
+ return 'bg-blue-100 text-blue-800'
+ }
+ return 'bg-green-100 text-green-800'
+ }
+ return 'bg-gray-100 text-gray-800'
+}
+
// 加载更多数据
const onLoad = async () => {
if (!finished.value) {