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

导入提示信息

parent ad6307e9
......@@ -211,10 +211,12 @@ const TableList = props => {
}, []);
const uploadProps = {
name: 'file',
customRequest(info) {
const result = uploadFile(info.file);
if (result) {
async customRequest(info) {
const result = await uploadFile(info.file);
if (result.businessCode === '0000') {
notification.success({ message: '导入成功' });
} else {
notification.error({ message: result.detail });
}
},
accept: '.xlsx',
......
......@@ -54,7 +54,7 @@ export async function getLogistics(orderId) {
export async function uploadFile(file) {
const params = new FormData();
params.append('file', file);
const { data } = await request.post('/api/kdsp/op/mch-order/order-logistics-batch-import', {
const data = await request.post('/api/kdsp/op/mch-order/order-logistics-batch-import', {
data: params,
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