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
001b6ec7
Commit
001b6ec7
authored
Dec 08, 2020
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
eb7aa7f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
+17
-23
LogisticsForm.jsx
...rManage/pendingDeliveryOrder/components/LogisticsForm.jsx
+2
-2
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+13
-17
service.js
src/pages/orderManage/pendingDeliveryOrder/service.js
+2
-4
No files found.
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsForm.jsx
View file @
001b6ec7
...
...
@@ -41,12 +41,12 @@ const LogisticsForm = props => {
orderSkuIds
=
[...
orderSkuIds
,
...
data
.
selectedGoods
];
});
if
(
orderSkuIds
.
length
!==
Array
.
from
(
new
Set
(
orderSkuIds
)).
length
)
{
notification
.
open
({
message
:
'
商品选择重复!
'
});
notification
.
error
({
message
:
'
商品选择重复!
'
});
return
;
}
if
(
skuList
.
length
!==
orderSkuIds
.
length
)
{
notification
.
open
({
message
:
'
该订单下的所有商品必须设置物流信息!
'
});
notification
.
error
({
message
:
'
该订单下的所有商品必须设置物流信息!
'
});
return
;
}
await
updateExpress
(
resultData
);
...
...
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
001b6ec7
import
{
Button
,
Upload
,
message
}
from
'
antd
'
;
import
{
Button
,
Upload
,
notification
}
from
'
antd
'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
...
...
@@ -66,6 +66,7 @@ const TableList = props => {
dataIndex
:
'
orderStatus
'
,
key
:
'
orderStatus
'
,
width
:
200
,
hideInSearch
:
true
,
valueEnum
:
{
12
:
'
待发货
'
,
13
:
'
待收货
'
,
...
...
@@ -104,14 +105,12 @@ const TableList = props => {
const
skuListData
=
await
getGoods
(
record
.
orderId
);
let
logisticsData
=
[{}];
setSkuList
(
skuListData
);
if
(
props
.
type
===
2
)
{
const
data
=
await
getLogistics
(
record
.
orderId
);
logisticsData
=
data
.
map
(
item
=>
({
selectedGoods
:
item
.
skus
.
map
(
sku
=>
sku
.
orderSkuId
),
selectedCompany
:
`${item.expressCompanyCode}-${item.expressCompanyName}`
,
orderNum
:
item
.
deliveryNo
,
}));
}
const
data
=
await
getLogistics
(
record
.
orderId
);
logisticsData
=
data
.
map
(
item
=>
({
selectedGoods
:
item
.
skus
.
map
(
sku
=>
sku
.
orderSkuId
),
selectedCompany
:
`${item.expressCompanyCode}-${item.expressCompanyName}`
,
orderNum
:
item
.
deliveryNo
,
}));
setLogisticsData
(
logisticsData
);
handleModalVisible
(
true
);
}
}
...
...
@@ -158,17 +157,13 @@ const TableList = props => {
const
uploadProps
=
{
name
:
'
file
'
,
customRequest
(
info
)
{
uploadFile
(
info
.
file
);
const
result
=
uploadFile
(
info
.
file
);
if
(
result
)
{
notification
.
success
({
message
:
'
导入成功
'
});
}
},
accept
:
'
.xlsx
'
,
showUploadList
:
false
,
onChange
(
info
)
{
if
(
info
.
file
.
status
===
'
done
'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
导入成功`
);
}
else
if
(
info
.
file
.
status
===
'
error
'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
导入失败`
);
}
},
};
const
queryToSendFn
=
params
=>
{
...
...
@@ -216,6 +211,7 @@ const TableList = props => {
onClick=
{
()
=>
{
// eslint-disable-next-line no-unused-expressions
form
?.
resetFields
();
setQueryData
({});
}
}
>
{
resetText
}
...
...
src/pages/orderManage/pendingDeliveryOrder/service.js
View file @
001b6ec7
...
...
@@ -52,13 +52,11 @@ export async function getLogistics(orderId) {
export
async
function
uploadFile
(
file
)
{
const
params
=
new
FormData
();
params
.
append
(
'
file
'
,
file
);
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
,
// headers: {
// 'Content-Type': 'multipart/form-data',
// },
});
return
data
;
}
export
function
downTemplate
()
{
window
.
location
.
href
=
`
${
config
.
kdspApi
}
/api/kdsp/op/mch-order/import-mould-download`
;
...
...
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