Commit db81af5e authored by FE-安焕焕's avatar FE-安焕焕 👣

修改问题

parent d0a905f0
......@@ -59,7 +59,7 @@ const LogisticsCom = props => {
return (
<Modal
destroyOnClose
title="企业物流信息"
title="物流信息"
visible={modalVisible}
onCancel={() => onCancel()}
onOk={() => onCancel()}
......
import { Button } from 'antd';
import { Button, notification } from 'antd';
import React, { useState, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
......@@ -43,7 +43,7 @@ const TableList = props => {
const tempObj = {};
// eslint-disable-next-line no-unused-expressions
record?.mchOrderSkuVoList?.forEach(item => {
if (!(item.deliveryNo in tempObj)) {
if (item.deliveryNo && !(item.deliveryNo in tempObj)) {
tempObj[item.deliveryNo] = {
deliveryNo: item.deliveryNo,
expressCompanyCode: item.expressCompanyCode,
......@@ -52,6 +52,10 @@ const TableList = props => {
}
});
const keys = Object.keys(tempObj);
if (!keys.length) {
notification.warning({ message: '暂无物流信息' });
return;
}
const firstObj = tempObj[keys[0]];
const data = await getLogisticsInfo(firstObj?.expressCompanyCode, firstObj?.deliveryNo);
tempObj[keys[0]].detailList = data?.logisticsList?.[0]?.detailList || [];
......
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