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
63ed0d3a
Commit
63ed0d3a
authored
6 years ago
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix opendoor commonInfo
parent
43f4fd99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
13 deletions
+37
-13
client/actions/chooseTaskContainer.js
+5
-1
client/containers/HomePageContainer/HomePageContainer.jsx
+21
-7
client/containers/PageContainer/PageContainer.jsx
+9
-3
client/containers/QuestionContainer/QuestionContainer.jsx
+2
-2
No files found.
client/actions/chooseTaskContainer.js
View file @
63ed0d3a
import
fetch
from
'isomorphic-fetch'
import
{
logout
,
getTaskList
}
from
"./common"
;
import
{
logout
,
getTaskList
,
saveCommonInfo
}
from
"./common"
;
let
domain
=
ENV
.
domain
;
// let domain1='http://192.168.10.184:8080/maxbox/web/'
const
willCloseDoor
=
(
data
,
flag
=
false
)
=>
{
...
...
@@ -22,7 +22,11 @@ const willCloseDoor=(data,flag=false)=>{
}).
then
((
response
)
=>
response
.
json
())
.
then
((
json
)
=>
{
if
(
flag
){
//回收箱完成
dispatch
(
getTaskList
(
data
))
}
else
{
//没有问题,完成任务
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{currentTaskType:'FINISH'}})))
}
// dispatch(closeDoorSuccess(data));
})
...
...
This diff is collapsed.
Click to expand it.
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
63ed0d3a
...
...
@@ -9,9 +9,10 @@ export default class HomePageContainer extends React.Component{
constructor
(
props
){
super
(
props
);
this
.
state
=
{
text
:
''
text
:
''
,
closeDoorStatus
:
0
}
this
.
logout
=
this
.
logout
.
bind
(
this
)
this
.
logout
=
this
.
logout
.
bind
(
this
)
;
this
.
showLogoutPopup
=
this
.
showLogoutPopup
.
bind
(
this
)
}
...
...
@@ -38,10 +39,23 @@ export default class HomePageContainer extends React.Component{
}
logout
(){
// let msg={type:'WILL_CLOSEDOOR'};
// sendMsg(JSON.stringify(msg));
// this.props.changeIsSend(true);
this
.
props
.
tempLogout
()
if
(
this
.
state
.
closeDoorStatus
===
0
){
this
.
setState
({
closeDoorStatus
:
1
},()
=>
{
this
.
props
.
willCloseDoor
();
// let msg={type:'WILL_CLOSEDOOR'};
// sendMsg(JSON.stringify(msg));
// this.props.changeIsSend(true);
this
.
props
.
tempLogout
()
})
}
}
componentWillUnmount
(){
this
.
setState
({
closeDoorStatus
:
0
})
}
showLogoutPopup
(){
...
...
@@ -89,7 +103,7 @@ export default class HomePageContainer extends React.Component{
:
null
}
<
div
className=
{
"homeText font42"
}
style=
{
{
marginTop
:
marginTop20
}
}
>
请关门,然后继续完成其他工作
</
div
>
<
Button
text=
{
'
关门'
}
btnContainer=
{
'colfff font30'
}
style=
{
buttonStyle
}
option=
{
this
.
logout
.
bind
(
this
)
}
/>
<
Button
text=
{
this
.
state
.
closeDoorStatus
?
'关门中...'
:
'请点击按钮后
关门'
}
btnContainer=
{
'colfff font30'
}
style=
{
buttonStyle
}
option=
{
this
.
logout
.
bind
(
this
)
}
/>
</
div
>
:
<
div
className=
{
"homeContainer"
}
>
<
img
className=
{
"homeIcon"
}
style=
{
imgStyle
}
src=
{
UTILPATH
.
localImg
.
homePage
}
alt=
""
/>
...
...
This diff is collapsed.
Click to expand it.
client/containers/PageContainer/PageContainer.jsx
View file @
63ed0d3a
...
...
@@ -194,7 +194,7 @@ class PageContainer extends React.Component {
}
if
(
info
.
area
){
//区域信息
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
''
}})))
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
'
OPEN
'
}})))
}
this
.
setState
({
...
...
@@ -270,11 +270,11 @@ class PageContainer extends React.Component {
//补货人员,根据type判断显示页面
let
nextTaskInfo
=
nextCommonInfo
.
taskInfo
||
{};
let
lastCurrentType
=
taskInfo
.
currentTaskType
;
let
lastCurrentType
=
taskInfo
.
currentTaskType
||
''
;
if
(
nextUserInfo
.
taskType
===
"SECOND"
&&
nextTaskInfo
&&
nextTaskInfo
.
currentTaskType
&&
nextTaskInfo
.
currentTaskType
!==
lastCurrentType
nextTaskInfo
.
currentTaskType
!==
lastCurrentType
&&
lastCurrentType
!==
'FINISH'
){
switch
(
nextTaskInfo
.
currentTaskType
)
{
case
'LR'
:
...
...
@@ -299,6 +299,9 @@ class PageContainer extends React.Component {
case
'REA'
:
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
break
;
case
'FINISH'
:
this
.
changePages
(
CONFIG
.
showPage
[
131
]);
break
;
default
:
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
break
;
...
...
@@ -614,6 +617,9 @@ class PageContainer extends React.Component {
case
'REA'
:
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
break
;
case
'FINISH'
:
this
.
changePages
(
CONFIG
.
showPage
[
131
]);
break
;
default
:
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
break
;
...
...
This diff is collapsed.
Click to expand it.
client/containers/QuestionContainer/QuestionContainer.jsx
View file @
63ed0d3a
...
...
@@ -23,11 +23,11 @@ export default class QuestionContainer extends React.Component{
handleNoQuestion
(){
let
{
menuType
=
''
,
changePages
}
=
this
.
props
;
let
{
menuType
=
''
,
changePages
,
willCloseDoor
}
=
this
.
props
;
if
(
menuType
){
this
.
context
.
goBackTask
()
}
else
{
this
.
props
.
willCloseDoor
();
//
willCloseDoor();
changePages
(
CONFIG
.
showPage
[
131
])
}
}
...
...
This diff is collapsed.
Click to expand it.
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