feat(dealer): 添加分销商订单收益用户信息展示- 更新分销商订单模型,增加昵称字段
- 添加一级、二级、三级分销商昵称字段 - 在订单列表中展示收益用户信息- 包括自有收益、合作方收益和联盟收益补贴 - 增加暂无收益用户的默认提示 - 调整订单查询条件,添加结算状态过滤
This commit is contained in:
@@ -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?: number;
|
||||||
// 买家用户ID
|
// 买家用户ID
|
||||||
userId?: number;
|
userId?: number;
|
||||||
|
// 昵称
|
||||||
|
nickname?: string;
|
||||||
// 订单编号
|
// 订单编号
|
||||||
orderNo?: string;
|
orderNo?: string;
|
||||||
// 订单总金额(不含运费)
|
// 订单总金额(不含运费)
|
||||||
@@ -24,6 +26,12 @@ export interface ShopDealerOrder {
|
|||||||
secondMoney?: string;
|
secondMoney?: string;
|
||||||
// 分销佣金(三级)
|
// 分销佣金(三级)
|
||||||
thirdMoney?: string;
|
thirdMoney?: string;
|
||||||
|
// 分销商昵称(一级)
|
||||||
|
firstNickname: undefined,
|
||||||
|
// 分销商昵称(二级)
|
||||||
|
secondNickname: undefined,
|
||||||
|
// 分销商昵称(三级)
|
||||||
|
thirdNickname: undefined,
|
||||||
// 订单结算金额
|
// 订单结算金额
|
||||||
settledPrice?: string;
|
settledPrice?: string;
|
||||||
// 订单支付金额
|
// 订单支付金额
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ const DealerOrder: React.FC = () => {
|
|||||||
|
|
||||||
const result = await pageShopDealerOrder({
|
const result = await pageShopDealerOrder({
|
||||||
isInvalid: 0,
|
isInvalid: 0,
|
||||||
|
isSettled: 1,
|
||||||
resourceId: Taro.getStorageSync('UserId'),
|
resourceId: Taro.getStorageSync('UserId'),
|
||||||
month: date,
|
month: date,
|
||||||
page,
|
page,
|
||||||
@@ -125,6 +126,42 @@ const DealerOrder: React.FC = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
{/* 添加收益用户信息显示 */}
|
||||||
|
<View className="flex justify-between items-center mb-1 mt-2">
|
||||||
|
<Text className="text-sm text-gray-400">
|
||||||
|
收益计算
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View className="mb-1">
|
||||||
|
{/* 间推收益用户 */}
|
||||||
|
{(order.firstNickname || order.firstUserId) && (
|
||||||
|
<Text className="text-sm text-gray-400 block">
|
||||||
|
自有收益:{order.firstNickname || `用户${order.firstUserId}`} (¥{order.firstMoney || '0.00'})
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* 一级分销商 */}
|
||||||
|
{(order.nickname || order.userId) && (
|
||||||
|
<Text className="text-sm text-gray-400 block">
|
||||||
|
合作方收益:{order.nickname || `用户${order.userId}`} (¥{order.secondMoney || '0.00'})
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* 三级分销商 */}
|
||||||
|
{(order.thirdUserId && order.thirdUserId == 0) && (
|
||||||
|
<Text className="text-sm text-gray-400 block">
|
||||||
|
联盟收益补贴:{order.thirdNickname || `用户${order.thirdUserId}`} (¥{order.thirdMoney || '0.00'})
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* 如果都没有信息 */}
|
||||||
|
{!(order.firstNickname || order.firstUserId || order.nickname || order.userId || order.thirdNickname || order.thirdUserId) && (
|
||||||
|
<Text className="text-sm text-gray-400 block">
|
||||||
|
暂无收益用户
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
|
||||||
<View className="flex justify-between items-center">
|
<View className="flex justify-between items-center">
|
||||||
<Text className="text-sm text-gray-400">
|
<Text className="text-sm text-gray-400">
|
||||||
结算月份:{order.month}
|
结算月份:{order.month}
|
||||||
|
|||||||
Reference in New Issue
Block a user