|
@@ -120,19 +120,8 @@ const OrderDetailModal: React.FC<OrderDetailModalProps> = ({
|
|
|
// 从订单详情中获取人员信息
|
|
// 从订单详情中获取人员信息
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
if (order && order.orderPersons) {
|
|
if (order && order.orderPersons) {
|
|
|
- // 这里需要获取人员详细信息(姓名、性别等)
|
|
|
|
|
- // 暂时使用基本信息
|
|
|
|
|
- const personsWithDetails = order.orderPersons.map(person => ({
|
|
|
|
|
- ...person,
|
|
|
|
|
- person: {
|
|
|
|
|
- id: person.personId,
|
|
|
|
|
- name: `人员${person.personId}`, // 实际应该从API获取姓名
|
|
|
|
|
- gender: '未知', // 实际应该从API获取
|
|
|
|
|
- disabilityType: '未知', // 实际应该从API获取
|
|
|
|
|
- phone: '未知', // 实际应该从API获取
|
|
|
|
|
- }
|
|
|
|
|
- }));
|
|
|
|
|
- setOrderPersons(personsWithDetails);
|
|
|
|
|
|
|
+ // API已经返回了完整的person字段,直接使用
|
|
|
|
|
+ setOrderPersons(order.orderPersons);
|
|
|
} else {
|
|
} else {
|
|
|
setOrderPersons([]);
|
|
setOrderPersons([]);
|
|
|
}
|
|
}
|