Commit 2d70e070 authored by XieZhiXiong's avatar XieZhiXiong

feat: 修改跳转详情方式

parent 901261ba
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-13 16:58:51
* @LastEditTime: 2021-06-08 14:53:46
* @Description: 换货发货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -20,7 +20,6 @@ import { SummaryData, Detailed } from './interface';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview';
import ButtonSwitch from '@/components/ButtonSwitch';
import DescProgress from '@/components/DescProgress';
import {
......@@ -104,11 +103,12 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${text}`}
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......@@ -177,11 +177,12 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${text}`}
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......
......@@ -22,7 +22,6 @@ import { SummaryData, Detailed } from './interface';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview';
import ButtonSwitch from '@/components/ButtonSwitch';
import DescProgress from '@/components/DescProgress';
import {
......@@ -106,11 +105,12 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${text}`}
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......@@ -179,11 +179,12 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${text}`}
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 16:00:51
* @LastEditTime: 2021-06-08 14:44:38
* @Description: 维修商品抽屉组件
*/
import React from 'react';
......@@ -340,7 +340,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}
const fullData = this.findFullProductArr(childArr, this.flattened);
const filtered = this.filterProductByProcessEnum(fullData);
const filtered = this.filterProduct(fullData);
const filteredKeys = filtered.map(item => item.id);
if (!('checked' in this.props)) {
......@@ -369,7 +369,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}
const fullData = this.findFullProductArr(childArr, this.flattened);
const filtered = this.filterProductByProcessEnum(fullData);
const filtered = this.filterProduct(fullData);
const filteredKeys = filtered.map(item => item.id);
if (!('checked' in this.props)) {
......@@ -400,7 +400,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}
const fullData = this.findFullProductArr(childArr, this.flattened);
const filtered = this.filterProductByProcessEnum(fullData);
const filtered = this.filterProduct(fullData);
const filteredKeys = filtered.map(item => item.id);
if (!('checked' in this.props)) {
......@@ -428,7 +428,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
if (selected) {
// 第二步:父Table选中,子Table全选中,设置子Table 的 SelectedRowKeys
const fullData = this.findFullProductArr(setChildArr, this.flattened);
const filtered = this.filterProductByProcessEnum(fullData);
const filtered = this.filterProduct(fullData);
const filteredKeys = filtered.map(item => item.id);
if (!('checked' in this.props)) {
......@@ -528,22 +528,28 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
};
// 过滤工作流不同的 商品
filterProductByProcessEnum = (data) => {
// 售后退货、换货才涉及工作流相关
if (this.props.afterType !== 2 && this.props.afterType !== 3) {
return data;
}
// 如果是合同订单相关,过滤合同编号不同的数据
filterProduct = (data) => {
const first = data.length ? data[0] : null;
if (!first) {
return [];
}
// 过滤工作流不同的的商品,并且 订单类型不同的订单
const filtered = data.filter(item => item.processEnum === first.processEnum && item.orderType === first.orderType);
if (filtered.length !== data.length) {
message.warning('已过滤掉 售后工作流不同 / 订单类型不同的 商品');
// 过滤合同编号不同的的商品
const filtered1 = data.filter(item => item.contractNo === first.contractNo);
if (filtered1.length !== data.length) {
message.warning('已过滤掉 合同编号不同 商品');
}
// 售后退货、换货才涉及工作流相关
if (this.props.afterType !== 2 && this.props.afterType !== 3) {
return filtered1;
}
// 过滤工作流不同的的商品
const filtered2 = filtered1.filter(item => item.processEnum === first.processEnum);
if (filtered2.length !== filtered1.length) {
message.warning('已过滤掉 售后工作流不同 商品');
}
return filtered;
return filtered2;
};
render() {
......
......@@ -22,7 +22,6 @@ import { SummaryData, Detailed } from './interface';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview';
import ButtonSwitch from '@/components/ButtonSwitch';
import DescProgress from '@/components/DescProgress';
import {
......@@ -106,11 +105,12 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......@@ -179,11 +179,12 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
{
......
......@@ -30,7 +30,6 @@ import {
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
import { EditableColumns } from '@/components/PolymericTable/interface';
import { OuterHistoryData, InnerHistoryData } from '../../../components/FlowRecords';
import {
......@@ -105,11 +104,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
......@@ -78,7 +78,12 @@ interface OrderNoProps {
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/orderDetail?orderNo=${value}`}>{value}</Link>
<a
href={`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/orderDetail?orderNo=${value}`}
target="_blank"
>
{value}
</a>
)
};
OrderNo.isFieldComponent = true;
......@@ -109,7 +114,15 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
{
title: '订单号',
dataIndex: 'orderNo',
align: 'center',
align: 'center',
render: (text) => (
<a
href={`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/orderDetail?orderNo=${text}`}
target="_blank"
        >
{text}
</a>
),
},
{
title: '订单摘要',
......@@ -143,6 +156,14 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
title: '合同编号',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) => (
<a
href={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`}
target="_blank"
        >
{text}
</a>
),
} : null,
].filter(Boolean) as ColumnType<any>[];
......
......@@ -35,7 +35,6 @@ import {
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
import AuditProcess from '@/components/AuditProcess';
import { EditableColumns } from '@/components/PolymericTable/interface';
import { Values as ExchangeAddressValues } from '../../../components/ExchangeAddressInfo';
......@@ -186,11 +185,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
......@@ -10,7 +10,6 @@ import { GetAsRepairGoodsGetDetailByConsumerResponse, GetAsRepairGoodsPageRepair
import { normalizeFiledata, FileData, findLastIndexFlowState, isJSONStr } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
import { EditableColumns } from '@/components/PolymericTable/interface';
import { REPAIR_OUTER_STATUS_FINISHED } from '@/constants/afterService';
import {
......@@ -77,11 +76,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
......@@ -73,7 +73,12 @@ interface OrderNoProps {
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/repairApplication/repairPrSubmit/orderDetail?orderNo=${value}`}>{value}</Link>
<a
href={`/memberCenter/afterService/repairApplication/repairPrSubmit/orderDetail?orderNo=${value}`}
target="_blank"
>
{value}
</a>
)
};
OrderNo.isFieldComponent = true;
......@@ -106,6 +111,14 @@ const RepairForm: React.FC<BillsFormProps> = ({
title: '订单号',
dataIndex: 'orderNo',
align: 'center',
render: (text) => (
<a
href={`/memberCenter/afterService/repairApplication/repairPrSubmit/orderDetail?orderNo=${text}`}
target="_blank"
        >
{text}
</a>
),
},
{
title: '订单摘要',
......@@ -139,6 +152,14 @@ const RepairForm: React.FC<BillsFormProps> = ({
title: '合同编号',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) => (
<a
href={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`}
target="_blank"
        >
{text}
</a>
),
} : null,
].filter(Boolean) as ColumnType<any>[];
......
......@@ -11,7 +11,6 @@ import { normalizeFiledata, FileData, findLastIndexFlowState, isJSONStr } from '
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import AuditProcess from '@/components/AuditProcess';
import EyePreview from '@/components/EyePreview';
import { EditableColumns } from '@/components/PolymericTable/interface';
import { REPAIR_OUTER_STATUS_FINISHED } from '@/constants/afterService';
import {
......@@ -77,11 +76,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
......@@ -31,7 +31,6 @@ import {
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
import { EditableColumns } from '@/components/PolymericTable/interface';
import DescProgress from '@/components/DescProgress';
import ReturnInfoDrawer, { OrderInfo } from '../../../components/ReturnInfoDrawer';
......@@ -134,11 +133,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
......@@ -75,7 +75,12 @@ interface OrderNoProps {
const OrderNo = (props: OrderNoProps) => {
const { value } = props;
return (
<Link to={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?orderNo=${value}`}>{value}</Link>
<a
href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?orderNo=${value}`}
target="_blank"
>
{value}
</a>
)
};
OrderNo.isFieldComponent = true;
......@@ -109,6 +114,14 @@ const ReturnForm: React.FC<BillsFormProps> = ({
title: '订单号',
dataIndex: 'orderNo',
align: 'center',
render: (text) => (
<a
href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?orderNo=${text}`}
target="_blank"
        >
{text}
</a>
),
},
{
title: '订单摘要',
......@@ -142,6 +155,14 @@ const ReturnForm: React.FC<BillsFormProps> = ({
title: '合同编号',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) => (
<a
href={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`}
target="_blank"
        >
{text}
</a>
),
} : null,
].filter(Boolean) as ColumnType<any>[];
......
......@@ -33,7 +33,6 @@ import {
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import StatusTag from '@/components/StatusTag';
import EyePreview from '@/components/EyePreview';
import AuditProcess from '@/components/AuditProcess';
import { EditableColumns } from '@/components/PolymericTable/interface';
import DescProgress from '@/components/DescProgress';
......@@ -160,11 +159,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
<a
href={`${target}/orderDetail?orderNo=${record.orderNo}`}
target="_blank"
>
{text}
</EyePreview>
</a>
),
},
...(
......
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