From 5d8bef770ba1202937129718da9b49eb613ec30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 15 Oct 2025 02:07:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(dealer):=20=E6=B7=BB=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=94=80=E5=95=86=E8=AE=A2=E5=8D=95=E6=94=B6=E7=9B=8A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA-=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=88=86=E9=94=80=E5=95=86=E8=AE=A2=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=98=B5=E7=A7=B0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20-=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E7=BA=A7=E3=80=81?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E3=80=81=E4=B8=89=E7=BA=A7=E5=88=86=E9=94=80?= =?UTF-8?q?=E5=95=86=E6=98=B5=E7=A7=B0=E5=AD=97=E6=AE=B5=20-=20=E5=9C=A8?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E4=B8=AD=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=94=B6=E7=9B=8A=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF-=20?= =?UTF-8?q?=E5=8C=85=E6=8B=AC=E8=87=AA=E6=9C=89=E6=94=B6=E7=9B=8A=E3=80=81?= =?UTF-8?q?=E5=90=88=E4=BD=9C=E6=96=B9=E6=94=B6=E7=9B=8A=E5=92=8C=E8=81=94?= =?UTF-8?q?=E7=9B=9F=E6=94=B6=E7=9B=8A=E8=A1=A5=E8=B4=B4=20-=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9A=82=E6=97=A0=E6=94=B6=E7=9B=8A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E6=8F=90=E7=A4=BA=20-=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=BB=93=E7=AE=97=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shop/shopDealerOrder/model/index.ts | 10 +++++- src/dealer/orders/index.tsx | 37 +++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/api/shop/shopDealerOrder/model/index.ts b/src/api/shop/shopDealerOrder/model/index.ts index 0be25d5..03916cd 100644 --- a/src/api/shop/shopDealerOrder/model/index.ts +++ b/src/api/shop/shopDealerOrder/model/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@/api/index'; +import type { PageParam } from '@/api'; /** * 分销商订单记录表 @@ -8,6 +8,8 @@ export interface ShopDealerOrder { id?: number; // 买家用户ID userId?: number; + // 昵称 + nickname?: string; // 订单编号 orderNo?: string; // 订单总金额(不含运费) @@ -24,6 +26,12 @@ export interface ShopDealerOrder { secondMoney?: string; // 分销佣金(三级) thirdMoney?: string; + // 分销商昵称(一级) + firstNickname: undefined, + // 分销商昵称(二级) + secondNickname: undefined, + // 分销商昵称(三级) + thirdNickname: undefined, // 订单结算金额 settledPrice?: string; // 订单支付金额 diff --git a/src/dealer/orders/index.tsx b/src/dealer/orders/index.tsx index 2d6557e..56c2305 100644 --- a/src/dealer/orders/index.tsx +++ b/src/dealer/orders/index.tsx @@ -43,6 +43,7 @@ const DealerOrder: React.FC = () => { const result = await pageShopDealerOrder({ isInvalid: 0, + isSettled: 1, resourceId: Taro.getStorageSync('UserId'), month: date, page, @@ -125,6 +126,42 @@ const DealerOrder: React.FC = () => { + {/* 添加收益用户信息显示 */} + + + 收益计算 + + + + {/* 间推收益用户 */} + {(order.firstNickname || order.firstUserId) && ( + + 自有收益:{order.firstNickname || `用户${order.firstUserId}`} (¥{order.firstMoney || '0.00'}) + + )} + + {/* 一级分销商 */} + {(order.nickname || order.userId) && ( + + 合作方收益:{order.nickname || `用户${order.userId}`} (¥{order.secondMoney || '0.00'}) + + )} + + {/* 三级分销商 */} + {(order.thirdUserId && order.thirdUserId == 0) && ( + + 联盟收益补贴:{order.thirdNickname || `用户${order.thirdUserId}`} (¥{order.thirdMoney || '0.00'}) + + )} + + {/* 如果都没有信息 */} + {!(order.firstNickname || order.firstUserId || order.nickname || order.userId || order.thirdNickname || order.thirdUserId) && ( + + 暂无收益用户 + + )} + + 结算月份:{order.month}