Commit 06093497 authored by 李腾's avatar 李腾

feat: 修改查看物流

parent 8e038f49
......@@ -113,67 +113,72 @@ const TableList = props => {
const renderContent = (record, key) => {
if (record.mchOrderSkuVoList) {
return record?.mchOrderSkuVoList.map((item, index) => (
<div
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>
) : (
''
)}
return record?.mchOrderSkuVoList.map((item, index) => {
const tableContentHeight = item?.expressList?.length || 1;
{key === 'deliveryNo' ? (
<div className="expressList">
{item.expressList?.map((info, idx) => (
<a
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);
}}
>
查看物流1
</Button>
) : (
item[key]
)}
</div>
));
return (
<div
// eslint-disable-next-line prefer-template
style={{ height: tableContentHeight * 60 + 'px' }}
className={[
'tableContent',
index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
].join(' ')}
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' ? (
<div className="expressList">
{item.expressList?.map((info, idx) => (
<a
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 '';
};
......
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