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
a0f494bf
Commit
a0f494bf
authored
Nov 15, 2022
by
李腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化多物流发货交互
parent
df6c07b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
index.jsx
...ingDeliveryOrder/components/MultiLogisticsModal/index.jsx
+9
-10
No files found.
src/pages/orderManage/pendingDeliveryOrder/components/MultiLogisticsModal/index.jsx
View file @
a0f494bf
...
...
@@ -177,6 +177,7 @@ const UpdateStatusModal = (props, ref) => {
const
{
companys
}
=
props
;
const
formRef
=
useRef
();
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
renderModal
,
setRenderModal
]
=
useState
(
true
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
[
record
,
setRecord
]
=
useState
();
const
[
oldPackageList
,
setOldPackageList
]
=
useState
();
...
...
@@ -208,6 +209,7 @@ const UpdateStatusModal = (props, ref) => {
};
const
open
=
(
item
,
tableRef
)
=>
{
setRenderModal
(
true
);
setActionRef
(
tableRef
);
setVisible
(
true
);
setOldPackageList
(
JSON
.
parse
(
JSON
.
stringify
(
item
.
packageList
)));
...
...
@@ -216,23 +218,18 @@ const UpdateStatusModal = (props, ref) => {
const
onCancel
=
()
=>
{
formRef
.
current
.
form
.
resetFields
();
setRecord
(
null
);
setConfirmLoading
(
false
);
setVisible
(
false
);
setTimeout
(()
=>
{
setRenderModal
(
false
);
setRecord
(
null
);
},
500
);
};
const
onOk
=
async
()
=>
{
formRef
.
current
.
form
.
validateFields
().
then
(
async
values
=>
{
const
packageList
=
onFilterParams
(
values
.
packageList
);
// oldPackageList.forEach((item, index) => {
// if (JSON.stringify(item) !== JSON.stringify(packageList[index])) {
// packageList[index].preExpressCompanyCode = item.expressCompanyCode;
// packageList[index].preExpressCompanyName = item.expressCompanyName;
// packageList[index].preExpressNo = item.expressNo;
// }
// });
// 对比修改差异
oldPackageList
.
forEach
((
item
,
index
)
=>
{
const
updateAttr
=
()
=>
{
...
...
@@ -263,7 +260,9 @@ const UpdateStatusModal = (props, ref) => {
packageList
,
};
console
.
log
(
'
params
'
,
params
);
setConfirmLoading
(
true
);
const
res
=
await
apiDeliveriesAdd
(
params
);
setConfirmLoading
(
false
);
if
(
res
.
code
===
'
0000
'
&&
res
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
提交成功
'
,
...
...
@@ -287,7 +286,7 @@ const UpdateStatusModal = (props, ref) => {
onOk
,
};
return
visible
?
(
return
renderModal
?
(
<
Modal
{
...
modalProps
}
>
{
record
?
<
FormWarpper
ref=
{
formRef
}
record=
{
record
}
companys=
{
companys
}
/>
:
''
}
</
Modal
>
...
...
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