Commit 901d2c6a authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复跳转订单详情链接不正确的问题

parent c5a63823
......@@ -2,12 +2,13 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-25 10:32:49
* @LastEditTime: 2021-01-22 15:41:23
* @Description: 换货发货统计、换货发货明细
*/
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Link } from 'umi';
import { SummaryData, Detailed } from './interface';
import MellowCard from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
......@@ -54,7 +55,7 @@ interface ExchangeDeliverInfoProps {
*/
onConfirmExchangeDeliver?: (id: number) => Promise<any>;
/**
/**
* 确认退货收货
*/
onConfirmExchangeReceive?: (id: number) => Promise<any>;
......@@ -63,6 +64,11 @@ interface ExchangeDeliverInfoProps {
* 换货申请单内部状态
*/
innerStatus: number;
/**
* 订单记录地址
*/
target: string;
};
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
......@@ -73,6 +79,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeDeliver,
onConfirmExchangeReceive,
innerStatus,
target,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -82,7 +89,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -146,7 +153,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -278,12 +285,34 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<Col span={16}>
<Descriptions>
<Descriptions.Item label="换货发货单号">
<a>{item.deliveryNo}</a>
{!isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryId}`}
>
{item.deliveryNo}
</Link>
) : (
item.deliveryNo
)}
</Descriptions.Item>
<Descriptions.Item label="物流单号">
<a>{item.logisticsOrderNo}</a>
<Link
to={`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logisticsId}`}
>
{item.logisticsOrderNo}
</Link>
</Descriptions.Item>
<Descriptions.Item label="换货入库单号">
{isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`}
>
{item.storageNo}
</Link>
) : (
item.storageNo
)}
</Descriptions.Item>
<Descriptions.Item label="换货入库单号">{item.storageNo}</Descriptions.Item>
<Descriptions.Item label="发货时间">{item.deliveryTime}</Descriptions.Item>
<Descriptions.Item label="物流公司">
{item.logisticsName}
......
......@@ -94,6 +94,14 @@ export interface Detailed {
*/
innerStatusName: string
/**
* 物流单Id
*/
logisticsId: number
/**
* 换货入库单号Id
*/
storageId: number
/**
* 发货明细 ,DeliveryGoodsDetailVO
*/
detailList: {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-21 14:38:39
* @LastEditTime: 2021-01-22 15:36:57
* @Description: 换货收货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -67,6 +67,11 @@ interface ExchangeReceivedInfoProps {
* 换货申请单内部状态
*/
innerStatus: number;
/**
* 订单记录地址
*/
target: string;
};
const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
......@@ -77,6 +82,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnDeliver,
onConfirmReturnReceive,
innerStatus,
target,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -86,7 +92,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -150,7 +156,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -289,7 +295,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<Col span={16}>
<Descriptions>
<Descriptions.Item label="退货发货单号">
{!isPurchaser ? (
{isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryId}`}
>
......@@ -307,7 +313,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</Link>
</Descriptions.Item>
<Descriptions.Item label="退货入库单号">
{isPurchaser ? (
{!isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`}
>
......
......@@ -330,6 +330,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
step: item.step,
title: item.taskName,
description: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
......@@ -365,6 +366,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnBack={handleConfirmReturnBack}
isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......@@ -384,6 +386,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmExchangeReceive={handleConfirmExchangeReceive}
isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......
......@@ -418,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []}
onConfirmReturnReceive={handleReceivedConfirmReturnReceive}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......@@ -437,6 +438,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmExchangeDeliver={handleConfirmExchangeDeliver}
onConfirmExchangeBack={handleConfirmExchangeBack}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......
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