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

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

parent d577d824
.fontGray { .fontGray {
font-size: 12px; font-size: 12px;
color: #909399; color: #909399;
margin-bottom: 10px; margin-bottom: 10px;
} }
.bignumber { .bignumber {
font-size: 24px; font-size: 24px;
color: #303133; color: #303133;
margin-bottom: 10px; margin-bottom: 10px;
} }
.smallnumber { .smallnumber {
font-size: 14px; font-size: 14px;
color: #303133; color: #303133;
line-height: 24px; line-height: 24px;
} }
\ No newline at end of file
.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,24 +58,53 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -50,24 +58,53 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
} }
return ( return (
<MellowCard style={{marginTop: 24}} bordered={false}> <Row gutter={24} style={{marginTop: 24}}>
<Tabs defaultActiveKey='1' onChange={onChange}> <Col span={processEnum === 24 ? 12 : 24}>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}> <MellowCard bordered={false} fullHeight>
<Row> {/* <Row gutter={24}> */}
<Col className={style.fontGray} span={4}>支付环节: </Col> <Tabs defaultActiveKey='1' onChange={onChange}>
<Col>{v.payNode}</Col> { data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col>
</Row>
</TabPane>) }
</Tabs>
{/* </Row> */}
</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>
<Row> <Row className={style['card-list']}>
<Col className={style.fontGray} span={4}>支付方式: </Col> <Col span={6}><p>发货时间: </p></Col>
<Col>{payTextList[v.payWay]}</Col> <Col><p>{moment(data.deliverTime).format('YYYY-MM-DD')}</p></Col>
</Row> </Row>
<Row> <Row className={style['card-list']}>
<Col className={style.fontGray} span={4}>支付渠道: </Col> <Col span={6}><p>物流单号: </p></Col>
<Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col> <Col><p><a href={`https://www.kuaidi100.com/chaxun?nu=${data.deliverNo}`} target="_blank">{data.deliverNo}</a></p></Col>
</Row> </Row>
</TabPane>) } <Row className={style['card-list']}>
</Tabs> <Col span={6}><p>物流公司: </p></Col>
</MellowCard> <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