Commit c79bb11f authored by 李腾's avatar 李腾

feat: 多物流发货新增包裹编号

parent f827a749
import React, { useState, forwardRef, useImperativeHandle, useEffect } from 'react'; import React, { useState, forwardRef, useImperativeHandle, useEffect } from 'react';
import { Modal, Timeline, notification, Spin } from 'antd'; import { Modal, Timeline, notification, Spin, Collapse } from 'antd';
import { getLogisticsRecord, apiDeliveriesTraceList } from '../services'; import { getLogisticsRecord, apiDeliveriesTraceList } from '../services';
import styles from '../index.less'; import styles from '../index.less';
const { Panel } = Collapse;
const LogisticsRecordModal = (props, ref) => { const LogisticsRecordModal = (props, ref) => {
// const { } = props; // const { } = props;
...@@ -84,6 +86,39 @@ const LogisticsRecordModal = (props, ref) => { ...@@ -84,6 +86,39 @@ const LogisticsRecordModal = (props, ref) => {
) : ( ) : (
<div style={emptyStyle}>暂无物流信息</div> <div style={emptyStyle}>暂无物流信息</div>
)} )}
{/* 折叠 */}
{/* <Collapse defaultActiveKey={['0']} ghost >
{dataList.length ? (
dataList.map((dataItem, dataIndex) => (
<Panel showArrow={false} header={<div className={styles['logistics-record__topbar']}>包裹{dataIndex + 1}</div>} key={dataIndex.toString()}>
<div className={styles['logistics-record']}>
<div className={styles['logistics-record__head']}>
<span className={styles.name}>物流公司:{dataItem.expressCompanyName}</span>
<span className={styles.no}>物流单号:{dataItem.expressNo}</span>
</div>
{dataItem.traceList.map(traceItem => (
<Timeline>
{traceItem?.detailList.length ? (
traceItem?.detailList?.map((item, index) => (
<Timeline.Item color={index > 0 ? 'gray' : 'blue'} key={index.toString()}>
<p>{item.desc}</p>
<p>{item.time}</p>
</Timeline.Item>
))
) : (
<div style={emptyStyle}>暂无物流信息</div>
)}
</Timeline>
))}
</div>
</Panel>
))
) : (
<div style={emptyStyle}>暂无物流信息</div>
)}
</Collapse> */}
</Spin> </Spin>
</Modal> </Modal>
); );
......
...@@ -129,6 +129,7 @@ const FormComponent = (props, ref) => { ...@@ -129,6 +129,7 @@ const FormComponent = (props, ref) => {
<> <>
{fields.map((field, index) => ( {fields.map((field, index) => (
<div key={field.key} className={styles['sku-list-module']}> <div key={field.key} className={styles['sku-list-module']}>
<div className={styles['sku-list-module__index']}>包裹 {index + 1}</div>
<Form.List name={[field.name, 'skuInfoList']} rules={formRules.skuInfoList}> <Form.List name={[field.name, 'skuInfoList']} rules={formRules.skuInfoList}>
{(skuFields, actions, { errors: err }) => ( {(skuFields, actions, { errors: err }) => (
<SkuFormList <SkuFormList
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
margin-bottom: 20px; margin-bottom: 20px;
padding: 10px 20px; padding: 10px 20px;
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
&__index {
margin-bottom: 5px;
font-weight: 700;
font-size: 14px;
}
} }
.sku-list-box { .sku-list-box {
......
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