Commit db25bfc3 authored by XieZhiXiong's avatar XieZhiXiong

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

parent b9765a10
......@@ -26,6 +26,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 维修申请单查询-订单详情
{
path: '/memberCenter/afterService/repairManage/repairQuery/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待提交审核维修申请单
{
path: '/memberCenter/afterService/repairManage/repairPrSubmit',
......@@ -48,6 +56,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 维修申请单查询-订单详情
{
path: '/memberCenter/afterService/repairManage/repairPrSubmit/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核维修申请单(一级)
{
path: '/memberCenter/afterService/repairManage/repairPr1',
......@@ -70,6 +86,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待审核维修申请单(一级)-订单详情
{
path: '/memberCenter/afterService/repairManage/repairPr1/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核维修申请单(二级)
{
path: '/memberCenter/afterService/repairManage/repairPr2',
......@@ -92,6 +116,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待审核维修申请单(二级)-订单详情
{
path: '/memberCenter/afterService/repairManage/repairPr2/orderDetail',
component: '@/pages/transaction/saleOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认维修申请单
{
path: '/memberCenter/afterService/repairManage/repairPrConfirm',
......@@ -114,6 +146,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认维修申请单-订单详情
{
path: '/memberCenter/afterService/repairManage/repairPrConfirm/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/repairApplication/repairQuery/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待提交维修申请单
{
path: '/memberCenter/afterService/repairApplication/repairPrSubmit',
......@@ -56,6 +64,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待提交维修申请单-订单详情
{
path: '/memberCenter/afterService/repairApplication/repairPrSubmit/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
// 待确认售后完成
{
path: '/memberCenter/afterService/repairApplication/repairPrFinished',
......@@ -78,6 +94,14 @@ const route: RouterChild = {
hideInMenu: true,
noMargin: true,
},
// 待确认售后完成-订单详情
{
path: '/memberCenter/afterService/repairApplication/repairPrFinished/orderDetail',
component: '@/pages/transaction/purchaseOrder/orderPreview',
name: 'orderPreview',
hideInMenu: true,
noMargin: true,
},
]
}
......
......@@ -84,7 +84,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail}?id=${record.orderId}`}
url={`${target}/orderDetail?id=${record.orderId}`}
>
{text}
</EyePreview>
......
......@@ -35,13 +35,21 @@ const Score = React.lazy(() => import('../../../components/Score'));
const OuterCirculationRecord = React.lazy(() => import('../../../components/OuterCirculationRecord'));
interface DetailInfoProps {
// 记录id
/**
* 记录id
*/
id: string;
// 是否是编辑的
/**
* 是否是编辑的
*/
isEdit?: boolean;
// 历史记录目标路径
target?: string;
// 头部右侧拓展
/**
* 历史记录目标路径
*/
target: string;
/**
* 头部右侧拓展
*/
headExtra?: React.ReactNode;
};
......@@ -66,7 +74,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,7 +8,7 @@ const RepairPrFinishedDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairApplication/repairPrFinished"
/>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 17:21:54
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-10 15:08:07
* @LastEditTime: 2021-01-08 13:53:48
* @Description: 确认售后完成
*/
import React, { useState } from 'react';
......@@ -40,7 +40,7 @@ const RepairPrFinishedDetailVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairApplication/repairPrFinished"
headExtra={(
<Button
type="primary"
......
......@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
import { Button, Card, Spin, Badge, message } from 'antd';
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';
......@@ -47,7 +47,9 @@ interface DetailInfo {
interface BillsFormProps {
id?: string;
// 是否是编辑的
/**
* 是否是编辑的
*/
isEdit?: boolean;
/**
* 订单id,从订单列表跳转过来的
......@@ -55,6 +57,18 @@ interface BillsFormProps {
orderId?: number,
};
interface OrderNoProps {
value: any,
}
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/repairApplication/repairPrSubmit/orderDetail?orderNo=${value}`}>{value}</Link>
)
};
OrderNo.isFieldComponent = true;
const RepairForm: React.FC<BillsFormProps> = ({
id,
isEdit = false,
......@@ -418,6 +432,7 @@ const RepairForm: 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,7 +8,7 @@ const RepairQueryDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairApplication/repairQuery"
isEdit
/>
);
......
......@@ -46,7 +46,7 @@ interface DetailInfoProps {
/**
* 历史记录目标路径
*/
target?: string;
target: string;
/**
* 头部右侧拓展
*/
......@@ -74,7 +74,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,7 +8,7 @@ const RepairPr1Detail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPr1"
/>
);
};
......
......@@ -40,7 +40,7 @@ const RepairPr1Verify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPr1"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,7 +8,7 @@ const RepairPr2Detail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPr2"
/>
);
};
......
......@@ -40,7 +40,7 @@ const RepairPr2Verify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPr2"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,7 +8,7 @@ const RepairPrConfirmDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPrConfirm"
/>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-07 18:49:57
* @LastEditTime: 2021-01-08 13:55:36
* @Description:
*/
import React, { useState } from 'react';
......@@ -49,7 +49,7 @@ const RepairPrConfirmVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPrConfirm"
headExtra={(info) => (
<Button
type="primary"
......
......@@ -8,7 +8,7 @@ const RepairPrSubmitDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPrSubmit"
/>
);
};
......
......@@ -40,7 +40,7 @@ const RepairPrSubmitVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairPrSubmit"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,7 +8,7 @@ const RepairQueryDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/repairManage/repairQuery"
/>
);
};
......
......@@ -70,7 +70,7 @@ interface OrderNoProps {
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/returnApplication/returnPrSubmit?orderNo=${value}`}>{value}</Link>
<Link to={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?orderNo=${value}`}>{value}</Link>
)
};
OrderNo.isFieldComponent = true;
......
......@@ -51,13 +51,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, returnAddress: ReturnAddressValues) => React.ReactNode;
};
......@@ -127,7 +135,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 ReturnPr1Detail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPr1"
/>
);
};
......
......@@ -40,7 +40,7 @@ const ReturnPr1Verify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/returnManage/returnPr1"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,6 +8,7 @@ const ReturnPr2Detail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPr2"
/>
);
};
......
......@@ -40,7 +40,7 @@ const ReturnPr2Verify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/returnManage/returnPr2"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,6 +8,7 @@ const ReturnPrAddDeliverDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPrAddWarehousing"
/>
);
};
......
......@@ -8,6 +8,7 @@ const ReturnPrConfirmDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPrConfirm"
/>
);
};
......
......@@ -49,7 +49,7 @@ const ReturnPrConfirmVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/returnManage/returnPrConfirm"
headExtra={(info) => (
<Button
type="primary"
......
......@@ -8,6 +8,7 @@ const ReturnPrReceivedDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPrReceived"
/>
);
};
......
......@@ -74,6 +74,7 @@ const ReturnPrReceivedVerify: React.FC = () => {
</>
)
}}
target="/memberCenter/afterService/returnManage/returnPrReceived"
/>
</>
......
......@@ -8,6 +8,7 @@ const ReturnPrReturnDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPrReturn"
/>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-10 18:28:29
* @LastEditTime: 2021-01-08 14:03:31
* @Description:
*/
import React, { useState } from 'react';
......@@ -38,7 +38,7 @@ const ReturnPrReturnVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/returnManage/returnPrReturn"
headExtra={() => (
<Button
type="primary"
......
......@@ -8,6 +8,7 @@ const ReturnPrSubmitDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/returnPrSubmit"
/>
);
};
......
......@@ -81,7 +81,7 @@ const ReturnPrSubmitVerify: React.FC = () => {
<>
<DetailInfo
id={id}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
target="/memberCenter/afterService/returnManage/returnPrSubmit"
headExtra={(info, returnAddress) => (
<Button
type="primary"
......
......@@ -8,6 +8,7 @@ const ReturnQueryDetail: React.FC = () => {
return (
<DetailInfo
id={id}
target="/memberCenter/afterService/returnManage/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