Commit e68d4405 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理订单详情无法显示物流方式/隐藏无数据的流转记录

parent 1a4cd9d1
......@@ -13,6 +13,7 @@ import { SALE_ORDER_STATUS } from '../../constant'
import { usePageStatus } from '@/hooks/usePageStatus'
import ModalTable from '@/components/ModalTable'
import { formatTimeString } from '@/utils'
import { DELIVERY_TYPE } from '@/constants'
export interface OrderProductTableProps {}
......@@ -388,7 +389,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
dataIndex: 'logistics',
align: 'center',
key: 'logistics',
render: text => (text && text.render) || ''
render: (text) => text && text.deliveryType && DELIVERY_TYPE[text.deliveryType]
},
{
title: '仓位库存扣减记录',
......
......@@ -106,26 +106,35 @@ const OrderTransformRecord:React.FC<OrderTransformRecordProps> = (props) => {
const { data } = useContext(OrderDetailContext)
const { externalProcurementOrderLogResponses, interiorProcurementOrderLogResponses } = data
return (
<MellowCard style={{marginTop: 24}} bordered={false}>
<Tabs defaultActiveKey="1" animated={false}>
<Tabs.TabPane tab='外部订单流转记录' key="1">
<Table
columns={outOrderCols}
dataSource={externalProcurementOrderLogResponses}
pagination={false}
rowKey="id"
/>
</Tabs.TabPane>
<Tabs.TabPane tab='内部订单流转记录' key="2">
<Table
columns={sideOrderCols}
dataSource={interiorProcurementOrderLogResponses}
pagination={false}
rowKey="id"
/>
</Tabs.TabPane>
</Tabs>
</MellowCard>
<>
{
(externalProcurementOrderLogResponses?.length>0 || interiorProcurementOrderLogResponses?.length>0) &&
<MellowCard style={{marginTop: 24}} bordered={false}>
<Tabs defaultActiveKey="1" animated={false}>
{
externalProcurementOrderLogResponses?.length>0 && <Tabs.TabPane tab='外部订单流转记录' key="1">
<Table
columns={outOrderCols}
dataSource={externalProcurementOrderLogResponses}
pagination={false}
rowKey="id"
/>
</Tabs.TabPane>
}
{
interiorProcurementOrderLogResponses?.length>0 && <Tabs.TabPane tab='内部订单流转记录' key="2">
<Table
columns={sideOrderCols}
dataSource={interiorProcurementOrderLogResponses}
pagination={false}
rowKey="id"
/>
</Tabs.TabPane>
}
</Tabs>
</MellowCard>
}
</>
)
}
......
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