Commit 06093497 authored by 李腾's avatar 李腾

feat: 修改查看物流

parent 8e038f49
...@@ -113,67 +113,72 @@ const TableList = props => { ...@@ -113,67 +113,72 @@ const TableList = props => {
const renderContent = (record, key) => { const renderContent = (record, key) => {
if (record.mchOrderSkuVoList) { if (record.mchOrderSkuVoList) {
return record?.mchOrderSkuVoList.map((item, index) => ( return record?.mchOrderSkuVoList.map((item, index) => {
<div const tableContentHeight = item?.expressList?.length || 1;
className={[
'tableContent',
index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
].join(' ')}
// style={{ height: `${(item.expressList?.length || 1) * 60}px` }}
key={item.orderSkuId}
>
{key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''}
{key === 'expressCompanyName' ? (
<div className="expressList">
{item.expressList?.map((info, idx) => (
<span
className={[
'subContent',
idx < item.expressList?.length - 1 ? 'border' : null,
].join(' ')}
>
{info.expressCompanyName}
</span>
))}
</div>
) : (
''
)}
{key === 'deliveryNo' ? ( return (
<div className="expressList"> <div
{item.expressList?.map((info, idx) => ( // eslint-disable-next-line prefer-template
<a style={{ height: tableContentHeight * 60 + 'px' }}
onClick={() => { className={[
handleCom(item, info); 'tableContent',
}} index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
className={[ ].join(' ')}
'subContent', key={item.orderSkuId}
idx < item.expressList?.length - 1 ? 'border' : null, >
].join(' ')} {key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''}
> {key === 'expressCompanyName' ? (
{info.expressNo} <div className="expressList">
</a> {item.expressList?.map((info, idx) => (
))} <span
</div> className={[
) : ( 'subContent',
'' idx < item.expressList?.length - 1 ? 'border' : null,
)} ].join(' ')}
{key === 'action' && props.type === 2 ? ( >
<Button {info.expressCompanyName}
size="small" </span>
type="primary" ))}
onClick={() => { </div>
handleCom(record, item); ) : (
}} ''
> )}
查看物流1
</Button> {key === 'deliveryNo' ? (
) : ( <div className="expressList">
item[key] {item.expressList?.map((info, idx) => (
)} <a
</div> onClick={() => {
)); handleCom(item, info);
}}
className={[
'subContent',
idx < item.expressList?.length - 1 ? 'border' : null,
].join(' ')}
>
{info.expressNo}
</a>
))}
</div>
) : (
''
)}
{key === 'action' && props.type === 2 ? (
<Button
size="small"
type="primary"
onClick={() => {
handleCom(record, item);
}}
>
查看物流
</Button>
) : (
item[key]
)}
</div>
);
});
} }
return ''; return '';
}; };
......
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