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

fix: 采购订单详情简单流程添加发货信息区块

parent d577d824
...@@ -15,3 +15,9 @@ ...@@ -15,3 +15,9 @@
color: #303133; color: #303133;
line-height: 24px; line-height: 24px;
} }
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 4px;
}
...@@ -4,6 +4,11 @@ import { Tabs, Row, Col } from 'antd' ...@@ -4,6 +4,11 @@ import { Tabs, Row, Col } from 'antd'
import { OrderDetailContext } from '../../_public/order/context' import { OrderDetailContext } from '../../_public/order/context'
import MellowCard from '@/components/MellowCard' import MellowCard from '@/components/MellowCard'
import StatusColors from '../StatusColors' import StatusColors from '../StatusColors'
import moment from 'moment'
/**
* 展示 支付比例和简单流程的发货信息
*/
export interface OrderPayTabsProps {} export interface OrderPayTabsProps {}
...@@ -35,6 +40,9 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -35,6 +40,9 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
const { data, payList, ctl } = useContext(OrderDetailContext) const { data, payList, ctl } = useContext(OrderDetailContext)
// 简单流程为24
const processEnum = data.processEnum
useEffect(() => { useEffect(() => {
// 过滤支付信息 取第一个待支付的id // 过滤支付信息 取第一个待支付的id
if(data?.paymentInformationResponses?.length) { if(data?.paymentInformationResponses?.length) {
...@@ -50,7 +58,10 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -50,7 +58,10 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
} }
return ( return (
<MellowCard style={{marginTop: 24}} bordered={false}> <Row gutter={24} style={{marginTop: 24}}>
<Col span={processEnum === 24 ? 12 : 24}>
<MellowCard bordered={false} fullHeight>
{/* <Row gutter={24}> */}
<Tabs defaultActiveKey='1' onChange={onChange}> <Tabs defaultActiveKey='1' onChange={onChange}>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}> { data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row> <Row>
...@@ -67,7 +78,33 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -67,7 +78,33 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
</Row> </Row>
</TabPane>) } </TabPane>) }
</Tabs> </Tabs>
{/* </Row> */}
</MellowCard> </MellowCard>
</Col>
{
processEnum === 24 && data &&
<Col span={12}>
<MellowCard title="发货信息" fullHeight>
<Row className={style['card-list']}>
<Col span={6}><p>发货地址: </p></Col>
<Col><p>{data.name}</p></Col>
</Row>
<Row className={style['card-list']}>
<Col span={6}><p>发货时间: </p></Col>
<Col><p>{moment(data.deliverTime).format('YYYY-MM-DD')}</p></Col>
</Row>
<Row className={style['card-list']}>
<Col span={6}><p>物流单号: </p></Col>
<Col><p><a href={`https://www.kuaidi100.com/chaxun?nu=${data.deliverNo}`} target="_blank">{data.deliverNo}</a></p></Col>
</Row>
<Row className={style['card-list']}>
<Col span={6}><p>物流公司: </p></Col>
<Col><p>{data.logisticsCompany}</p></Col>
</Row>
</MellowCard>
</Col>
}
</Row>
) )
} }
......
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