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
c7bf956a
Commit
c7bf956a
authored
Aug 22, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加延迟收货
parent
65ffab8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
8 deletions
+123
-8
index.jsx
src/pages/orderManage/batchDelivery/index.jsx
+2
-1
DelayDeliverGoods.jsx
...age/pendingDeliveryOrder/components/DelayDeliverGoods.jsx
+66
-0
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+48
-7
service.js
src/pages/orderManage/pendingDeliveryOrder/service.js
+7
-0
No files found.
src/pages/orderManage/batchDelivery/index.jsx
View file @
c7bf956a
...
...
@@ -11,6 +11,7 @@ import {
const
TableList
=
ref
=>
{
const
actionRef
=
useRef
(
null
);
const
columns
=
[
{
title
:
'
批次号
'
,
...
...
@@ -99,7 +100,7 @@ const TableList = ref => {
<
Button
type=
"primary"
style=
{
{
marginR
ottom
:
'
10px
'
,
marginR
ight
:
'
10px
'
,
}
}
onClick=
{
()
=>
{
downUploadeOrder
({
batchNo
:
record
.
batchNo
,
status
:
0
});
...
...
src/pages/orderManage/pendingDeliveryOrder/components/DelayDeliverGoods.jsx
0 → 100644
View file @
c7bf956a
import
{
Form
}
from
'
@ant-design/compatible
'
;
import
'
@ant-design/compatible/assets/index.css
'
;
import
{
Modal
,
notification
,
Input
}
from
'
antd
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
apiDelayDeliverGoods
}
from
'
../service
'
;
const
UpdateStock
=
props
=>
{
const
{
getFieldDecorator
,
validateFields
,
resetFields
}
=
props
.
form
;
const
valueInfo
=
{};
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
submit
=
async
()
=>
{
validateFields
(
async
(
err
,
{
remark
})
=>
{
if
(
err
)
return
;
setLoading
(
true
);
const
params
=
{
orderIds
:
[
props
.
orderId
],
operationType
:
5
,
remark
,
};
console
.
log
(
'
params :>>
'
,
params
);
const
res
=
await
apiDelayDeliverGoods
(
params
);
if
(
res
?.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
提交成功!
'
});
props
.
onCancel
(
'
success
'
);
resetFields
();
}
setLoading
(
false
);
});
};
const
onCancel
=
()
=>
{
props
.
onCancel
();
resetFields
();
};
const
formItemLayout
=
{
labelCol
:
{
span
:
7
,
},
wrapperCol
:
{
span
:
15
,
},
};
return
(
<
Modal
title=
"延迟发货"
visible=
{
props
.
visible
}
okButtonProps=
{
{
loading
}
}
onCancel=
{
onCancel
}
onOk=
{
submit
}
width=
{
500
}
>
<
Form
{
...
formItemLayout
}
>
<
Form
.
Item
label=
"延迟原因:"
>
{
getFieldDecorator
(
'
remark
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请输入延迟原因!
'
}],
initialValue
:
valueInfo
.
remark
,
})(<
Input
.
TextArea
/>)
}
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
Form
.
create
()(
UpdateStock
);
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
c7bf956a
import
{
Button
,
notification
}
from
'
antd
'
;
import
{
Button
,
notification
,
Modal
}
from
'
antd
'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
...
...
@@ -8,6 +8,7 @@ import LogisticsForm from './components/LogisticsForm';
import
style
from
'
./styles.less
'
;
import
PopoverDom
from
'
./components/PreviewImage
'
;
import
LogisticsCom
from
'
./components/LogisticsCom
'
;
import
DelayDeliverGoods
from
'
./components/DelayDeliverGoods
'
;
import
{
queryToSend
,
queryExpress
,
...
...
@@ -17,6 +18,8 @@ import {
getJDLogisticsInfo
,
}
from
'
./service
'
;
const
{
confirm
}
=
Modal
;
const
TableList
=
props
=>
{
const
dateFormat
=
'
YYYY-MM-DD
'
;
const
[
companys
,
setCompanys
]
=
useState
([]);
...
...
@@ -37,6 +40,9 @@ const TableList = props => {
const
[
orderStatus
,
setorderStatus
]
=
useState
(
1
);
const
[
endTimeStr
,
setEndTimeStr
]
=
useState
(
moment
().
format
(
dateFormat
));
const
[
visibleDelay
,
setVisibleDelay
]
=
useState
(
false
);
const
[
delayOrderIDs
,
setDelayOrderIDs
]
=
useState
(
0
);
// const startDisabledDate = current =>
// current && (endTime.diff(current, 'days') > 30 || endTime.diff(current, 'days') < 0);
// const endDisabledDate = current =>
...
...
@@ -68,6 +74,29 @@ const TableList = props => {
setLogisticsComList
(
tempObj
);
};
const
onDelay
=
(
id
,
state
,
content
)
=>
{
if
(
state
===
1
)
{
confirm
({
title
:
'
提示
'
,
content
,
cancelButtonProps
:
{
style
:
{
display
:
'
none
'
,
},
},
});
}
else
{
setDelayOrderIDs
(
id
);
setVisibleDelay
(
true
);
}
};
const
onCancelDelay
=
e
=>
{
setVisibleDelay
(
false
);
if
(
e
&&
actionRef
.
current
)
{
actionRef
.
current
.
reload
();
}
};
const
renderContent
=
(
record
,
key
)
=>
{
if
(
record
.
mchOrderSkuVoList
)
{
return
record
?.
mchOrderSkuVoList
.
map
((
item
,
index
)
=>
(
...
...
@@ -295,6 +324,12 @@ const TableList = props => {
{
props
.
type
===
2
?
'
更新物流信息
'
:
'
填写物流信息
'
}
</
Button
>
)
}
<
Button
type=
"primary"
onClick=
{
()
=>
onDelay
(
record
.
orderId
,
+
record
.
delayStatus
,
record
.
delayRemark
)
}
>
{
+
record
.
delayStatus
===
1
?
'
已延迟发货
'
:
'
延迟发货
'
}
</
Button
>
</
React
.
Fragment
>
),
},
...
...
@@ -361,12 +396,13 @@ const TableList = props => {
<
Button
type=
"primary"
onClick=
{
()
=>
{
if
(
ref
.
current
)
{
const
obj
=
{
...
ref
.
current
.
getFieldsValue
(),
logisticsStatus
:
props
.
type
||
1
};
obj
.
startTime
=
startTimeStr
;
obj
.
endTime
=
endTimeStr
;
downOrder
(
obj
);
}
// if (ref.current)
{
// const obj =
{
...
ref
.
current
.
getFieldsValue
(),
logisticsStatus
:
props
.
type
||
1
};
// obj.startTime = startTimeStr;
// obj.endTime = endTimeStr;
// downOrder(obj);
//
}
onDelay
(
1
,
0
,
'
速递
'
);
}
}
>
导出数据
...
...
@@ -406,6 +442,11 @@ const TableList = props => {
value=
{
LogisticsComList
}
key=
{
LogisticsComList
.
key
}
/>
<
DelayDeliverGoods
visible=
{
visibleDelay
}
orderId=
{
delayOrderIDs
}
onCancel=
{
e
=>
onCancelDelay
(
e
)
}
/>
</
PageHeaderWrapper
>
);
};
...
...
src/pages/orderManage/pendingDeliveryOrder/service.js
View file @
c7bf956a
...
...
@@ -144,3 +144,10 @@ export async function downUploadeOrder(params) {
};
saveAs
(
blob
,
`批量发货-
${
status
[
params
.
status
]}
-
${
format
(
new
Date
(),
'
yyyyMMddHHmmss
'
)}
.xlsx`
);
}
// 延迟发货
export
function
apiDelayDeliverGoods
(
data
)
{
return
request
.
post
(
'
/api/kdsp/order/operation/record/create
'
,
{
data
,
prefix
:
config
.
kdspApi
,
});
}
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