Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
max_android_panel
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xin
max_android_panel
Commits
d9cdc364
Commit
d9cdc364
authored
Sep 26, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加补货完成按钮在扫码页面
parent
748ca8b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
9 deletions
+61
-9
client/actions/replenish.js
+6
-4
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
+47
-1
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
+3
-3
client/containers/PageContainer/PageContainer.jsx
+5
-1
No files found.
client/actions/replenish.js
View file @
d9cdc364
...
@@ -23,16 +23,18 @@ const emptyErrorInfo = ()=>{
...
@@ -23,16 +23,18 @@ const emptyErrorInfo = ()=>{
}
}
}
}
const
finishReplenish
=
(
info
)
=>
{
const
finishReplenish
=
(
info
,
source
)
=>
{
//source 1 : 商品页 , 2 : 扫码页
//已放入回收箱
//已放入回收箱
let
{
userInfo
,
taskInfo
,
storeInfo
}
=
info
;
let
{
userInfo
,
taskInfo
,
storeInfo
,
taskList
}
=
info
;
let
bodyData
=
Object
.
assign
({},{
let
bodyData
=
Object
.
assign
({},{
storeId
:
storeInfo
.
id
,
storeId
:
storeInfo
.
id
,
taskId
:
taskInfo
.
taskId
,
taskId
:
taskInfo
.
taskId
,
userId
:
userInfo
.
id
,
userId
:
userInfo
.
id
,
taskType
:
taskInfo
.
currentTaskType
,
taskType
:
taskInfo
.
currentTaskType
,
area
:
taskInfo
.
area
area
:
taskInfo
.
area
,
})
id
:
source
===
1
?
taskList
.
workListId
:
0
,
});
let
url
=
`
${
domain
}
machine_pad/trigger_ck_task_sku.action`
let
url
=
`
${
domain
}
machine_pad/trigger_ck_task_sku.action`
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
url
,{
fetch
(
url
,{
...
...
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
View file @
d9cdc364
...
@@ -18,10 +18,13 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -18,10 +18,13 @@ export default class ReplenishScanPage extends React.Component{
this
.
getScanDom
=
this
.
getScanDom
.
bind
(
this
);
this
.
getScanDom
=
this
.
getScanDom
.
bind
(
this
);
this
.
hidePop
=
this
.
hidePop
.
bind
(
this
);
this
.
hidePop
=
this
.
hidePop
.
bind
(
this
);
this
.
showErrorInfo
=
this
.
showErrorInfo
.
bind
(
this
);
this
.
showErrorInfo
=
this
.
showErrorInfo
.
bind
(
this
);
this
.
handleScanOver
=
this
.
handleScanOver
.
bind
(
this
);
this
.
scanOver
=
this
.
scanOver
.
bind
(
this
);
this
.
state
=
{
this
.
state
=
{
barcodeText
:
''
,
barcodeText
:
''
,
barcodeErrorText
:
''
,
barcodeErrorText
:
''
,
showInput
:
false
showInput
:
false
,
btnClock
:
false
}
}
}
}
...
@@ -32,6 +35,13 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -32,6 +35,13 @@ export default class ReplenishScanPage extends React.Component{
)
||
(
JSON
.
stringify
(
nextState
)
!==
JSON
.
stringify
(
this
.
state
)))
)
||
(
JSON
.
stringify
(
nextState
)
!==
JSON
.
stringify
(
this
.
state
)))
}
}
componentWillUnmount
(){
console
.
log
(
"ReplenishScanPage componentWillUnmount"
)
this
.
setState
({
btnClock
:
false
})
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
console
.
log
(
"ReplenishScanPage componentWillReceiveProps "
,
nextProps
);
console
.
log
(
"ReplenishScanPage componentWillReceiveProps "
,
nextProps
);
...
@@ -115,9 +125,45 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -115,9 +125,45 @@ export default class ReplenishScanPage extends React.Component{
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
this
.
goBack
.
bind
(
this
)(
1
)
}
/>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
this
.
goBack
.
bind
(
this
)(
1
)
}
/>
<
span
className=
{
"middle"
}
>
任务目标:将
{
taskInfo
.
area
||
""
}
区补货箱中的货品扫码后放到货架上
</
span
>
<
span
className=
{
"middle"
}
>
任务目标:将
{
taskInfo
.
area
||
""
}
区补货箱中的货品扫码后放到货架上
</
span
>
<
Button
btnContainer=
{
"barcodeInputBarcode font32 backff775c colfff"
}
key=
{
"barcodeInputBarcode"
}
style=
{
{
display
:
'inline-block'
}
}
text=
{
"扫描结束"
}
option=
{
this
.
handleScanOver
}
/>
</
div
>
</
div
>
}
}
handleScanOver
(){
console
.
log
(
"扫描结束"
);
//货道商品不符
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn1 font32"
}
key=
{
"replenishHandleScanOverBtn1"
}
text=
{
"继续扫描"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn2 backff775c colfff font32"
}
key=
{
"replenishHandleScanOverBtn2"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
scanOver
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"补货结束确认"
}
classContainer=
{
"replenishPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-exclamation font150 colf5a623"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
请仔细确认是否所有待补货品都已经扫描完毕
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
{
btnDom2
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
//确认扫描完毕
scanOver
(){
console
.
log
(
"确认扫描完毕 "
,
this
.
state
.
btnClock
)
let
props
=
this
.
props
;
if
(
!
this
.
state
.
btnClock
){
this
.
setState
({
btnClock
:
true
},()
=>
{
props
.
hidePopup
()
props
.
finishReplenish
(
2
);
})
}
}
handleInputChange
(
e
){
handleInputChange
(
e
){
this
.
setState
({
this
.
setState
({
barcodeText
:
e
.
target
.
value
barcodeText
:
e
.
target
.
value
...
...
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
View file @
d9cdc364
...
@@ -81,8 +81,8 @@ export default class ReplenishSkuPage extends React.Component{
...
@@ -81,8 +81,8 @@ export default class ReplenishSkuPage extends React.Component{
handleScanOver
(){
handleScanOver
(){
console
.
log
(
"扫描结束"
)
console
.
log
(
"扫描结束"
)
//货道商品不符
//货道商品不符
let
{
showPopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn1 font32"
}
key=
{
"replenishHandleScanOverBtn1"
}
text=
{
"继续扫描"
}
option=
{
this
.
continueScan
}
/>
let
btnDom1
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn1 font32"
}
key=
{
"replenishHandleScanOverBtn1"
}
text=
{
"继续扫描"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn2 backff775c colfff font32"
}
key=
{
"replenishHandleScanOverBtn2"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
scanOver
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn2 backff775c colfff font32"
}
key=
{
"replenishHandleScanOverBtn2"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
scanOver
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"补货结束确认"
}
classContainer=
{
"replenishPopInfo"
}
>
<
PopModel
popupTitle=
{
"补货结束确认"
}
classContainer=
{
"replenishPopInfo"
}
>
...
@@ -106,7 +106,7 @@ export default class ReplenishSkuPage extends React.Component{
...
@@ -106,7 +106,7 @@ export default class ReplenishSkuPage extends React.Component{
btnClock
:
true
btnClock
:
true
},()
=>
{
},()
=>
{
props
.
hidePopup
()
props
.
hidePopup
()
props
.
finishReplenish
();
props
.
finishReplenish
(
1
);
})
})
}
}
}
}
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
d9cdc364
...
@@ -228,6 +228,7 @@ class PageContainer extends React.Component {
...
@@ -228,6 +228,7 @@ class PageContainer extends React.Component {
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
break
;
case
'CK'
:
case
'CK'
:
case
'CR'
:
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
break
;
case
'RE'
:
case
'RE'
:
...
@@ -236,6 +237,9 @@ class PageContainer extends React.Component {
...
@@ -236,6 +237,9 @@ class PageContainer extends React.Component {
case
'ADDR'
:
case
'ADDR'
:
this
.
changePages
(
CONFIG
.
showPage
[
11
]);
this
.
changePages
(
CONFIG
.
showPage
[
11
]);
break
;
break
;
case
'PF'
:
this
.
changePages
(
CONFIG
.
showPage
[
initPage
]);
break
;
}
}
}
}
...
@@ -638,7 +642,7 @@ class PageContainer extends React.Component {
...
@@ -638,7 +642,7 @@ class PageContainer extends React.Component {
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
emptyErrorInfo=
{
()
=>
dispatch
(
replenishAction
.
emptyErrorInfo
())
}
emptyErrorInfo=
{
()
=>
dispatch
(
replenishAction
.
emptyErrorInfo
())
}
uploadError=
{
(
exceptionType
)
=>
dispatch
(
uploadError
(
state
.
commonInfo
,
exceptionType
))
}
uploadError=
{
(
exceptionType
)
=>
dispatch
(
uploadError
(
state
.
commonInfo
,
exceptionType
))
}
finishReplenish=
{
(
)
=>
dispatch
(
replenishAction
.
finishReplenish
(
state
.
commonInfo
))
}
finishReplenish=
{
(
source
)
=>
dispatch
(
replenishAction
.
finishReplenish
(
state
.
commonInfo
,
source
))
}
/>
/>
/*以下是二期页面 end*/
/*以下是二期页面 end*/
}
}
...
...
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