Commit b9765a10 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加跳转订单详情的逻辑

parent 36fe1830
......@@ -26,6 +26,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 退申请单查询-订单详情
{
path: '/memberCenter/afterService/returnManage/returnQuery/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待提交审核退货申请单
{
path: '/memberCenter/afterService/returnManage/returnPrSubmit',
......@@ -48,6 +56,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待提交审核退货申请单-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPrSubmit/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核退货申请单(一级)
{
path: '/memberCenter/afterService/returnManage/returnPr1',
......@@ -70,6 +86,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待审核退货申请单(一级)-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPr1/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核退货申请单(二级)
{
path: '/memberCenter/afterService/returnManage/returnPr2',
......@@ -92,6 +116,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待审核退货申请单(二级)-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPr2/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认退货申请单
{
path: '/memberCenter/afterService/returnManage/returnPrConfirm',
......@@ -114,6 +146,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认退货申请单-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPrConfirm/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待新增退货入库单
{
path: '/memberCenter/afterService/returnManage/returnPrAddWarehousing',
......@@ -128,6 +168,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待新增退货入库单-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPrAddWarehousing/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待退货收货
{
path: '/memberCenter/afterService/returnManage/returnPrReceived',
......@@ -150,6 +198,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待退货收货-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPrReceived/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待退款
{
path: '/memberCenter/afterService/returnManage/returnPrReturn',
......@@ -172,6 +228,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待退款-订单详情
{
path: '/memberCenter/afterService/returnManage/returnPrReturn/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
]
};
......
......@@ -26,6 +26,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 退申请单查询-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnQuery/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待提交退货申请单
{
path: '/memberCenter/afterService/returnApplication/returnPrSubmit',
......@@ -56,6 +64,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待提交退货申请单-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待新增退货发货单
{
path: '/memberCenter/afterService/returnApplication/returnPrAddDeliver',
......@@ -70,6 +86,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待新增退货发货单-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrAddDeliver/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待新增物流单
{
path: '/memberCenter/afterService/returnApplication/returnPrAddLogistics',
......@@ -84,6 +108,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待新增物流单-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrAddLogistics/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待退货发货
{
path: '/memberCenter/afterService/returnApplication/returnPrDeliver',
......@@ -106,6 +138,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待退货发货-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrDeliver/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认退货回单
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmBack',
......@@ -128,6 +168,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认退货回单-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmBack/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认退款结果
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmResult',
......@@ -150,6 +198,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认退款结果-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmResult/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认售后完成
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmFinish',
......@@ -172,6 +228,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认退款结果-订单详情
{
path: '/memberCenter/afterService/returnApplication/returnPrConfirmFinish/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
]
}
......
......@@ -48,13 +48,21 @@ const Score = React.lazy(() => import('../../../components/Score'));
const FlowRecords = React.lazy(() => import('../../../components/FlowRecords'));
interface DetailInfoProps {
// 记录id
/**
* 记录id
*/
id: string;
// 是否是编辑的
/**
* 是否是编辑的
*/
isEdit?: boolean;
// 历史记录目标路径
target?: string;
// 头部右侧拓展
/**
* 历史记录目标路径
*/
target: string;
/**
* 头部右侧拓展
*/
headExtra?: (info: DetailInfo) => React.ReactNode;
};
interface DetailInfo extends GetAsReturnGoodsGetDetailByConsumerResponse {
......@@ -101,7 +109,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target ? target : '/memberCenter/payandSettle/creditApplication/quotaPrSubmit/detail'}?id=${record.id}`}
url={`${target}/orderDetail?id=${record.orderId}`}
>
{text}
</EyePreview>
......
......@@ -8,6 +8,7 @@ const ReturnPrAddDeliverDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrAddDeliver"
/>
);
};
......
......@@ -8,6 +8,7 @@ const ReturnPrAddLogisticsDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrAddLogistics"
/>
);
};
......
......@@ -8,6 +8,7 @@ const ReturnPrConfirmBackDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrConfirmBack"
/>
);
};
......
......@@ -132,6 +132,7 @@ const ReturnPrConfirmBackVerify: React.FC = () => {
</Button>
</Space>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmBack"
/>
</>
);
......
......@@ -8,6 +8,7 @@ const ReturnPrConfirmFinishDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrConfirmFinish"
/>
);
};
......
......@@ -42,6 +42,7 @@ const ReturnPrConfirmFinishVerify: React.FC = () => {
提交
</Button>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmFinish"
/>
<FinishedModal
......
......@@ -8,6 +8,7 @@ const ReturnPrConfirmResultDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrConfirmResult"
/>
);
};
......
......@@ -40,6 +40,7 @@ const ReturnPrConfirmResultVerify: React.FC = () => {
确认本单所有退款到账
</Button>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmResult"
/>
</>
);
......
......@@ -8,6 +8,7 @@ const ReturnPrDeliverDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnPrDeliver"
/>
);
};
......
......@@ -51,6 +51,7 @@ const ReturnPrDeliverVerify: React.FC = () => {
)}
</>
)}
target="/memberCenter/afterService/returnApplication/returnPrDeliver"
/>
<ManualDeliveryModal
......
......@@ -3,7 +3,7 @@ import { Button, Card, Spin, Badge, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { DeleteOutlined } from '@ant-design/icons';
import { Radio, ArrayTable } from '@formily/antd-components';
import { history, Prompt } from 'umi';
import { history, Prompt, Link } from 'umi';
import moment from 'moment';
import { findLastIndex } from 'lodash';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
......@@ -35,7 +35,9 @@ const {
interface BillsFormProps {
id?: string;
// 是否是编辑的
/**
* 是否是编辑的
*/
isEdit?: boolean;
/**
* 订单id,从订单列表跳转过来的
......@@ -61,6 +63,18 @@ interface DetailInfo {
orderNo?: string,
}
interface OrderNoProps {
value: any,
}
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/returnApplication/returnPrSubmit?orderNo=${value}`}>{value}</Link>
)
};
OrderNo.isFieldComponent = true;
const ReturnForm: React.FC<BillsFormProps> = ({
id,
isEdit = false,
......@@ -636,6 +650,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
components={{
ArrayTable,
AddressFormItem,
OrderNo,
}}
editable={isEdit || !id}
effects={($, actions) => {
......
......@@ -235,7 +235,7 @@ export const addBillSchema: ISchema = {
orderNo: {
type: 'string',
title: '订单号',
'x-component': 'Text',
'x-component': 'OrderNo',
},
productId: {
type: 'string',
......
......@@ -8,6 +8,7 @@ const ReturnQueryDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnApplication/returnQuery"
/>
);
};
......
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