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
6a12c70a
Commit
6a12c70a
authored
Sep 17, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成捕补货UI 以及部分逻辑 & 修改之前的一些å¤样式
parent
eb46e7bf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
583 additions
and
61 deletions
+583
-61
client/components/CommonComponent/SkuInfoComponent/SkuInfoComponent.jsx
+16
-5
client/components/ReplenishComponent/ReplenishHomePage/ReplenishHomePage.jsx
+20
-0
client/components/ReplenishComponent/ReplenishHomePage/index.css
+11
-0
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
+22
-0
client/components/ReplenishComponent/ReplenishScanPage/index.css
+11
-0
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
+262
-0
client/components/ReplenishComponent/ReplenishSkuPage/index.css
+89
-0
client/containers/ReplenishContainer/ReplenishContainer.jsx
+131
-44
client/containers/ReplenishContainer/index.css
+21
-12
No files found.
client/components/CommonComponent/SkuInfoComponent/SkuInfoComponent.jsx
View file @
6a12c70a
...
...
@@ -36,13 +36,24 @@ export default class SkuInfoComponent extends React.Component{
<
ul
className=
{
"shelfInfo font30 col333"
}
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
货品名称:
{
skuInfo
.
skuName
||
''
}
</
span
>
<
span
className=
{
"totalNum "
}
>
需回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
skuInfo
.
targetNum
||
0
}
</
span
></
span
>
</
li
>
{
skuInfo
.
targetNum
?
<
span
className=
{
"totalNum "
}
>
需回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
skuInfo
.
targetNum
||
0
}
</
span
></
span
>
:
null
}
</
li
>
<
li
className=
{
""
}
>
<
span
className=
{
""
}
>
所在区域:
{
skuInfo
.
shortPosition
||
''
}
<
span
className=
{
"areaBtn colff775c"
}
>
位置照片
</
span
></
span
>
<
span
className=
{
"currentNum"
}
>
已回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
skuInfo
.
recoverNum
||
0
}
</
span
></
span
>
<
span
className=
{
""
}
>
所在区域:
{
skuInfo
.
shortPosition
||
''
}
{
skuInfo
.
areaImage
?
<
span
className=
{
"areaBtn colff775c"
}
>
位置照片
</
span
>
:
null
}
</
span
>
{
skuInfo
.
recoverNum
?
<
span
className=
{
"currentNum"
}
>
已回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
skuInfo
.
recoverNum
||
0
}
</
span
></
span
>
:
null
}
</
li
>
<
li
className=
{
""
}
>
货
到
信息:
{
skuInfo
.
position
||
''
}
</
li
>
<
li
className=
{
""
}
>
货
道
信息:
{
skuInfo
.
position
||
''
}
</
li
>
</
ul
>
</
div
>
)
...
...
client/components/ReplenishComponent/ReplenishHomePage/ReplenishHomePage.jsx
0 → 100644
View file @
6a12c70a
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
require
(
'./index.css'
)
export
default
class
ReplenishHomePage
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
}
render
(){
let
props
=
this
.
props
;
let
{
headerInfo
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
return
(
<
div
className=
{
"replenishHomePage"
}
>
<
div
className=
{
"text font40 col333"
}
>
任务目标:请将
{
taskInfo
.
area
}
区补货箱中的货品扫码放到货架上
</
div
>
<
Button
btnContainer=
{
"replenishHomePageBtn backff775c colfff font30"
}
key=
{
"replenishHomePageBtn"
}
text=
{
'开始扫码补货'
}
option=
{
props
.
scanQrcode
}
/>
</
div
>
)
}
}
client/components/ReplenishComponent/ReplenishHomePage/index.css
0 → 100644
View file @
6a12c70a
.replenishHomePage
{
text-align
:
center
;
padding-top
:
240px
;
}
.replenishHomePage
.text
{
margin-bottom
:
180px
;
}
.replenishHomePage
.replenishHomePageBtn
{
display
:
inline-block
;
}
\ No newline at end of file
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
0 → 100644
View file @
6a12c70a
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
require
(
'./index.css'
)
export
default
class
ReplenishScanPage
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
}
render
(){
let
props
=
this
.
props
;
let
{
headerInfo
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
return
(
<
div
className=
{
"replenishHomePage"
}
>
<
div
className=
{
"text font40 col333"
}
>
任务目标:请将
{
taskInfo
.
area
}
区补货箱中的货品扫码放到货架上
</
div
>
<
Button
btnContainer=
{
"replenishHomePageBtn backff775c colfff font30"
}
key=
{
"replenishHomePageBtn"
}
text=
{
'开始扫码补货'
}
option=
{
props
.
scanQrcode
}
/>
</
div
>
)
}
}
client/components/ReplenishComponent/ReplenishScanPage/index.css
0 → 100644
View file @
6a12c70a
.replenishHomePage
{
text-align
:
center
;
padding-top
:
240px
;
}
.replenishHomePage
.text
{
margin-bottom
:
180px
;
}
.replenishHomePage
.replenishHomePageBtn
{
display
:
inline-block
;
}
\ No newline at end of file
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
0 → 100644
View file @
6a12c70a
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
PopModel
from
'../../CommonComponent/PopupComponent/PopupChildComponent'
import
SkuInfoComponent
from
'../../CommonComponent/SkuInfoComponent/SkuInfoComponent'
require
(
'./index.css'
);
const
questionType
=
{
1
:
'getSkuDom'
,
2
:
'getQuestionPage'
,
3
:
'getWrongSku'
,
4
:
'overflowShelf'
,
5
:
'getBadSku'
,
}
export
default
class
ReplenishSkuPage
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
this
.
getPage
=
this
.
getPage
.
bind
(
this
);
//展示页面
this
.
handleScanOver
=
this
.
handleScanOver
.
bind
(
this
);
//扫描完毕
this
.
handleScanQrcode
=
this
.
handleScanQrcode
.
bind
(
this
);
//继续扫描
this
.
getSkuDom
=
this
.
getSkuDom
.
bind
(
this
);
//获取商品DOM
this
.
getSkuInfo
=
this
.
getSkuInfo
.
bind
(
this
);
//获取商品DOM
this
.
getQuestionPage
=
this
.
getQuestionPage
.
bind
(
this
);
//获取问题列表页
this
.
handleOverflowShelfQuestion
=
this
.
handleOverflowShelfQuestion
.
bind
(
this
);
//获取货道已满弹窗
this
.
handleWrongSkuQuestion
=
this
.
handleWrongSkuQuestion
.
bind
(
this
);
//获取商品不符弹窗
this
.
handleBadSkuQuestion
=
this
.
handleBadSkuQuestion
.
bind
(
this
);
//获取损坏商品弹窗
this
.
getWrongSku
=
this
.
getWrongSku
.
bind
(
this
);
// 商品不符
this
.
overflowShelf
=
this
.
overflowShelf
.
bind
(
this
);
// 货道已满页面
this
.
putInBox
=
this
.
putInBox
.
bind
(
this
);
// 放回
this
.
state
=
{
pageType
:
1
}
}
handleScanQrcode
(){
//扫描下一个
}
getSkuDom
(){
return
(
<
div
className=
{
"replenishSkuPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
请将货品放到对应货架上
<
span
className=
{
"font26 progressText"
}
>
补货进度:3/30
</
span
>
</
div
>
<
div
className=
{
"pagebox"
}
>
{
this
.
getSkuInfo
()
}
<
div
className=
{
"btn pageBtn"
}
>
<
div
className=
{
"tips colff775c font30"
}
onClick=
{
()
=>
this
.
getPage
(
2
)
}
>
遇到问题?
</
div
>
<
Button
btnContainer=
{
"replenishPageBtn1 font32"
}
key=
{
"replenishPageBtn1"
}
text=
{
'扫描工作结束'
}
option=
{
this
.
handleScanOver
}
/>
<
Button
btnContainer=
{
"replenishPageBtn2 font32 colfff backff775c"
}
key=
{
"replenishPageBtn2"
}
text=
{
'扫描下一个'
}
option=
{
this
.
handleScanQrcode
}
/>
</
div
>
</
div
>
</
div
>
)
}
handleScanOver
(){
console
.
log
(
"扫描结束"
)
//货道商品不符
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn1 font32"
}
key=
{
"replenishHandleScanOverBtn1"
}
text=
{
"继续扫描"
}
option=
{
this
.
handleScanQrcode
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"replenishHandleScanOverBtn2 backff775c colfff font32"
}
key=
{
"replenishHandleScanOverBtn2"
}
text=
{
"确认扫描完毕"
}
option=
{
hidePopup
}
/>
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
});
}
getSkuInfo
(){
return
(
<
div
className=
{
"replenishSkuInfo"
}
>
<
div
className=
{
"skuName font30 col333"
}
>
商品名称:雪碧
</
div
>
<
div
className=
{
"skuInfo"
}
>
<
div
className=
{
"skuImg"
}
>
<
img
src=
""
alt=
""
/>
</
div
>
<
div
className=
{
"areaImg"
}
>
<
img
src=
""
alt=
""
/>
</
div
>
<
div
className=
{
"skuPos col333 font30"
}
>
<
ul
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
所在区域:
</
span
>
A区域
<
span
className=
{
"colff775c showAreaImg"
}
>
区域照片
</
span
></
li
>
<
li
className=
{
""
}
>
<
span
className=
{
"skuPosTitle"
}
>
货道信息:
</
span
>
<
span
className=
{
""
}
>
一个字一个字一个字一个字一个字一个字
</
span
>
</
li
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
货道编号:
</
span
>
一个字
</
li
>
</
ul
>
</
div
>
</
div
>
</
div
>
)
}
getPage
(
type
){
type
=
type
?
type
:
this
.
state
.
pageType
;
this
.
setState
({
pageType
:
type
})
}
getQuestionPage
(){
return
(
<
div
className=
{
"replenishQuestionPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
<
i
className=
{
"iconfont icon font70 icon-circle-left col000"
}
onClick=
{
()
=>
this
.
getPage
(
1
)
}
/>
遇到问题
</
div
>
<
div
className=
{
"pagebox"
}
>
<
div
className=
{
"btn pageBtn"
}
>
<
div
className=
{
"tips col000 font40"
}
>
补货过程中您是否遇到了如下问题?
</
div
>
<
Button
btnContainer=
{
"replenishQuestionPageBtn1 replenishQuestionPageBtn font32"
}
key=
{
"replenishQuestionPageBtn1"
}
text=
{
'种类不符'
}
option=
{
()
=>
this
.
getPage
(
3
)
}
/>
<
Button
btnContainer=
{
"replenishQuestionPageBtn2 replenishQuestionPageBtn font32"
}
key=
{
"replenishQuestionPageBtn2"
}
text=
{
'货道已满'
}
option=
{
()
=>
this
.
getPage
(
4
)
}
/>
<
Button
btnContainer=
{
"replenishQuestionPageBtn3 replenishQuestionPageBtn font32"
}
key=
{
"replenishQuestionPageBtn3"
}
text=
{
'货品损坏'
}
option=
{
()
=>
this
.
getPage
(
5
)
}
/>
</
div
>
</
div
>
</
div
>
)
}
getWrongSku
(){
return
(
<
div
className=
{
"replenishWrongSkuPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
<
i
className=
{
"iconfont icon font70 icon-circle-left col000"
}
onClick=
{
()
=>
this
.
getPage
(
2
)
}
/>
遇到问题
</
div
>
<
div
className=
{
"pagebox"
}
>
<
div
className=
{
"wrongSkuIcon"
}
>
<
i
className=
{
"iconfont icon-exclamation font150 colf5a623"
}
/>
</
div
>
<
div
className=
{
"tips col000 font40"
}
>
请再次仔细确认货道中的货品是否相符?
</
div
>
<
div
className=
{
"skuInfo"
}
>
<
div
className=
{
"text font28 col333"
}
>
待补货品信息:
</
div
>
<
SkuInfoComponent
style=
{
{
display
:
"flex"
,
marginTop
:
"20px"
,
padding
:
"0"
}
}
/>
</
div
>
<
div
className=
{
"btn pageBtn"
}
>
<
Button
btnContainer=
{
"replenishWrongSkuBtn backff775c colfff font32"
}
key=
{
"replenishWrongSkuBtn"
}
text=
{
'货品不符'
}
option=
{
this
.
handleWrongSkuQuestion
}
/>
</
div
>
</
div
>
</
div
>
)
}
overflowShelf
(){
return
(
<
div
className=
{
"replenishOverflowShelfPage replenishWrongSkuPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
<
i
className=
{
"iconfont icon font70 icon-circle-left col000"
}
onClick=
{
()
=>
this
.
getPage
(
2
)
}
/>
遇到问题-货道已满确认
</
div
>
<
div
className=
{
"pagebox"
}
>
<
div
className=
{
"wrongSkuIcon"
}
>
<
i
className=
{
"iconfont icon-exclamation font150 colf5a623"
}
/>
</
div
>
<
div
className=
{
"tips col000 font40"
}
>
请再次仔细确认货道中是否已放满货品
</
div
>
<
div
className=
{
"skuInfo"
}
>
<
div
className=
{
"text font28 col333"
}
>
待补货品信息:
</
div
>
<
SkuInfoComponent
style=
{
{
display
:
"flex"
,
marginTop
:
"20px"
,
padding
:
"0"
}
}
/>
</
div
>
<
div
className=
{
"btn pageBtn"
}
>
<
Button
btnContainer=
{
"replenishWrongSkuBtn backff775c colfff font32"
}
key=
{
"replenishWrongSkuBtn"
}
text=
{
'货道已满'
}
option=
{
this
.
handleOverflowShelfQuestion
}
/>
</
div
>
</
div
>
</
div
>
)
}
getBadSku
(){
return
(
<
div
className=
{
"replenishBadSkuPage replenishWrongSkuPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
<
i
className=
{
"iconfont icon font70 icon-circle-left col000"
}
onClick=
{
()
=>
this
.
getPage
(
2
)
}
/>
遇到问题-货品损坏确认
</
div
>
<
div
className=
{
"pagebox"
}
>
<
div
className=
{
"wrongSkuIcon"
}
>
<
i
className=
{
"iconfont icon-exclamation font150 colf5a623"
}
/>
</
div
>
<
div
className=
{
"tips col000 font40"
}
>
此货品是否已经损坏,不能进行售卖
</
div
>
<
div
className=
{
"skuInfo"
}
>
<
div
className=
{
"text font28 col333"
}
>
待补货品信息:
</
div
>
<
SkuInfoComponent
style=
{
{
display
:
"flex"
,
marginTop
:
"20px"
,
padding
:
"0"
}
}
/>
</
div
>
<
div
className=
{
"btn pageBtn"
}
>
<
Button
btnContainer=
{
"replenishWrongSkuBtn backff775c colfff font32"
}
key=
{
"replenishWrongSkuBtn"
}
text=
{
'是的'
}
option=
{
this
.
handleBadSkuQuestion
}
/>
</
div
>
</
div
>
</
div
>
)
}
handleWrongSkuQuestion
(){
//货品不符解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishQuestionPopupBtn font32 backff775c colfff "
}
key=
{
"replenishQuestionPopupBtn2"
}
text=
{
"已放回"
}
option=
{
()
=>
this
.
putInBox
(
questionType
[
2
])
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"遇到问题-货品不符解决办法"
}
classContainer=
{
"replenishQuestionPopup"
}
>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
1、请将刚才扫描的货品转放到物流回收箱内带回
</
p
>
<
p
>
2、若A区补货箱内还有此货品也都放到物流回收箱带回
</
p
>
<
p
>
3、放完后请开始补其他货品
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
handleOverflowShelfQuestion
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishQuestionPopupBtn font32 backff775c colfff "
}
key=
{
"replenishQuestionPopupBtn1"
}
text=
{
"已放回"
}
option=
{
()
=>
this
.
putInBox
(
questionType
[
1
])
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"遇到问题-货道已满解决办法"
}
classContainer=
{
"replenishQuestionPopup"
}
>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
1、请将刚才扫描的货品转放到物流回收箱内带回
</
p
>
<
p
>
2、若A区补货箱内还有此货品也都放到物流回收箱带回
</
p
>
<
p
>
3、继续扫描其它种类货品
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
handleBadSkuQuestion
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishQuestionPopupBtn font32 backff775c colfff "
}
key=
{
"replenishQuestionPopupBtn1"
}
text=
{
"已放回"
}
option=
{
()
=>
this
.
putInBox
(
questionType
[
3
])
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"遇到问题-货品破损解决办法"
}
classContainer=
{
"replenishQuestionPopup"
}
>
<
div
className=
{
"text font40 col000"
}
style=
{
{
textAlign
:
"center"
,
paddingLeft
:
"0"
}
}
>
<
p
>
请将刚才扫描的货品放到物流回收箱内带回
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
putInBox
(
type
){
//已放回
let
{
hidePopup
}
=
this
.
props
;
console
.
log
(
"已放回 "
,
type
)
hidePopup
()
}
render
(){
let
props
=
this
.
props
;
return
this
[
questionType
[
this
.
state
.
pageType
]]()
}
}
client/components/ReplenishComponent/ReplenishSkuPage/index.css
0 → 100644
View file @
6a12c70a
.replenishSkuPage
.btn
{
margin-top
:
13%
;
position
:
relative
;
}
.replenishSkuPage
.btn
.tips
{
display
:
inline-block
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.replenishSkuPage
.btn
.replenishPageBtn1
{
margin-right
:
40px
;
display
:
inline-block
;
}
.replenishSkuPage
.btn
.replenishPageBtn2
{
display
:
inline-block
;
}
.replenishPopInfo
.btn
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
15%
;
}
.replenishPopInfo
.btn
.replenishHandleScanOverBtn1
{
margin-right
:
3%
;
}
.replenishPopInfo
.text
{
line-height
:
40px
;
margin-bottom
:
80px
;
}
.replenishPopInfo
.icon
{
margin
:
50px
0
60px
;
}
.replenishQuestionPage
.icon
,
.replenishWrongSkuPage
.icon
{
float
:
left
;
margin-left
:
30px
;
}
.replenishQuestionPage
.tips
{
margin
:
20px
0
80px
;
}
.replenishQuestionPage
.replenishQuestionPageBtn
{
margin-top
:
40px
;
position
:
relative
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.replenishWrongSkuPage
.wrongSkuIcon
{
margin
:
10px
0
40px
;
}
.replenishWrongSkuPage
.tips
{
margin-bottom
:
46px
;
}
.replenishWrongSkuPage
.text
{
text-align
:
left
;
}
.replenishWrongSkuPage
.btn
{
text-align
:
center
;
margin-top
:
2%
;
}
.replenishWrongSkuPage
.btn
.replenishWrongSkuBtn
{
display
:
inline-block
;
}
.replenishWrongSkuPage
.skuInfo
{
background-color
:
#fafafa
;
padding
:
20px
;
}
.replenishWrongSkuPage
.skuInfoComponent
.img
{
width
:
150px
;
height
:
150px
;
}
.replenishQuestionPopup
.text
{
text-align
:
left
;
padding
:
130px
0
0
120px
;
line-height
:
72px
;
}
.replenishQuestionPopup
.btn
{
margin-top
:
15%
;
text-align
:
center
;
}
.replenishQuestionPopup
.btn
.replenishQuestionPopupBtn
{
display
:
inline-block
;
}
\ No newline at end of file
client/containers/ReplenishContainer/ReplenishContainer.jsx
View file @
6a12c70a
...
...
@@ -2,38 +2,64 @@ import React from 'react';
import
Header
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
;
import
LeftContainer
from
'../LeftContainer/LeftContainer'
;
import
RightContainer
from
'../RightContainer/RightContainer'
;
import
ReplenishHomePage
from
'../../components/ReplenishComponent/ReplenishHomePage/ReplenishHomePage'
import
ReplenishSkuPage
from
'../../components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage'
import
ReplenishScanPage
from
'../../components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage'
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
PopModel
from
'../../components/CommonComponent/PopupComponent/PopupChildComponent'
require
(
'./index.css'
);
const
replenishPageIndex
=
{
1
:
'getHomePage'
,
2
:
'getSkuPage'
,
3
:
'getScanPage'
,
}
export
default
class
ReplenishContainer
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
this
.
beginScan
=
this
.
beginScan
.
bind
(
this
)
this
.
state
=
{
pageType
:
1
,
showScanQrcode
:
false
}
}
componentWillMount
(){
}
wrongQrcode
(){
//货道商品不符
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"replenishPopInfoWrongSkuBtn font32"
}
key=
{
"replenishContainerShelfWrong1"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
uploadWrongSku
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-exclamation font150 colf5a623"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
您需要补完【XXX】,才能补其它货品
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
<
div
className=
{
"tip"
}
>
忘记该货品的样子
</
div
>
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
getPage
(
type
){
console
.
log
(
"type "
,
type
)
return
(
props
)
=>
this
[
replenishPageIndex
[
type
]](
props
)
}
beginScan
(){
this
.
setState
({
showScanQrcode
:
true
,
})
}
getHomePage
(
props
){
let
{
headerInfo
}
=
props
;
return
(
<
ReplenishHomePage
headerInfo=
{
headerInfo
}
scanQrcode=
{
()
=>
this
.
beginScan
()
}
/>
)
}
getSkuPage
(
props
){
return
<
ReplenishSkuPage
{
...
props
}
/>
}
getScanPage
(
props
){
return
<
ReplenishScanPage
{
...
props
}
/>
}
getSku
Dom
(){
getSku
Info
(){
return
(
<
div
className=
{
"replenishSkuInfo"
}
>
<
div
className=
{
"skuName font30 col333"
}
>
商品名称:雪碧
</
div
>
...
...
@@ -46,9 +72,12 @@ export default class ReplenishContainer extends React.Component{
</
div
>
<
div
className=
{
"skuPos col333 font30"
}
>
<
ul
>
<
li
>
所在区域:A区域
<
span
className=
{
"colff775c"
}
>
区域照片
</
span
></
li
>
<
li
>
一个字一个字一个字一个字一个字一个字
</
li
>
<
li
>
一个字
</
li
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
所在区域:
</
span
>
A区域
<
span
className=
{
"colff775c showAreaImg"
}
>
区域照片
</
span
></
li
>
<
li
className=
{
""
}
>
<
span
className=
{
"skuPosTitle"
}
>
货道信息:
</
span
>
<
span
className=
{
""
}
>
一个字一个字一个字一个字一个字一个字
</
span
>
</
li
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
货道编号:
</
span
>
一个字
</
li
>
</
ul
>
</
div
>
</
div
>
...
...
@@ -56,43 +85,101 @@ export default class ReplenishContainer extends React.Component{
)
}
scanQrcode
(){
console
.
log
(
"扫描下一个"
)
getOtherHeader
(){
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
this
.
goBack
.
bind
(
this
)()
}
/>
<
span
className=
{
"middle"
}
>
任务目标:将A区补货箱中的货品扫码后放到货架上
</
span
>
</
div
>
}
scanOver
(){
console
.
log
(
"扫描结束"
)
goBack
(){
this
.
setState
({
showScanQrcode
:
false
,
pageType
:
1
})
}
getPage
(){
return
(
<
div
className=
{
"replenishPage commonPage"
}
>
<
div
className=
{
"title font40 col333 pageTitle"
}
>
请将货品放到对应货架上
<
span
className=
{
"font26 progressText"
}
>
补货进度:3/30
</
span
>
//扫描货品异常
errorSku
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32 backff775c colfff"
}
key=
{
"recoveryContainerWrongQrcode"
}
text=
{
"确认扫描完毕"
}
option=
{
hidePopup
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"recoveryPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-wrong font150"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
您需要补完【XXX】,才能补其他货品
</
p
>
</
div
>
<
div
className=
{
"pagebox"
}
>
{
this
.
getSkuDom
()
}
<
div
className=
{
"btn pageBtn"
}
>
<
div
className=
{
"tips colff775c font30"
}
>
遇到问题?
</
div
>
<
Button
btnContainer=
{
"replenishPageBtn1 font32"
}
key=
{
"replenishPageBtn1"
}
text=
{
'扫描工作结束'
}
option=
{
this
.
scanOver
}
/>
<
Button
btnContainer=
{
"replenishPageBtn2 font32 colfff backff775c"
}
key=
{
"replenishPageBtn2"
}
text=
{
'扫描下一个'
}
option=
{
this
.
scanQrcode
}
/>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
<
div
className=
{
"colff775c font30"
}
>
忘记该货品的样子
</
div
>
</
div
>
</
div
>
)
</
PopModel
>
showPopup
({
popupChild
:
popDom
});
}
//忘记样子
forgetSku
(){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32 backff775c colfff"
}
key=
{
"recoveryContainerWrongQrcode"
}
text=
{
"继续扫描"
}
option=
{
hidePopup
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"recoveryPopInfo"
}
>
{
this
.
getSkuInfo
()
}
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>
showPopup
({
popupChild
:
popDom
});
}
//不在本次补货范围
outReplenish
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32 backff775c colfff"
}
key=
{
"recoveryContainerWrongQrcode"
}
text=
{
"关闭"
}
option=
{
hidePopup
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"recoveryPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-wrong font150"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
此货品不在本次补货范围内,请放入物流回收箱!
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>
showPopup
({
popupChild
:
popDom
});
}
render
(){
let
props
=
this
.
props
;
return
(
<
div
className=
{
"replenishContainer"
}
>
{
props
.
headerInfo
&&
props
.
headerInfo
.
storeInfo
?
<
Header
headerInfo=
{
props
.
headerInfo
}
/>
:
null
this
.
state
.
showScanQrcode
?
<
div
className=
{
"replenishQrcode"
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
backgroundColor
:
'#000'
}
}
>
<
Header
showHeader=
{
CONFIG
.
headerStatus
[
2
]
}
>
{
this
.
getOtherHeader
()
}
</
Header
>
</
div
>
:
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
>
{
props
.
headerInfo
&&
props
.
headerInfo
.
storeInfo
?
<
Header
headerInfo=
{
props
.
headerInfo
}
/>
:
null
}
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
{
this
.
getPage
(
this
.
state
.
pageType
)(
props
)
}
</
RightContainer
>
</
div
>
}
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
{
this
.
getPage
()
}
</
RightContainer
>
</
div
>
)
}
...
...
client/containers/ReplenishContainer/index.css
View file @
6a12c70a
...
...
@@ -7,8 +7,22 @@
position
:
absolute
;
right
:
40px
;
}
.replenishScanQrcodeHeader
{
background-color
:
#000
;
height
:
100%
;
text-align
:
center
;
position
:
relative
;
line-height
:
98px
;
}
.replenishScanQrcodeHeader
.icon
{
}
.replenishSkuInfo
{
padding-left
:
15%
;
width
:
80%
;
position
:
relative
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.replenishSkuInfo
.skuName
{
text-align
:
left
;
...
...
@@ -34,20 +48,14 @@
line-height
:
46px
;
flex
:
1
;
}
.replenish
Page
.btn
{
margin-top
:
20
%
;
.replenish
SkuInfo
.skuInfo
.skuPos
ul
>
li
{
padding-left
:
26
%
;
position
:
relative
;
}
.replenishPage
.btn
.tips
{
display
:
inline-block
;
.replenishSkuInfo
.skuInfo
.skuPos
ul
>
li
.skuPosTitle
{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.replenishPage
.btn
.replenishPageBtn1
{
margin-right
:
40px
;
display
:
inline-block
;
}
.replenish
Page
.btn
.replenishPageBtn2
{
display
:
inline-block
;
.replenish
SkuInfo
.skuInfo
.skuPos
ul
>
li
.showAreaImg
{
margin-left
:
10px
;
}
\ No newline at end of file
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