Commit b9765a10 authored by XieZhiXiong's avatar XieZhiXiong

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

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