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

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

parent 3a59f793
......@@ -31,7 +31,7 @@ const LogisticsCom = props => {
// eslint-disable-next-line react/no-array-index-key
<Timeline.Item color={index > 0 ? 'gray' : 'blue'} key={index}>
<p>{item.desc}</p>
<p>{item.logisticsTime}</p>
<p>{item.time}</p>
</Timeline.Item>
))}
</Timeline>
......
......@@ -22,6 +22,7 @@ import {
downOrder,
getJDLogisticsInfo,
apiQueryOrderInfo,
apiDeliveriesTraceList,
} from './service';
const { confirm } = Modal;
......@@ -72,15 +73,23 @@ const TableList = props => {
detailList: [],
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) {
notification.info({ message: '暂无物流信息' });
return;
}
tempObj.expressCompanyName = data?.logisticsName || tempObj.expressCompanyName;
tempObj.deliveryNo = data?.logisticsBillNo || tempObj.deliveryNo;
if (data.logisticsList?.length) {
data.logisticsList.forEach(v => {
tempObj.expressCompanyName = data?.expressCompanyName || tempObj.expressCompanyName;
tempObj.deliveryNo = data?.expressNo || tempObj.deliveryNo;
if (data.traceList?.length) {
data.traceList.forEach(v => {
tempObj.detailList = [...tempObj.detailList, ...v.detailList];
});
}
......
......@@ -212,3 +212,18 @@ export function apiDeliveriesAdd(data) {
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