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
550d188e
Commit
550d188e
authored
Sep 14, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初步完成扫码开门到后面的逻辑数据
parent
b1ac6330
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
216 additions
and
175 deletions
+216
-175
client/actions/common.js
+57
-59
client/actiontype/common.js
+3
-1
client/components/CommonComponent/HeaderComponent/HeaderComponent.jsx
+14
-14
client/components/CommonComponent/SkuInfoComponent/SkuInfoComponent.jsx
+51
-0
client/components/CommonComponent/SkuInfoComponent/index.css
+28
-0
client/components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage.jsx
+2
-28
client/components/RecoveryComponent/RecoverySecondPage/index.css
+0
-27
client/containers/BreakageContainer/BreakageConatiner.jsx
+3
-3
client/containers/HomePageContainer/HomePageContainer.jsx
+7
-7
client/containers/LeftContainer/LeftContainer.jsx
+1
-1
client/containers/PageContainer/PageContainer.jsx
+13
-12
client/containers/RecoveryContainer/RecoveryContainer.jsx
+3
-1
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
+1
-1
client/reducers/common.js
+33
-21
No files found.
client/actions/common.js
View file @
550d188e
import
fetch
from
'isomorphic-fetch'
;
import
actionType
from
'../actiontype/common'
import
{
saveHeaderInfo
}
from
"./initHeader"
;
import
actionTypes
from
"../actiontype/user"
;
import
{
addErrorInfo
}
from
'./uploadError'
const
domain
=
ENV
.
domain
;
//获取工单
let
myHeaders
=
new
Headers
({
'Access-Control-Allow-Origin'
:
'*'
,
//
'Access-Control-Allow-Origin': '*',
// 'Content-Type': 'text/plain;charset=UTF-8',
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Type'
:
'application/json; charset=UTF-8'
,
});
//测试使用的数据
let
testData
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"whetherType"
:
false
,
"taskId"
:
297
,
"currentTaskName"
:
"遗留上报任务"
,
"currentTaskType"
:
"LR"
,
"currentTaskNum"
:
2
,
"totalTaskNum"
:
3
}
}
let
test
=
'http://192.168.10.128:8080/'
//开始工作
const
getTaskInfo
=
(
data
)
=>
{
// let {employeeId,storeId} = data;
// let url = `${test}web/flat/ready${storeId}/${employeeId}`
let
url
=
`
${
test
}
web/flat/ready/5/2`
;
let
{
userInfo
,
storeInfo
}
=
data
;
return
(
dispatch
)
=>
{
// let taskInfo=testData.data;
// dispatch(startalljob(Object.assign({},{taskInfo})))
if
(
userInfo
&&
userInfo
.
id
&&
storeInfo
&&
storeInfo
.
id
)
{
let
url
=
`
${
ENV
.
domain
}
flat/ready/
${
storeInfo
.
id
}
/
${
userInfo
.
id
}
`
;
fetch
(
url
,{
credentials
:
'include'
,
//
credentials : 'include',
method
:
'GET'
,
mode
:
'cors'
,
headers
:
{
'Content-Type'
:
'application/json'
},
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
let
taskInfo
=
Object
.
assign
({});
console
.
log
(
json
,
'开始工作'
)
if
(
json
.
meta
.
success
&&
json
.
data
){
taskInfo
=
Object
.
assign
({},
json
.
data
)
taskInfo
=
Object
.
assign
({},
json
.
data
);
dispatch
(
getTaskName
(
json
.
data
.
currentTaskNum
))
}
console
.
log
(
taskInfo
)
dispatch
(
startalljob
(
Object
.
assign
({},{
taskInfo
})))
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
})))
}).
catch
(
e
=>
{
console
.
error
(
e
)})
}
else
{
dispatch
(
addErrorInfo
(
"用户或门店不对"
))
}
}
};
...
...
@@ -66,10 +46,10 @@ const getStoreInfo = (storeId)=>{
return
(
dispatch
)
=>
{
let
bodyData
=
{
storeId
};
fetch
(
domain
+
'pad_warehouse/getMachineData.action'
,{
credentials
:
'include'
,
//
credentials : 'include',
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'Content-Type'
:
'application/json'
}
,
headers
:
myHeaders
,
body
:
JSON
.
stringify
(
bodyData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
...
...
@@ -113,7 +93,7 @@ const getUserinfo = (employeeId,storeId)=>{
let
bodyData
=
Object
.
assign
({},{
employeeId
,
storeId
})
return
(
dispatch
)
=>
{
fetch
(
domain
+
'machine_pad/get_alowed_task.action'
,{
credentials
:
'include'
,
//
credentials : 'include',
method
:
'POST'
,
mode
:
'cors'
,
headers
:
myHeaders
,
...
...
@@ -136,38 +116,49 @@ const getUserinfo = (employeeId,storeId)=>{
}
};
// const test = ()=>{
// fetch('http://192.168.10.128:8080/web/flat/work/status/1',{
// credentials : 'include',
// method : 'PUT',
// mode : 'cors',
// headers:myHeaders,
// }).then((response)=>response.json())
// .then(json=>{
// console.log(json)
// }).catch(e=>{console.error(e)})
// }
//test 没有散落货品
const
hasNoSku
=
(
storeInfo
)
=>
{
return
(
dispatch
)
=>
{
let
url
=
`
${
ENV
.
domain
}
/flat/work/status/1`
fetch
(
url
,{
// credentials : 'include',
method
:
'PUT'
,
mode
:
'cors'
,
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
console
.
log
(
json
,
'没有散落货品'
)
dispatch
(
getTaskList
())
})
}
}
//拉取工单
const
getTaskList
=
(
data
)
=>
{
console
.
log
(
'拉取工单'
)
console
.
log
(
data
)
// let storeId = data.id;
let
url
=
`
${
test
}
web/flat/work/list/16`
const
getTaskList
=
(
data
=
{})
=>
{
let
url
=
`
${
ENV
.
domain
}
/flat/work/list/13`
return
(
dispatch
)
=>
{
fetch
(
url
,{
credentials
:
'include'
,
//
credentials : 'include',
method
:
'GET'
,
mode
:
'cors'
,
headers
:
{
'Content-Type'
:
'application/json'
}
}).
then
(
(
reponse
)
=>
response
.
json
())
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
console
.
log
(
json
,
'拉取工单'
)
let
taskList
=
Object
.
assign
({})
let
data
=
Object
.
assign
({});
if
(
json
.
meta
.
success
&&
json
.
data
){
taskList
=
Object
.
assign
({},
json
.
data
)
data
.
taskInfo
=
Object
.
assign
({},
json
.
data
.
flatCommonVo
)
data
.
taskList
=
Object
.
assign
({},
json
.
data
.
skuFlatVo
);
let
childNum
=
0
;
let
currentTaskNum
=
json
.
data
.
flatCommonVo
.
currentTaskNum
;
if
(
currentTaskNum
===
3
){
//回收
childNum
=
json
.
data
.
skuFlatVo
.
whetherType
?
1
:
2
}
dispatch
(
getTaskName
(
currentTaskNum
,
childNum
))
}
dispatch
(
saveTaskListInfo
(
Object
.
assign
({},{
taskList
}
)))
dispatch
(
saveCommonInfo
(
Object
.
assign
({},
data
)))
})
}
}
...
...
@@ -208,9 +199,16 @@ const startalljob=(data)=>{
const
logout
=
()
=>
{
let
data
=
Object
.
assign
({},{
userInfo
:{},
taskInfo
:{}});
return
{
type
:
actionType
s
.
EMPTYCOMMONINFO
,
type
:
actionType
.
EMPTYCOMMONINFO
,
data
}
};
const
getTaskName
=
(
currentTaskNum
,
childTaskNum
=
0
)
=>
{
return
{
type
:
actionType
.
GETTASKNAME
,
data
:
{
currentTaskNum
,
childTaskNum
}
}
}
export
{
getStoreInfo
,
getTaskInfo
,
getInfoByBarcode
,
saveCommonInfo
,
getUserinfo
,
logout
,
startalljob
,
saveTaskListInfo
,
getTaskList
}
export
{
getStoreInfo
,
getTaskInfo
,
getInfoByBarcode
,
saveCommonInfo
,
getUserinfo
,
logout
,
startalljob
,
saveTaskListInfo
,
getTaskList
,
hasNoSku
,
getTaskName
}
client/actiontype/common.js
View file @
550d188e
...
...
@@ -4,6 +4,7 @@ const actionTypes = {
SAVECOMMONINFO
:
'SAVECOMMONINFO'
,
EMPTYCOMMONINFO
:
'EMPTYCOMMONINFO'
,
STARTALLJOB
:
'STARTALLJOB'
,
GETTASKLIST
:
'GETTASKLIST'
GETTASKLIST
:
'GETTASKLIST'
,
GETTASKNAME
:
'GETTASKNAME'
}
export
default
actionTypes
\ No newline at end of file
client/components/CommonComponent/HeaderComponent/HeaderComponent.jsx
View file @
550d188e
...
...
@@ -44,20 +44,20 @@ export default class HeaderComponent extends React.Component{
let
{
storeInfo
,
userInfo
,
taskInfo
}
=
headerInfo
;
storeInfo
=
{
id
:
1
,
name
:
'华茂商业街'
};
userInfo
=
{
employeeName
:
'李大仁'
,
id
:
'00001'
,
headImageUrl
:
""
};
taskInfo
=
{
currentTaskNum
:
2
,
totalTaskNum
:
6
}
//
storeInfo = {
//
id : 1,
//
name : '华茂商业街'
//
};
//
userInfo = {
//
employeeName : '李大仁',
//
id : '00001',
//
headImageUrl : ""
//
};
//
//
taskInfo = {
//
currentTaskNum : 2,
//
totalTaskNum : 6
//
}
let
style
=
{}
if
(
taskInfo
&&
taskInfo
.
currentTaskNum
&&
taskInfo
.
totalTaskNum
){
style
=
{
...
...
client/components/CommonComponent/SkuInfoComponent/SkuInfoComponent.jsx
0 → 100644
View file @
550d188e
import
React
from
'react'
;
require
(
'./index.css'
)
export
default
class
SkuInfoComponent
extends
React
.
Component
{
constructor
(
props
){
super
(
props
)
this
.
state
=
{
style
:
{
width
:
"100%"
,
height
:
"auto"
}
}
}
handleErrorImg
(
ref
){
let
nowRef
=
this
.
refs
[
ref
];
let
newSrc
=
UTILPATH
.
handleImgError
(
nowRef
);
nowRef
.
src
=
newSrc
;
}
handleLoadImg
(
ref
){
let
nowRef
=
this
.
refs
[
ref
];
let
style
=
UTILPATH
.
handleImgLoad
(
nowRef
);
this
.
setState
({
style
:
style
})
}
render
(){
let
props
=
this
.
props
;
let
{
classNames
=
''
,
style
=
{}}
=
props
;
return
(
<
div
className=
{
"skuInfoComponent "
+
classNames
}
style=
{
style
}
>
<
div
className=
{
"img"
}
>
<
img
style=
{
this
.
state
.
style
}
ref=
{
"secondPageImg"
}
onLoad=
{
()
=>
this
.
handleLoadImg
.
bind
(
this
)(
"secondPageImg"
)
}
onError=
{
()
=>
this
.
handleErrorImg
.
bind
(
this
)(
"secondPageImg"
)
}
src=
{
UTILPATH
.
localImg
.
defaultImg
}
alt=
""
/>
</
div
>
<
ul
className=
{
"shelfInfo font30 col333"
}
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
货品名称:雪碧
</
span
>
<
span
className=
{
"totalNum "
}
>
需回收数量:
<
span
className=
{
"font40 colff775c"
}
>
5
</
span
></
span
>
</
li
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
所在区域:A区1号柜
<
span
className=
{
"areaBtn colff775c"
}
>
位置照片
</
span
></
span
>
<
span
className=
{
"currentNum"
}
>
已回收数量:
<
span
className=
{
"font40 colff775c"
}
>
5
</
span
></
span
>
</
li
>
<
li
className=
{
""
}
>
货到信息:第6行 第3活到 13-6-6-6
</
li
>
</
ul
>
</
div
>
)
}
}
\ No newline at end of file
client/components/CommonComponent/SkuInfoComponent/index.css
0 → 100644
View file @
550d188e
.skuInfoComponent
{
text-align
:
left
;
padding
:
0
60px
;
margin-top
:
60px
;
display
:
inline-flex
;
align-items
:
center
;
}
.skuInfoComponent
.shelfInfo
{
line-height
:
50px
;
flex
:
1
;
}
.skuInfoComponent
.img
{
width
:
200px
;
height
:
200px
;
background
:
#fff
;
text-align
:
center
;
margin-right
:
40px
;
}
.skuInfoComponent
ul
>
li
{
display
:
flex
;
}
.skuInfoComponent
ul
>
li
.areaBtn
{
margin-left
:
10px
;
}
.skuInfoComponent
ul
>
li
>
span
:first-child
{
flex
:
1
;
}
\ No newline at end of file
client/components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage.jsx
View file @
550d188e
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
SkuInfoComponent
from
'../../CommonComponent/SkuInfoComponent/SkuInfoComponent'
require
(
'./index.css'
)
export
default
class
RecoverySecondPage
extends
React
.
Component
{
constructor
(
props
){
...
...
@@ -92,19 +93,7 @@ export default class RecoverySecondPage extends React.Component{
console
.
log
(
"scan"
)
}
handleErrorImg
(
ref
){
let
nowRef
=
this
.
refs
[
ref
];
let
newSrc
=
UTILPATH
.
handleImgError
(
nowRef
);
nowRef
.
src
=
newSrc
;
}
handleLoadImg
(
ref
){
let
nowRef
=
this
.
refs
[
ref
];
let
style
=
UTILPATH
.
handleImgLoad
(
nowRef
);
this
.
setState
({
style
:
style
})
}
render
(){
let
props
=
this
.
props
;
...
...
@@ -117,22 +106,7 @@ export default class RecoverySecondPage extends React.Component{
<
div
className=
{
"RecoverySecondPage"
}
>
<
div
className=
{
"title font40 col333"
}
>
任务目标:请将该货道货品进行扫码回收
</
div
>
<
div
className=
{
"box"
}
>
<
div
className=
{
"skuInfo"
}
>
<
div
className=
{
"img"
}
>
<
img
style=
{
this
.
state
.
style
}
ref=
{
"secondPageImg"
}
onLoad=
{
()
=>
this
.
handleLoadImg
.
bind
(
this
)(
"secondPageImg"
)
}
onError=
{
()
=>
this
.
handleErrorImg
.
bind
(
this
)(
"secondPageImg"
)
}
src=
{
UTILPATH
.
localImg
.
defaultImg
}
alt=
""
/>
</
div
>
<
ul
className=
{
"shelfInfo font30 col333"
}
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
货品名称:雪碧
</
span
>
<
span
className=
{
"totalNum "
}
>
需回收数量:
<
span
className=
{
"font40 colff775c"
}
>
5
</
span
></
span
>
</
li
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
所在区域:A区1号柜
<
span
className=
{
"areaBtn colff775c"
}
>
区域照片
</
span
></
span
>
<
span
className=
{
"currentNum"
}
>
已回收数量:
<
span
className=
{
"font40 colff775c"
}
>
5
</
span
></
span
>
</
li
>
<
li
className=
{
""
}
>
货到信息:第6行 第3活到 13-6-6-6
</
li
>
</
ul
>
</
div
>
<
SkuInfoComponent
style=
{
{
'display'
:
'flex'
}
}
/>
<
div
className=
{
"btn"
}
>
<
Button
key=
{
"RecoverySecondPageBtn"
}
classInfo=
{
classInfo
}
style=
{
style
}
text=
{
'扫码回收'
}
option=
{
this
.
scanQrcode
}
/>
<
div
className=
{
"text colff775c font28"
}
onClick=
{
()
=>
this
.
wrongSku
()
}
>
货品不符?
</
div
>
...
...
client/components/RecoveryComponent/RecoverySecondPage/index.css
View file @
550d188e
...
...
@@ -17,33 +17,6 @@
transform
:
translateX
(
-50%
);
overflow
:
hidden
;
}
.RecoverySecondPage
.box
.skuInfo
{
text-align
:
left
;
padding
:
0
60px
;
margin-top
:
60px
;
display
:
flex
;
align-items
:
center
;
}
.RecoverySecondPage
.box
.skuInfo
.shelfInfo
{
line-height
:
50px
;
flex
:
1
;
}
.RecoverySecondPage
.box
.skuInfo
.img
{
width
:
200px
;
height
:
200px
;
background
:
#fff
;
text-align
:
center
;
margin-right
:
40px
;
}
.RecoverySecondPage
.box
.skuInfo
ul
>
li
{
display
:
flex
;
}
.RecoverySecondPage
.box
.skuInfo
ul
>
li
.areaBtn
{
margin-left
:
10px
;
}
.RecoverySecondPage
.box
.skuInfo
ul
>
li
>
span
:first-child
{
flex
:
1
;
}
.RecoverySecondPage
.btn
{
position
:
absolute
;
left
:
50%
;
...
...
client/containers/BreakageContainer/BreakageConatiner.jsx
View file @
550d188e
...
...
@@ -13,10 +13,10 @@ class BreakageContainer extends React.Component {
let
props
=
this
.
props
;
return
(
<
div
className=
{
"BreakageContainer"
}
>
<
HeaderComponent
headerInfo=
{
this
.
props
.
headerInfo
}
/>
<
LeftContainer
/>
<
HeaderComponent
headerInfo=
{
props
.
headerInfo
}
/>
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
<
Button
text=
{
'没有'
}
option=
{
this
.
props
.
pullTaskList
}
/>
<
Button
text=
{
'没有'
}
option=
{
props
.
pullTaskList
}
/>
</
RightContainer
>
</
div
>
)
...
...
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
550d188e
import
React
from
'react'
;
import
Clock
from
'../../components/CommonComponent/ClockComponent/ClockComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
common
from
'../../reducers/common'
;
require
(
'./index.css'
);
export
default
class
HomePageContainer
extends
React
.
Component
{
...
...
@@ -18,23 +16,25 @@ export default class HomePageContainer extends React.Component{
render
(){
let
props
=
this
.
props
;
let
{
userInfo
,
storeInfo
,
headerInfo
}
=
props
;
let
{
headerInfo
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
let
buttonStyle
=
{
background
:
'#ff775c'
,
margin
:
"0 auto"
,
marginTop
:
'77px'
};
let
classInfo
=
{
colorInfo
:
'colfff'
,
fontInfo
:
'font30'
}
}
;
return
(
<
div
>
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
storeInfo=
{
storeInfo
}
headerInfo=
{
headerInfo
}
/>
<
div
className=
{
"homeContainer"
}
>
<
img
className=
{
"homeIcon"
}
src=
{
UTILPATH
.
localImg
.
homePage
}
alt=
""
/>
<
div
className=
{
'homeWelcom font30 clo333'
}
style=
{
{
marginTop
:
'50px'
}
}
>
欢迎来到
<
span
className=
"homeArea font50 colff775c"
style=
{
{
padding
:
'0 8px'
}
}
>
A
</
span
>
区
</
div
>
{
taskInfo
.
area
?
<
div
className=
{
'homeWelcom font30 clo333'
}
style=
{
{
marginTop
:
'50px'
}
}
>
欢迎来到
<
span
className=
"homeArea font50 colff775c"
style=
{
{
padding
:
'0 8px'
}
}
>
{
taskInfo
.
area
||
''
}
</
span
>
区
</
div
>
:
null
}
<
div
className=
{
"homeText font42"
}
style=
{
{
fontWeight
:
'800'
,
marginTop
:
'20px'
}
}
>
下午好, 你辛苦了!
</
div
>
<
Button
text=
{
'开始工作'
}
classInfo=
{
classInfo
}
style=
{
buttonStyle
}
option=
{
this
.
start
.
bind
(
this
)
}
/>
</
div
>
...
...
client/containers/LeftContainer/LeftContainer.jsx
View file @
550d188e
...
...
@@ -14,7 +14,7 @@ export default class LeftContainer extends React.Component{
<
li
className=
{
"icon iconfont icon-task font90"
}
/>
<
li
className=
{
"taskNumber font40 col333"
}
>
任务
{
taskInfo
.
currentTaskNum
||
''
}
</
li
>
<
li
className=
{
"leftText font30"
}
>
{
taskInfo
.
currentTaskTyp
e
||
''
}
</
li
>
<
li
className=
{
"leftText font30"
}
>
{
taskInfo
.
taskNam
e
||
''
}
</
li
>
</
ul
>
</
div
>
)
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
550d188e
...
...
@@ -2,7 +2,7 @@
import
React
from
'react'
import
{
connect
}
from
'react-redux'
;
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
test
}
from
"../../actions/common"
;
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
hasNoSku
,
getTaskName
}
from
"../../actions/common"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
,
clearProductSuccess
}
from
"../../actions/ScanBarCode"
...
...
@@ -54,7 +54,7 @@ class PageContainer extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
showPage
:
showPage
[
13
],
showPage
:
showPage
[
initPage
],
lastPage
:
''
,
page
:
null
,
popupInfo
:
defaultPopupInfo
,
...
...
@@ -157,6 +157,7 @@ class PageContainer extends React.Component {
let
{
userinfo
}
=
info
;
let
datas
=
info
.
data
;
let
{
storeInfo
}
=
commonInfo
;
console
.
log
(
"========= "
,
userinfo
,
storeInfo
)
if
(
storeInfo
&&
userinfo
&&
storeInfo
.
id
&&
userinfo
.
employeeId
){
...
...
@@ -217,13 +218,13 @@ class PageContainer extends React.Component {
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
2
:
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
1
:
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
case
1
:
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
case
3
:
this
.
changePages
(
CONFIG
.
showPage
[
10
]);
break
;
case
4
:
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
break
;
}
}
...
...
@@ -347,11 +348,11 @@ class PageContainer extends React.Component {
getPopDom
(
info
){
let
{
text
,
arrButton
}
=
info
let
dom
=
arrButton
.
map
((
a
,
k
)
=>
{
let
{
text
=
''
,
popupButtons
=
[],
style
=
{}
}
=
info
let
dom
=
popupButtons
.
map
((
a
,
k
)
=>
{
return
a
;
});
return
<
div
className=
{
"defaultPopup col333"
}
style=
{
popupInfo
.
style
}
>
return
<
div
className=
{
"defaultPopup col333"
}
style=
{
style
}
>
<
div
className=
{
"defaultPopupText font30"
}
>
{
text
}
</
div
>
...
...
@@ -577,7 +578,6 @@ class PageContainer extends React.Component {
break;
/*以下是二期页面 start*/
case showPage[13]:
console.log(state.commonInfo,'12121212121212')
pages =
<
HomePage
headerInfo=
{
state
.
commonInfo
}
startTask=
{
()
=>
{
dispatch
(
getTaskInfo
(
state
.
commonInfo
))}
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
...
...
@@ -588,7 +588,7 @@ class PageContainer extends React.Component {
break;
case showPage[5]:
pages =
<
BreakageContainer
pullTaskList=
{
()
=>
{
dispatch
(
getTaskList
(
state
.
commonInfo
.
storeInfo
))}
}
pullTaskList=
{
()
=>
{
dispatch
(
hasNoSku
(
state
.
commonInfo
.
storeInfo
))}
}
headerInfo=
{
state
.
commonInfo
}
/>
;
break;
...
...
@@ -597,6 +597,7 @@ class PageContainer extends React.Component {
headerInfo
=
{
state
.
commonInfo
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
getTaskName=
{
()
=>
dispatch
(
getTaskName
(
3
,
2
))
}
/>
;
break;
/*以下是二期页面 end*/
...
...
client/containers/RecoveryContainer/RecoveryContainer.jsx
View file @
550d188e
...
...
@@ -42,6 +42,8 @@ export default class RecoveryContainer extends React.Component{
finishBoxRecovery
(){
//完成回收箱物品回收
let
props
=
this
.
props
;
props
.
getTaskName
()
this
.
setState
({
showPage
:
recoveryPageIndex
[
2
]
})
...
...
@@ -79,7 +81,7 @@ export default class RecoveryContainer extends React.Component{
<
Header
headerInfo=
{
props
.
headerInfo
}
/>
:
null
}
<
LeftContainer
/>
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
{
dom
...
...
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
View file @
550d188e
...
...
@@ -19,7 +19,7 @@ class TakeStokeContaniner extends React.Component {
return
(
<
div
className=
{
'TokeStokeContainer'
}
>
<
HeaderComponent
headerStatus=
{
headerStatus
[
1
]
}
headerInfo=
{
props
.
headerInfo
}
/>
<
LeftContainer
/>
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
<
div
className=
{
"TokeStokeContent"
}
>
<
div
className=
{
"TokeStokeTop"
}
>
...
...
client/reducers/common.js
View file @
550d188e
...
...
@@ -29,54 +29,64 @@ let testData={
}
// 传入一个对象 对象中包含currentTaskNum表示大任务
// childTaskNum 表示大任务下的小任务
const
NumChangeWord
=
(
obj
)
=>
{
const
NumChangeWord
=
(
currentTaskNum
,
childTaskNum
)
=>
{
let
arr
=
[
{
title
:
'散落商品检查'
,
children
:[
'
散落1'
,
'散落2
'
]
children
:[
''
]
},
{
title
:
'核对数量'
,
children
:[
'
核对1'
,
'核对2
'
]
children
:[
''
]
},
{
title
:
'回收区货品回收'
,
children
:[
'回收
1'
,
'回收2
'
]
children
:[
'回收
区货品回收'
,
'货道货品回收
'
]
},
{
title
:
'补货'
,
children
:[
'
补货1'
,
'补货2
'
]
children
:[
''
]
}
]
let
name
=
obj
.
currentTaskNum
;
let
child
=
obj
.
childTaskNum
?
obj
.
childTaskNum
:
false
;
switch
(
name
){
let
name
=
currentTaskNum
;
let
taskName
=
''
;
let
child
=
childTaskNum
;
switch
(
name
)
{
case
1
:
obj
.
currentTaskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
obj
.
childTaskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
taskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
taskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
}
break
;
case
2
:
obj
.
currentTaskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
obj
.
childTaskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
taskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
taskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
}
break
;
case
3
:
obj
.
currentTaskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
obj
.
childTaskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
taskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
taskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
}
break
;
case
4
:
obj
.
currentTaskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
obj
.
childTaskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
taskName
=
arr
[
name
-
1
].
title
;
if
(
child
)
{
taskName
=
arr
[
name
-
1
].
children
[
child
-
1
]
}
break
;
}
return
taskName
;
};
const
getTaskName
=
(
content
,
data
)
=>
{
let
{
currentTaskNum
,
childTaskNum
}
=
data
;
let
taskName
=
NumChangeWord
(
currentTaskNum
,
childTaskNum
);
let
taskInfo
=
Object
.
assign
({},{
taskName
});
return
saveCommonInfo
(
content
,
Object
.
assign
({},{
taskInfo
}));
}
const
startalljob
=
(
state
,
data
)
=>
{
...
...
@@ -96,7 +106,9 @@ export default function(state={}, action) {
case
actionTypes
.
STARTALLJOB
:
return
startalljob
(
state
,
action
.
data
);
case
actionTypes
.
GETTASKLIST
:
return
saveTaskList
(
state
,
action
.
data
)
return
saveTaskList
(
state
,
action
.
data
);
case
actionTypes
.
GETTASKNAME
:
return
getTaskName
(
state
,
action
.
data
);
default
:
return
state
;
}
...
...
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