Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
8ce355f9
Commit
8ce355f9
authored
Nov 16, 2022
by
李腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改发货订单批量导入api
parent
22623c7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
29 deletions
+76
-29
index.jsx
...ingDeliveryOrder/components/MultiLogisticsModal/index.jsx
+3
-2
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+1
-13
service.js
src/pages/orderManage/pendingDeliveryOrder/service.js
+8
-1
index.jsx
src/pages/orderManage/queryOrder/index.jsx
+64
-13
No files found.
src/pages/orderManage/pendingDeliveryOrder/components/MultiLogisticsModal/index.jsx
View file @
8ce355f9
...
...
@@ -2,7 +2,7 @@ import React, { forwardRef, useImperativeHandle, useState, useRef, useEffect } f
import
{
Modal
,
Select
,
notification
,
Form
,
Input
,
Button
,
Checkbox
}
from
'
antd
'
;
import
{
PlusCircleOutlined
,
MinusCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
userEnabled
,
userDisabled
,
userDelete
}
from
'
@/pages/systemManage/service
'
;
import
{
apiDeliveriesAdd
}
from
'
../../service
'
;
import
{
apiDeliveriesAdd
,
apiDeliveriesEdit
}
from
'
../../service
'
;
import
styles
from
'
./index.less
'
;
const
FormComponent
=
(
props
,
ref
)
=>
{
...
...
@@ -227,6 +227,7 @@ const UpdateStatusModal = (props, ref) => {
};
const
onOk
=
async
()
=>
{
const
submitApi
=
oldPackageList
.
length
===
0
?
apiDeliveriesAdd
:
apiDeliveriesEdit
;
formRef
.
current
.
form
.
validateFields
().
then
(
async
values
=>
{
const
packageList
=
onFilterParams
(
values
.
packageList
);
...
...
@@ -261,7 +262,7 @@ const UpdateStatusModal = (props, ref) => {
};
console
.
log
(
'
params
'
,
params
);
setConfirmLoading
(
true
);
const
res
=
await
apiDeliveriesAdd
(
params
);
const
res
=
await
submitApi
(
params
);
setConfirmLoading
(
false
);
if
(
res
.
code
===
'
0000
'
&&
res
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
...
...
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
8ce355f9
...
...
@@ -172,19 +172,7 @@ const TableList = props => {
)
:
(
''
)
}
{
key
===
'
action
'
&&
props
.
type
===
2
?
(
<
Button
size=
"small"
type=
"primary"
onClick=
{
()
=>
{
handleCom
(
record
,
item
);
}
}
>
查看物流
</
Button
>
)
:
(
item
[
key
]
)
}
{
item
[
key
]
}
</
div
>
);
});
...
...
src/pages/orderManage/pendingDeliveryOrder/service.js
View file @
8ce355f9
...
...
@@ -62,7 +62,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/
merchants/orders/deliveries/batches/
import
'
,
{
data
:
params
,
prefix
:
config
.
kdspApi
,
});
...
...
@@ -213,6 +213,13 @@ export function apiDeliveriesAdd(data) {
});
}
export
function
apiDeliveriesEdit
(
data
)
{
return
request
.
post
(
'
/api/merchants/orders/deliveries/edit
'
,
{
data
,
prefix
:
config
.
kdspApi
,
});
}
/**
* 多物流发货-查询物流轨迹
* @see http://yapi.quantgroups.com/project/389/interface/api/46120
...
...
src/pages/orderManage/queryOrder/index.jsx
View file @
8ce355f9
import
{
Form
,
Tabs
,
Input
,
Button
,
Pagination
}
from
'
antd
'
;
import
{
Form
,
Tabs
,
Input
,
Button
,
Pagination
,
notification
}
from
'
antd
'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
connect
}
from
'
dva
'
;
...
...
@@ -9,10 +9,11 @@ import { CustomTable } from './components/CustomTable/index';
import
{
FormSearch
,
SEARCH_TYPE
}
from
'
./components/FormSearch/index
'
;
import
MultiLogisticsModal
from
'
../pendingDeliveryOrder/components/MultiLogisticsModal
'
;
import
LogisticsCom
from
'
../pendingDeliveryOrder/components/LogisticsCom
'
;
import
DetailModal
from
'
./components/DetailModal/index
'
;
import
{
queryOrderList
,
getGoods
,
getLogistics
,
queryExpress
,
queryToSend
}
from
'
./service
'
;
import
{
apiQueryOrderInfo
}
from
'
../pendingDeliveryOrder/service
'
;
import
{
apiQueryOrderInfo
,
apiDeliveriesTraceList
}
from
'
../pendingDeliveryOrder/service
'
;
import
{
ORDER_SEARCH_TYPE
,
ORDER_TYPE
,
ORDER_STATUS
}
from
'
./const
'
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -27,12 +28,10 @@ const OrderList = props => {
/** @module 发货弹框 */
// 物流公司数据
const
[
companys
,
setCompanys
]
=
useState
([]);
// 物流弹出框展示
const
[
LogisticsModalVisible
,
handleModalVisible
]
=
useState
(
false
);
// 订单下商品列表
const
[
skuList
,
setSkuList
]
=
useState
([]);
// 当前物流数据
const
[
LogisticsData
,
setLogisticsData
]
=
useState
([{}]);
/** @module 查看物流记录 */
const
[
LogisticsComList
,
setLogisticsComList
]
=
useState
({});
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
/** @module 表格区域 */
const
[
tableData
,
setTableData
]
=
useState
([]);
...
...
@@ -98,9 +97,41 @@ const OrderList = props => {
});
}
// 获取物流记录信息
const
handleCom
=
async
(
skuInfo
,
expressInfo
)
=>
{
const
tempObj
=
{
expressCompanyCode
:
expressInfo
?.
expressCompanyCode
??
''
,
expressCompanyName
:
expressInfo
.
expressCompanyName
??
''
,
deliveryNo
:
expressInfo
?.
expressNo
??
''
,
detailList
:
[],
key
:
Date
.
now
(),
};
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
?.
expressCompanyName
||
tempObj
.
expressCompanyName
;
tempObj
.
deliveryNo
=
data
?.
expressNo
||
tempObj
.
deliveryNo
;
if
(
data
.
traceList
?.
length
)
{
data
.
traceList
.
forEach
(
v
=>
{
tempObj
.
detailList
=
[...
tempObj
.
detailList
,
...
v
.
detailList
];
});
}
handleComModalVisible
(
true
);
setLogisticsComList
(
tempObj
);
};
// 重载
const
reload
=
()
=>
{
handleModalVisible
(
false
);
getOrderList
();
};
...
...
@@ -276,12 +307,26 @@ const OrderList = props => {
},
{
title
:
'
配送方式
'
,
dataIndex
:
'
delivery
Type
List
'
,
dataIndex
:
'
delivery
Method
List
'
,
// rowSpanMode: 'auto',
width
:
150
,
render
:
({
value
,
subRecord
})
=>
{
render
:
({
value
,
record
,
subRecord
})
=>
{
console
.
log
(
value
);
return
value
?.
map
(
item
=>
<
p
>
{
item
}
</
p
>);
const
info
=
{
orderNo
:
record
.
orderNoStr
,
};
return
value
?.
map
(
item
=>
(
<
p
>
{
item
.
expressCompanyName
}
/
<
a
onClick=
{
()
=>
{
handleCom
(
info
,
item
);
}
}
>
{
item
.
expressNo
}
</
a
>
</
p
>
));
},
},
{
...
...
@@ -423,8 +468,14 @@ const OrderList = props => {
)
}
</
div
>
<
LogisticsCom
onSubmit=
{
reload
}
onCancel=
{
()
=>
handleComModalVisible
(
false
)
}
modalVisible=
{
LogisticsComModalVisible
}
value=
{
LogisticsComList
}
key=
{
LogisticsComList
.
key
}
/>
<
MultiLogisticsModal
companys=
{
companys
}
ref=
{
multiLogisticsModalRef
}
/>
<
DetailModal
ref=
{
detailModalRef
}
/>
</
PageHeaderWrapper
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment