feat(dealer): 添加客户搜索功能并优化订单展示
- 在客户页面添加搜索栏,支持防抖搜索- 增加搜索结果统计展示-优化订单列表展示逻辑 - 调整订单状态文案及金额显示 - 更新收益统计标题- 添加订单备注字段支持 - 过滤已失效订单数据
This commit is contained in:
@@ -36,6 +36,7 @@ const DealerOrders: React.FC = () => {
|
||||
}
|
||||
|
||||
const result = await pageShopDealerOrder({
|
||||
isInvalid: 0,
|
||||
page,
|
||||
limit: 10
|
||||
})
|
||||
@@ -91,7 +92,7 @@ const DealerOrders: React.FC = () => {
|
||||
}, [fetchOrders])
|
||||
|
||||
const getStatusText = (isSettled?: number, isInvalid?: number) => {
|
||||
if (isInvalid === 1) return '已失效'
|
||||
if (isInvalid === 1) return '未签约'
|
||||
if (isSettled === 1) return '已结算'
|
||||
return '待结算'
|
||||
}
|
||||
@@ -106,7 +107,7 @@ const DealerOrders: React.FC = () => {
|
||||
<View key={order.id} className="bg-white rounded-lg p-4 mb-3 shadow-sm">
|
||||
<View className="flex justify-between items-start mb-1">
|
||||
<Text className="font-semibold text-gray-800">
|
||||
订单号:{order.orderNo}
|
||||
电费收益
|
||||
</Text>
|
||||
<Tag type={getStatusColor(order.isSettled, order.isInvalid)}>
|
||||
{getStatusText(order.isSettled, order.isInvalid)}
|
||||
@@ -115,19 +116,19 @@ const DealerOrders: React.FC = () => {
|
||||
|
||||
<View className="flex justify-between items-center mb-1">
|
||||
<Text className="text-sm text-gray-400">
|
||||
订单金额:¥{order.orderPrice || '0.00'}
|
||||
结算金额:¥{order.orderPrice || '0.00'}
|
||||
</Text>
|
||||
<Text className="text-sm text-orange-500 font-semibold">
|
||||
我的佣金:¥{order.userCommission}
|
||||
<Text className="text-lg text-orange-500 font-semibold">
|
||||
¥{(Number(order.orderPrice) * 10).toFixed(2)}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View className="flex justify-between items-center">
|
||||
<Text className="text-sm text-gray-400">
|
||||
客户:{order.customerName}
|
||||
客户:{order.comments}
|
||||
</Text>
|
||||
<Text className="text-sm text-gray-400">
|
||||
{order.createTime}
|
||||
{order.settleTime}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user