Commit 935d8070 authored by 薛智杰's avatar 薛智杰

Merge branch 'logistics_bug' into 'master'

Logistics bug

See merge request !4
parents 24e3ad17 76cc4503
...@@ -3,8 +3,8 @@ const isProduction = process.env.NODE_ENV === 'production'; ...@@ -3,8 +3,8 @@ const isProduction = process.env.NODE_ENV === 'production';
let envAPi = { let envAPi = {
api: '//backstms-vcc2.liangkebang.net', api: '//backstms-vcc2.liangkebang.net',
// kdspApi: '//yapi.quantgroups.com/mock/351', // kdspApi: '//yapi.quantgroups.com/mock/351',
kdspApi: 'http://192.168.28.172:8042', // kdspApi: 'http://192.168.28.172:8042',
// kdspApi: 'https://kdsp-op-vcc2.liangkebang.net', kdspApi: 'https://kdsp-op-vcc2.liangkebang.net',
}; };
let prodApi = { let prodApi = {
......
import { Button } from 'antd'; import { Button, notification } from 'antd';
import React, { useState, useEffect, useRef } from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
...@@ -13,7 +13,6 @@ import { ...@@ -13,7 +13,6 @@ import {
getGoods, getGoods,
getLogistics, getLogistics,
downOrder, downOrder,
getLogisticsInfo,
getJDLogisticsInfo, getJDLogisticsInfo,
} from './service'; } from './service';
...@@ -36,13 +35,9 @@ const TableList = props => { ...@@ -36,13 +35,9 @@ const TableList = props => {
detailList: [], detailList: [],
key: Date.now(), key: Date.now(),
}; };
const skuSource = record.skuSource?.value ?? null; const data = await getJDLogisticsInfo(skuItem.orderSkuId);
const sourceItem = [2, 5]; // 2:京东企业购;5:京东开普勒;
const isJD = sourceItem.includes(skuSource);
const data = isJD
? await getJDLogisticsInfo(skuItem.orderSkuId)
: await getLogisticsInfo(skuItem?.expressCompanyCode, skuItem?.deliveryNo);
if (!data) { if (!data) {
notification.info({ message: '暂无物流信息' });
return; return;
} }
tempObj.expressCompanyName = data?.logisticsName || tempObj.expressCompanyName; tempObj.expressCompanyName = data?.logisticsName || tempObj.expressCompanyName;
......
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