Commit 22623c7e authored by 李腾's avatar 李腾

feat: 完成已发货订单查看物流记录

parent 3a59f793
...@@ -31,7 +31,7 @@ const LogisticsCom = props => { ...@@ -31,7 +31,7 @@ const LogisticsCom = props => {
// eslint-disable-next-line react/no-array-index-key // eslint-disable-next-line react/no-array-index-key
<Timeline.Item color={index > 0 ? 'gray' : 'blue'} key={index}> <Timeline.Item color={index > 0 ? 'gray' : 'blue'} key={index}>
<p>{item.desc}</p> <p>{item.desc}</p>
<p>{item.logisticsTime}</p> <p>{item.time}</p>
</Timeline.Item> </Timeline.Item>
))} ))}
</Timeline> </Timeline>
......
...@@ -22,6 +22,7 @@ import { ...@@ -22,6 +22,7 @@ import {
downOrder, downOrder,
getJDLogisticsInfo, getJDLogisticsInfo,
apiQueryOrderInfo, apiQueryOrderInfo,
apiDeliveriesTraceList,
} from './service'; } from './service';
const { confirm } = Modal; const { confirm } = Modal;
...@@ -72,15 +73,23 @@ const TableList = props => { ...@@ -72,15 +73,23 @@ const TableList = props => {
detailList: [], detailList: [],
key: Date.now(), key: Date.now(),
}; };
const data = await getJDLogisticsInfo(skuInfo.orderSkuId);
const res = await apiDeliveriesTraceList({
expressCompanyCode: expressInfo.expressCompanyCode,
expressNo: expressInfo.expressNo,
orderNo: skuInfo.orderNo,
});
const data = res.data[0];
console.log(data);
if (!data) { if (!data) {
notification.info({ message: '暂无物流信息' }); notification.info({ message: '暂无物流信息' });
return; return;
} }
tempObj.expressCompanyName = data?.logisticsName || tempObj.expressCompanyName; tempObj.expressCompanyName = data?.expressCompanyName || tempObj.expressCompanyName;
tempObj.deliveryNo = data?.logisticsBillNo || tempObj.deliveryNo; tempObj.deliveryNo = data?.expressNo || tempObj.deliveryNo;
if (data.logisticsList?.length) { if (data.traceList?.length) {
data.logisticsList.forEach(v => { data.traceList.forEach(v => {
tempObj.detailList = [...tempObj.detailList, ...v.detailList]; tempObj.detailList = [...tempObj.detailList, ...v.detailList];
}); });
} }
......
...@@ -212,3 +212,18 @@ export function apiDeliveriesAdd(data) { ...@@ -212,3 +212,18 @@ export function apiDeliveriesAdd(data) {
prefix: config.kdspApi, prefix: config.kdspApi,
}); });
} }
/**
* 多物流发货-查询物流轨迹
* @see http://yapi.quantgroups.com/project/389/interface/api/46120
*/
export function apiDeliveriesTraceList(data) {
return request.post('/api/merchants/deliveries/trace/list', {
data: stringify(data),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
prefix: config.kdspApi,
});
}
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