Commit ba029d4d authored by XieZhiXiong's avatar XieZhiXiong

fix: 跳转订单的问题

parent 6e5fec95
......@@ -7,11 +7,10 @@ import moment from 'moment';
import { findLastIndex } from 'lodash';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined, PlusOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { GetAsReturnGoodsGetDetailByConsumerResponse } from '@/services/AfterServiceV2Api';
import { normalizeFiledata, FileData } from '@/utils';
import { PurchaseOrderOutWorkStateTexts, ORDER_TYPE2 } from '@/constants/order';
import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
......@@ -70,13 +69,17 @@ interface DetailInfo {
interface OrderNoProps {
value: any,
name: string,
}
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
const { value, name } = props;
const extraData = addSchemaAction.getFieldValue(FormPath.transform(name, /\d/, $1 => {
return `returnGoodsList.${$1}.extraData`;
}));
return (
<a
href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?orderNo=${value}`}
href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?id=${extraData?.orderId}`}
target="_blank"
>
{value}
......@@ -339,7 +342,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
returnReason: item.returnReason,
payList: (item.payList || []).map(({ payId, ...rest }) => ({ ...rest, id: payId })),
id: item.orderRecordId,
taskTypeKey,
taskTypeKey,
orderId: item.orderId,
},
associated: !item.associatedProductId ? '' : `${item.productId}/${item.productName}/${item.associatedCategory}/${item.associatedBrand}`,
materielNameAndType: `${item.associatedProductName || ''}${item.associatedType ? '/' + item.associatedType : ''}`,
......@@ -619,6 +623,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
payList: item.payList,
taskTypeKey: item.processKey,
remaining: item.quantity - (item.returnCount || 0), // 可退货数量
orderId: item.orderId,
},
isHasTax: item.tax,
taxRate: item.taxRate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment