Commit 1e40806d authored by XieZhiXiong's avatar XieZhiXiong

chore: 处理展示合同订单商品数据相关

parent 1a87eacf
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-22 15:24:13
* @LastEditTime: 2021-09-24 10:39:53
* @Description: 换货发货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -28,6 +28,11 @@ import {
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT,
} from '@/constants/afterService';
import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
ORDER_TYPE_TENDER_CONTRACT,
} from '@/constants/order';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
MAIL_INNER_STATUS_CONFIRMED_DELIVER,
......@@ -93,6 +98,11 @@ interface ExchangeDeliverInfoProps extends MellowCardProps {
* 退货配送方式
*/
deliveryType: number,
/**
* 订单类型
*/
orderType: number,
};
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
......@@ -107,6 +117,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
isEdit = false,
afterType,
deliveryType,
orderType,
...rest
}) => {
const [radioValue, setRadioValue] = useState<('1' | '2')>('2');
......@@ -114,11 +125,16 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
const [submitLoading, setSubmitLoading] = useState(false);
const [currentDetailed, setCurrentDetailed] = useState<Detailed | null>(null);
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
const isMateriel = (
orderType === ORDER_TYPE_INQUIRY_CONTRACT
|| orderType === ORDER_TYPE_BIDDING_CONTRACT
|| orderType === ORDER_TYPE_TENDER_CONTRACT
);
const commonColumns: EditableColumns[] = [
...(
!isMateriel
? [
{
title: '商品ID',
dataIndex: 'productId',
......@@ -139,7 +155,45 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title: '单位',
dataIndex: 'unit',
}
]
: [
{
title: '物料编号',
dataIndex: 'productId',
},
{
title: '物料名称、规格',
dataIndex: 'productName',
render: (text, record) => `${text}${record.type ? '/' + record.type : ''}`,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
{
title: orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
];
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
...commonColumns,
{
title: '换货数量',
dataIndex: 'replaceCount',
......@@ -178,27 +232,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
},
{
title: '商品ID',
dataIndex: 'productId',
},
{
title: '商品名称',
dataIndex: 'productName',
ellipsis: true,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
...commonColumns,
{
title: '换货数量',
dataIndex: 'count',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-22 15:23:49
* @LastEditTime: 2021-09-24 10:28:23
* @Description: 换货退货收货统计、换货退货发货明细
*/
import React, { useState } from 'react';
......@@ -30,6 +30,11 @@ import {
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
} from '@/constants/afterService';
import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
ORDER_TYPE_TENDER_CONTRACT,
} from '@/constants/order';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
......@@ -95,6 +100,11 @@ interface ExchangeReceivedInfoProps extends MellowCardProps {
* 退货配送方式
*/
deliveryType: number,
/**
* 订单类型
*/
orderType: number,
};
const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
......@@ -109,6 +119,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
isEdit = false,
afterType,
deliveryType,
orderType,
...rest
}) => {
const [radioValue, setRadioValue] = useState<('1' | '2')>('2');
......@@ -116,11 +127,16 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
const [submitLoading, setSubmitLoading] = useState(false);
const [currentDetailed, setCurrentDetailed] = useState<Detailed | null>(null);
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
const isMateriel = (
orderType === ORDER_TYPE_INQUIRY_CONTRACT
|| orderType === ORDER_TYPE_BIDDING_CONTRACT
|| orderType === ORDER_TYPE_TENDER_CONTRACT
);
const commonColumns: EditableColumns[] = [
...(
!isMateriel
? [
{
title: '商品ID',
dataIndex: 'productId',
......@@ -141,7 +157,45 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title: '单位',
dataIndex: 'unit',
}
]
: [
{
title: '物料编号',
dataIndex: 'productId',
},
{
title: '物料名称、规格',
dataIndex: 'productName',
render: (text, record) => `${text}${record.type ? '/' + record.type : ''}`,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
{
title: orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
];
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
...commonColumns,
{
title: '换货数量',
dataIndex: 'replaceCount',
......@@ -180,27 +234,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
},
{
title: '商品ID',
dataIndex: 'productId',
},
{
title: '商品名称',
dataIndex: 'productName',
ellipsis: true,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
...commonColumns,
{
title: '换货数量',
dataIndex: 'count',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-27 09:44:08
* @LastEditTime: 2021-09-24 10:27:17
* @Description: 退货收货统计、退货发货明细
*/
import React, { useState } from 'react';
......@@ -30,6 +30,11 @@ import {
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
} from '@/constants/afterService';
import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
ORDER_TYPE_TENDER_CONTRACT,
} from '@/constants/order';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
......@@ -95,6 +100,11 @@ interface ReturnInfoProps extends MellowCardProps {
* 退货配送方式
*/
deliveryType: number,
/**
* 订单类型
*/
orderType: number,
};
const ReturnInfo: React.FC<ReturnInfoProps> = ({
......@@ -109,6 +119,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
isEdit = false,
afterType,
deliveryType,
orderType,
...rest
}) => {
const [radioValue, setRadioValue] = useState<('1' | '2')>('2');
......@@ -116,11 +127,16 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
const [submitLoading, setSubmitLoading] = useState(false);
const [currentDetailed, setCurrentDetailed] = useState<Detailed | null>(null);
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
const isMateriel = (
orderType === ORDER_TYPE_INQUIRY_CONTRACT
|| orderType === ORDER_TYPE_BIDDING_CONTRACT
|| orderType === ORDER_TYPE_TENDER_CONTRACT
);
const commonColumns: EditableColumns[] = [
...(
!isMateriel
? [
{
title: '商品ID',
dataIndex: 'productId',
......@@ -141,7 +157,45 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title: '单位',
dataIndex: 'unit',
}
]
: [
{
title: '物料编号',
dataIndex: 'productId',
},
{
title: '物料名称、规格',
dataIndex: 'productName',
render: (text, record) => `${text}${record.type ? '/' + record.type : ''}`,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
{
title: orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
];
const summaryColumns: EditableColumns[] = [
{
title: '订单号',
dataIndex: 'orderNo',
},
...commonColumns,
{
title: '退货数量',
dataIndex: 'returnCount',
......@@ -180,27 +234,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
title: '订单号',
dataIndex: 'orderNo',
},
{
title: '商品ID',
dataIndex: 'productId',
},
{
title: '商品名称',
dataIndex: 'productName',
ellipsis: true,
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
},
...commonColumns,
{
title: '退货数量',
dataIndex: 'count',
......
......@@ -159,7 +159,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......@@ -533,6 +533,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditRefundDeliver}
afterType={2}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="returnDeliveryGoodsList"
/>
</Suspense>
......@@ -557,6 +558,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditExchangeDeliver}
afterType={2}
deliveryType={detailInfo?.replaceGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="replaceDeliveryGoodsList"
/>
</Suspense>
......
......@@ -217,7 +217,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......@@ -578,6 +578,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditRefundDeliver}
afterType={2}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="returnDeliveryGoodsList"
/>
</Suspense>
......@@ -602,6 +603,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditExchangeDeliver}
afterType={2}
deliveryType={detailInfo?.replaceGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="replaceDeliveryGoodsList"
/>
</Suspense>
......
......@@ -133,7 +133,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......
......@@ -134,7 +134,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......
......@@ -193,7 +193,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......@@ -613,6 +613,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditRefundDeliver}
afterType={3}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="returnDeliveryGoodsList"
/>
</Suspense>
......
......@@ -219,7 +219,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
dataIndex: 'associatedProductId',
render: (text, record) => `${text}/${record.associatedProductName}/${record.associatedType || '无'}/${record.associatedCategory}/${record.associatedBrand}`,
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
},
]
),
......@@ -650,6 +650,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit={isEditRefundDeliver}
afterType={3}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
orderType={detailInfo?.orderType}
id="returnDeliveryGoodsList"
/>
</Suspense>
......
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