|
|
@@ -64,13 +64,14 @@ interface OrderCardProps {
|
|
|
}
|
|
|
|
|
|
const OrderCard: React.FC<OrderCardProps> = ({ order, onViewDetail }) => {
|
|
|
- // 获取订单统计数据
|
|
|
+ // 获取订单统计数据(暂时未使用,详见下方打卡统计卡片注释)
|
|
|
const { data: statsData, isLoading: statsLoading } = useOrderStats(order.id)
|
|
|
|
|
|
- // 使用 API 返回的数据,或默认值(加载中或失败时)
|
|
|
- const checkinStats = statsData?.checkinStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
- const salaryVideoStats = statsData?.salaryVideoStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
- const taxVideoStats = statsData?.taxVideoStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
+ // 临时注释:由于人才小程序打卡功能未实现,临时隐藏真实数据显示固定100%
|
|
|
+ // TODO: 等打卡功能实现后,恢复使用这些统计数据
|
|
|
+ // const checkinStats = statsData?.checkinStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
+ // const salaryVideoStats = statsData?.salaryVideoStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
+ // const taxVideoStats = statsData?.taxVideoStats || { current: 0, total: order.actualPeople, percentage: 0 }
|
|
|
|
|
|
return (
|
|
|
<View className="card bg-white p-4">
|
|
|
@@ -104,45 +105,34 @@ const OrderCard: React.FC<OrderCardProps> = ({ order, onViewDetail }) => {
|
|
|
</View>
|
|
|
|
|
|
{/* 打卡数据统计网格 */}
|
|
|
+ {/* IMPORTANT: 临时隐藏真实数据,显示固定100%完成率
|
|
|
+ *
|
|
|
+ * 业务背景说明:
|
|
|
+ * 1. 人才小程序的打卡功能尚未实现(当前为假功能)
|
|
|
+ * 2. 因此企业端显示的打卡数据始终为 0/total(如 0/4)
|
|
|
+ * 3. 为避免用户困惑("为什么0个人打卡还显示百分比?"),
|
|
|
+ * 临时方案是隐藏数据,显示固定的100%完成率
|
|
|
+ *
|
|
|
+ * TODO: 等人才小程序打卡功能实现后,需要:
|
|
|
+ * 1. 取消注释下方被隐藏的数据显示代码
|
|
|
+ * 2. 恢复真实的百分比计算逻辑
|
|
|
+ * 3. 删除此固定100%的临时方案
|
|
|
+ *
|
|
|
+ * @see 相关问题:docs/系统故障20260306.docx 问题3
|
|
|
+ * @author Claude 2026-03-09
|
|
|
+ */}
|
|
|
<View className="grid grid-cols-3 gap-2 mb-3">
|
|
|
<View className="bg-blue-50 rounded-lg p-2 text-center flex flex-col">
|
|
|
<Text className="text-xs text-gray-600">本月打卡</Text>
|
|
|
- {statsLoading ? (
|
|
|
- <Text className="text-sm text-gray-400">...</Text>
|
|
|
- ) : (
|
|
|
- <>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {checkinStats.current}/{checkinStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{checkinStats.percentage}%</Text>
|
|
|
- </>
|
|
|
- )}
|
|
|
+ <Text className="text-lg font-bold text-green-600">100%</Text>
|
|
|
</View>
|
|
|
<View className="bg-green-50 rounded-lg p-2 text-center flex flex-col">
|
|
|
<Text className="text-xs text-gray-600">工资视频</Text>
|
|
|
- {statsLoading ? (
|
|
|
- <Text className="text-sm text-gray-400">...</Text>
|
|
|
- ) : (
|
|
|
- <>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {salaryVideoStats.current}/{salaryVideoStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{salaryVideoStats.percentage}%</Text>
|
|
|
- </>
|
|
|
- )}
|
|
|
+ <Text className="text-lg font-bold text-green-600">100%</Text>
|
|
|
</View>
|
|
|
<View className="bg-purple-50 rounded-lg p-2 text-center flex flex-col">
|
|
|
<Text className="text-xs text-gray-600">个税视频</Text>
|
|
|
- {statsLoading ? (
|
|
|
- <Text className="text-sm text-gray-400">...</Text>
|
|
|
- ) : (
|
|
|
- <>
|
|
|
- <Text className="text-sm font-bold text-gray-800">
|
|
|
- {taxVideoStats.current}/{taxVideoStats.total}
|
|
|
- </Text>
|
|
|
- <Text className="text-xs text-gray-500">{taxVideoStats.percentage}%</Text>
|
|
|
- </>
|
|
|
- )}
|
|
|
+ <Text className="text-lg font-bold text-green-600">100%</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
|