|
@@ -440,9 +440,17 @@ const getOrderDetail = async (orderId: string | number) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 获取中车订单扩展信息
|
|
// 获取中车订单扩展信息
|
|
|
- if (data?.id) {
|
|
|
|
|
|
|
+ //如果data.parentOrderId存在,则使用data.parentOrderId查询,否则使用data.id查询
|
|
|
|
|
+ if (data?.parentOrderId) {
|
|
|
try {
|
|
try {
|
|
|
- const extRes = await getOrderMainCrrcExt(data.id);
|
|
|
|
|
|
|
+ const extRes = await getOrderMainCrrcExt(orderDetail.value.parentOrderId);
|
|
|
|
|
+ crrcExtInfo.value = extRes.data || ({} as OrderMainCrrcExtVO);
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取中车订单扩展信息失败:', error);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (data?.id) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const extRes = await getOrderMainCrrcExt(orderDetail.value.parentOrderId);
|
|
|
crrcExtInfo.value = extRes.data || ({} as OrderMainCrrcExtVO);
|
|
crrcExtInfo.value = extRes.data || ({} as OrderMainCrrcExtVO);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取中车订单扩展信息失败:', error);
|
|
console.error('获取中车订单扩展信息失败:', error);
|