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
c963de04
Commit
c963de04
authored
Sep 20, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完整回收流程
parent
5b8d66a1
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
423 additions
and
133 deletions
+423
-133
client/actions/barcodeCommon.js
+8
-2
client/actions/common.js
+29
-23
client/actions/recovery.js
+13
-19
client/actions/uploadError.js
+1
-0
client/components/RecoveryComponent/RecoveryScanPage/RecoveryScanPage.jsx
+217
-0
client/components/RecoveryComponent/RecoveryScanPage/index.css
+76
-0
client/components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage.jsx
+4
-49
client/config/index.js
+3
-2
client/config/taskErrorType.js
+1
-1
client/containers/HomePageContainer/HomePageContainer.jsx
+1
-1
client/containers/PageContainer/PageContainer.jsx
+13
-8
client/containers/RecoveryContainer/RecoveryContainer.jsx
+43
-20
client/containers/RecoveryContainer/index.css
+6
-3
client/containers/ReplenishContainer/ReplenishContainer.jsx
+1
-1
client/reducers/common.js
+3
-2
client/reducers/index.js
+3
-1
client/reducers/replenish.js
+1
-1
No files found.
client/actions/barcodeCommon.js
View file @
c963de04
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
import
getTaskList
from
'./common'
import
saveCommonInfo
from
'./common'
import
barcodeActionType
from
'../actiontype/barcodeCommon'
import
barcodeActionType
from
'../actiontype/barcodeCommon'
import
replenishAction
from
'./replenish'
import
replenishAction
from
'./replenish'
let
domain1
=
ENV
.
domain
;
let
domain1
=
ENV
.
domain
;
...
@@ -49,6 +49,8 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -49,6 +49,8 @@ const getBarCodeProductInfo = (data)=>{
.
then
((
json
)
=>
{
.
then
((
json
)
=>
{
if
(
json
.
meta
.
success
&&
json
.
data
){
if
(
json
.
meta
.
success
&&
json
.
data
){
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
let
info
=
Object
.
assign
({},{
taskList
:
json
.
data
.
product
});
dispatch
(
saveCommonInfo
(
info
))
dispatch
(
saveProductInfo
(
json
.
data
))
dispatch
(
saveProductInfo
(
json
.
data
))
}
else
{
}
else
{
switch
(
taskInfo
.
currentTaskNum
){
switch
(
taskInfo
.
currentTaskNum
){
...
@@ -57,7 +59,11 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -57,7 +59,11 @@ const getBarCodeProductInfo = (data)=>{
break
;
break
;
case
4
:
case
4
:
//补货任务
//补货任务
dispatch
(
replenishAction
.
wrongQrcode
(
json
));
let
errorInfo
=
{
errorType
:
json
.
data
.
errorType
||
""
,
errorMessage
:
json
.
meta
.
message
};
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
break
;
break
;
}
}
}
}
...
...
client/actions/common.js
View file @
c963de04
...
@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch';
...
@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch';
import
actionType
from
'../actiontype/common'
import
actionType
from
'../actiontype/common'
import
{
addErrorInfo
}
from
'./uploadError'
import
{
addErrorInfo
}
from
'./uploadError'
let
domain1
=
ENV
.
domain
;
let
domain1
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.128:8080/web/'
let
domain
=
ENV
.
domain
let
myHeaders
=
new
Headers
({
let
myHeaders
=
new
Headers
({
// 'Access-Control-Allow-Origin': '*',
// 'Access-Control-Allow-Origin': '*',
...
@@ -36,6 +36,29 @@ let myHeaders = new Headers({
...
@@ -36,6 +36,29 @@ let myHeaders = new Headers({
// }
// }
// }
// }
// };
// };
const
getTaskInfo
=
(
data
)
=>
{
let
{
userInfo
,
storeInfo
,
taskInfo
}
=
data
;
return
(
dispatch
)
=>
{
if
(
userInfo
&&
userInfo
.
id
&&
storeInfo
&&
storeInfo
.
id
)
{
let
url
=
`
${
domain
}
flat/ready/
${
storeInfo
.
id
}
/
${
taskInfo
.
area
}
/
${
userInfo
.
id
}
`
;
fetch
(
url
,{
// credentials : 'include',
method
:
'GET'
,
mode
:
'cors'
,
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
let
taskInfo
=
Object
.
assign
({});
if
(
json
.
meta
.
success
&&
json
.
data
){
taskInfo
=
Object
.
assign
({},
json
.
data
);
dispatch
(
getTaskName
(
json
.
data
.
currentTaskNum
))
}
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
})))
}).
catch
(
e
=>
{
console
.
error
(
e
)})
}
else
{
dispatch
(
addErrorInfo
(
"用户或门店不对"
))
}
}
};
//获取店铺信息
//获取店铺信息
const
getStoreInfo
=
(
storeId
)
=>
{
const
getStoreInfo
=
(
storeId
)
=>
{
...
@@ -60,28 +83,6 @@ const getStoreInfo = (storeId)=>{
...
@@ -60,28 +83,6 @@ const getStoreInfo = (storeId)=>{
}
}
};
};
//获取条形码信息
const
getInfoByBarcode
=
(
data
)
=>
{
let
{
storeId
,
barcode
}
=
data
;
let
url
=
`flat/barcode/
${
storeId
}
/
${
barcode
}
`
return
(
dispatch
)
=>
{
// dispatch(clearBarcodeInfo()); //清空barcode信息
fetch
(
domain
+
url
,{
credentials
:
'include'
,
method
:
'GET'
,
mode
:
'cors'
,
headers
:
{
'Content-Type'
:
'application/json'
}
}).
then
(
response
=>
response
.
json
())
.
then
(
json
=>
{
if
(
json
.
meta
.
success
){
//扫码成功
}
else
{
//扫码失败
}
})
}
};
//获取用户信息
//获取用户信息
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
...
@@ -145,6 +146,7 @@ const getTaskList = (data={})=>{
...
@@ -145,6 +146,7 @@ const getTaskList = (data={})=>{
}).
then
(
response
=>
response
.
json
())
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
.
then
((
json
)
=>
{
let
data
=
Object
.
assign
({});
let
data
=
Object
.
assign
({});
console
.
log
(
"拉取工单 "
,
json
)
if
(
json
.
meta
.
success
&&
json
.
data
){
if
(
json
.
meta
.
success
&&
json
.
data
){
data
.
taskInfo
=
Object
.
assign
({},
json
.
data
.
flatCommonVo
)
data
.
taskInfo
=
Object
.
assign
({},
json
.
data
.
flatCommonVo
)
data
.
taskList
=
Object
.
assign
({},
json
.
data
.
skuFlatVo
);
data
.
taskList
=
Object
.
assign
({},
json
.
data
.
skuFlatVo
);
...
@@ -209,4 +211,8 @@ const getTaskName = (currentTaskNum,childTaskNum=0)=>{
...
@@ -209,4 +211,8 @@ const getTaskName = (currentTaskNum,childTaskNum=0)=>{
}
}
}
}
<<<<<<<
HEAD
export
{
getStoreInfo
,
getInfoByBarcode
,
saveCommonInfo
,
getUserinfo
,
logout
,
startalljob
,
saveTaskListInfo
,
getTaskList
,
hasNoSku
,
getTaskName
}
export
{
getStoreInfo
,
getInfoByBarcode
,
saveCommonInfo
,
getUserinfo
,
logout
,
startalljob
,
saveTaskListInfo
,
getTaskList
,
hasNoSku
,
getTaskName
}
=======
export
{
getStoreInfo
,
getTaskInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
startalljob
,
saveTaskListInfo
,
getTaskList
,
hasNoSku
,
getTaskName
}
>>>>>>>
完整回收流程
client/actions/recovery.js
View file @
c963de04
...
@@ -10,8 +10,17 @@ let myHeaders = new Headers({
...
@@ -10,8 +10,17 @@ let myHeaders = new Headers({
'Content-Type'
:
'application/json; charset=UTF-8'
,
'Content-Type'
:
'application/json; charset=UTF-8'
,
});
});
const
finishBoxRecovery
=
()
=>
{
const
finishBoxRecovery
=
(
info
)
=>
{
//完成
//已放入回收箱
let
{
userInfo
,
taskInfo
,
storeInfo
,
taskList
}
=
info
;
let
bodyData
=
Object
.
assign
({},{
storeId
:
storeInfo
.
id
,
taskId
:
taskInfo
.
taskId
,
userId
:
userInfo
.
id
,
id
:
taskList
.
workListId
,
taskType
:
taskInfo
.
currentTaskType
,
area
:
taskInfo
.
area
})
let
url
=
`
${
ENV
.
domain
}
/machine_pad/update_machine_recovery_sku.action`
let
url
=
`
${
ENV
.
domain
}
/machine_pad/update_machine_recovery_sku.action`
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
url
,{
fetch
(
url
,{
...
@@ -21,25 +30,10 @@ const finishBoxRecovery = ()=>{
...
@@ -21,25 +30,10 @@ const finishBoxRecovery = ()=>{
headers
:
myHeaders
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
.
then
((
json
)
=>
{
dispatch
(
getTaskList
());
dispatch
(
getTaskList
(
info
));
})
})
}
}
};
};
const
wrongShelf
=
()
=>
{
//货道不符
let
url
=
`
${
ENV
.
domain
}
/machine_pad/wrong_machine_recovery_sku.action`
return
(
dispatch
)
=>
{
fetch
(
url
,{
// credentials : 'include',
method
:
'POST'
,
mode
:
'cors'
,
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
dispatch
(
getTaskList
());
})
}
}
export
{
finishBoxRecovery
,
wrongShelf
}
export
{
finishBoxRecovery
}
client/actions/uploadError.js
View file @
c963de04
...
@@ -50,6 +50,7 @@ const uploadError = (info,exceptionType)=>{
...
@@ -50,6 +50,7 @@ const uploadError = (info,exceptionType)=>{
}).
then
((
response
)
=>
response
.
json
())
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
.
then
(
json
=>
{
dispatch
(
getTaskList
());
}).
catch
(
e
=>
{
console
.
error
(
e
)});
}).
catch
(
e
=>
{
console
.
error
(
e
)});
})
})
}
}
...
...
client/components/RecoveryComponent/RecoveryScanPage/RecoveryScanPage.jsx
0 → 100644
View file @
c963de04
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
Header
from
'../../CommonComponent/HeaderComponent/HeaderComponent'
;
import
PopModel
from
'../../CommonComponent/PopupComponent/PopupChildComponent'
require
(
'./index.css'
)
export
default
class
RecoveryScanPage
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
this
.
getOtherHeader
=
this
.
getOtherHeader
.
bind
(
this
)
this
.
getBarcodeInput
=
this
.
getBarcodeInput
.
bind
(
this
)
this
.
wrongQrcode
=
this
.
wrongQrcode
.
bind
(
this
)
this
.
makeSureScanOver
=
this
.
makeSureScanOver
.
bind
(
this
);
this
.
submitBarcode
=
this
.
submitBarcode
.
bind
(
this
);
this
.
failSubmit
=
this
.
failSubmit
.
bind
(
this
);
this
.
getScanDom
=
this
.
getScanDom
.
bind
(
this
);
this
.
changeShowInput
=
this
.
changeShowInput
.
bind
(
this
);
this
.
getPopInfo
=
this
.
getPopInfo
.
bind
(
this
);
this
.
correctQrcode
=
this
.
correctQrcode
.
bind
(
this
);
this
.
state
=
{
barcodeText
:
''
,
barcodeErrorText
:
''
,
showInput
:
false
}
}
componentWillReceiveProps
(
nextProps
){
let
{
recoveryInfo
}
=
nextProps
;
}
getPopInfo
(){
let
{
finishBoxRecovery
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32 backff775c colfff"
}
style=
{
{
marginTop
:
'10%'
}
}
key=
{
"recoveryContainerCorrectQrcode"
}
text=
{
"已放入"
}
option=
{
finishBoxRecovery
}
/>
return
(
<
PopModel
popupTitle=
{
"货品匹配成功"
}
classContainer=
{
"recoveryPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-correct font150 col27ce61"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
请将货品放入回收箱
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>
)
}
getOtherHeader
(){
let
{
headerInfo
,
goBack
}
=
this
.
props
;
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
goBack
(
2
)
}
/>
</
div
>
}
handleInputChange
(
e
){
this
.
setState
({
barcodeText
:
e
.
target
.
value
})
}
getBarcodeInput
(){
return
(
<
div
className=
{
"barcodeInputDom"
}
>
<
div
className=
{
"barcodeInputText font30"
}
>
{
this
.
state
.
barcodeErrorText
}
</
div
>
<
input
value=
{
this
.
state
.
barcodeText
}
className=
{
"barcodeInput font30 col000"
}
type=
"text"
onChange=
{
this
.
handleInputChange
.
bind
(
this
)
}
/>
<
div
className=
{
"barcodeInputTip font30 colff775c"
}
onClick=
{
()
=>
this
.
changeShowInput
()
}
><
span
className=
{
"colfff"
}
>
or
</
span
>
条形码扫描
</
div
>
<
Button
btnContainer=
{
"barcodeInputBarcode font32 backff775c colfff"
}
key=
{
"barcodeInputBarcode"
}
text=
{
"确定"
}
option=
{
this
.
submitBarcode
}
/>
</
div
>
)
}
/**
* 扫描错误商品(后台返回)
*/
wrongQrcode
(){
//拿错货品
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32"
}
key=
{
"recoveryContainerWrongQrcode"
}
style=
{
{
marginTop
:
'10%'
}
}
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
});
}
correctQrcode
(){
let
{
showPopup
}
=
this
.
props
;
let
popDom
=
this
.
getPopInfo
();
showPopup
({
popupChild
:
popDom
});
}
/**
* 条形码扫描完毕
*/
makeSureScanOver
(){
//确认扫描完毕
let
{
hidePopup
}
=
this
.
props
;
hidePopup
()
}
/**
* 条形码提交失败,前台判断
*/
failSubmit
(){
this
.
setState
({
barcodeText
:
''
},()
=>
{
this
.
props
.
hidePopup
()
})
}
/**
* 提交条形码
*/
submitBarcode
(){
//提交条形码信息
let
barcodeText
=
this
.
state
.
barcodeText
;
let
{
showPopup
,
getBarCodeProductInfo
,
headerInfo
}
=
this
.
props
;
let
{
taskList
=
{}}
=
headerInfo
;
if
(
barcodeText
){
barcodeText
=
barcodeText
.
trim
();
if
(
this
.
checkNumber
(
barcodeText
)){
console
.
log
(
"submitBarcode "
,
barcodeText
);
console
.
log
(
"submitBarcode "
,
taskList
);
console
.
log
(
"submitBarcode "
,
taskList
.
barcode
);
this
.
setState
({
barcodeErrorText
:
''
});
if
(
taskList
.
barcode
&&
parseInt
(
barcodeText
)
===
parseInt
(
taskList
.
barcode
)){
this
.
correctQrcode
()
}
else
{
this
.
wrongQrcode
()
}
}
else
{
//提示条形码不正确
this
.
setState
({
barcodeErrorText
:
'条形码输入错误,请重新输入'
})
}
}
else
{
//提示输入条形码
this
.
setState
({
barcodeErrorText
:
'请输入条形码'
})
}
}
/**
* 验证条形码结果是否为纯数字
* @param str
* @returns {boolean}
*/
checkNumber
(
str
){
let
reg
=
/^
[
0-9
]
*$/
;
return
reg
.
test
(
str
);
}
/**
* 调用扫描条形码
* @returns {*}
*/
getScanDom
(){
let
{
headerInfo
}
=
this
.
props
;
let
{
taskList
=
{}}
=
headerInfo
;
return
(
<
div
className=
{
"recoveryScanDom"
}
>
<
div
className=
{
"colfff font30 scanText"
}
>
目标回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
taskList
.
targetNum
||
0
}
</
span
>
已回收数量:
<
span
className=
{
"font40 colff775c"
}
>
{
taskList
.
recoverNum
||
0
}
</
span
></
div
>
<
div
className=
{
"colff775c scanTips font30"
}
onClick=
{
()
=>
this
.
changeShowInput
()
}
><
span
className=
{
"colfff font26"
}
>
or
</
span
>
手动输入条形码
</
div
>
<
div
className=
{
"colfff scanInfo font30"
}
>
<
span
>
货道信息:
{
taskList
.
position
||
''
}
</
span
>
<
span
>
货道编号:
{
taskList
.
positionNum
||
''
}
</
span
>
<
span
>
货物条形码:
{
taskList
.
barcode
||
''
}
</
span
>
</
div
>
</
div
>
)
}
/**
* 条形码扫描和输入框切换
*/
changeShowInput
(){
this
.
setState
({
showInput
:
!
this
.
state
.
showInput
,
barcodeText
:
""
})
}
render
(){
let
props
=
this
.
props
;
let
{
headerInfo
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
return
(
<
div
className=
{
"replenishScanPage"
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
backgroundColor
:
'#000'
}
}
>
<
Header
showHeader=
{
CONFIG
.
headerStatus
[
2
]
}
>
{
this
.
getOtherHeader
()
}
</
Header
>
{
this
.
state
.
showInput
?
this
.
getBarcodeInput
()
:
this
.
getScanDom
()
}
</
div
>
)
}
}
client/components/RecoveryComponent/RecoveryScanPage/index.css
0 → 100644
View file @
c963de04
.barcodeInputDom
{
text-align
:
center
;
margin-top
:
133px
;
}
.barcodeInputDom
.barcodeInputText
{
color
:
#d0021b
;
line-height
:
90px
;
}
.barcodeInputDom
.barcodeInput
{
border
:
2px
solid
#9b9b9b
;
border-radius
:
20px
;
width
:
540px
;
height
:
80px
;
line-height
:
80px
;
background-color
:
#ffffff
;
text-align
:
center
;
}
.barcodeInputDom
.barcodeInputTip
{
line-height
:
90px
;
}
.barcodeInputDom
.barcodeInputTip
>
span
{
margin-right
:
30px
;
}
.barcodeInputDom
.barcodeInputBarcode
{
border
:
none
;
display
:
inline-block
;
margin-top
:
110px
;
}
.replenishScanPageErrorSku
.handleForgetSku
{
line-height
:
90px
;
}
.replenishScanPageErrorSku
.btn
{
flex-direction
:
column
;
align-items
:
center
;
}
.replenishScanPageForgetSku
.replenishSkuInfo
{
margin-top
:
8%
;
}
.recoveryScanDom
{
position
:
relative
;
width
:
100%
;
height
:
90%
;
text-align
:
center
;
}
.recoveryScanDom
>
div
{
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.recoveryScanDom
.scanText
{
top
:
8%
;
}
.recoveryScanDom
.scanTips
{
top
:
80%
;
}
.recoveryScanDom
.scanTips
>
span
{
margin-right
:
20px
;
}
.recoveryScanDom
.scanInfo
{
top
:
90%
;
width
:
100%
;
white-space
:
nowrap
;
}
.recoveryScanDom
.scanInfo
>
span
{
margin-right
:
30px
;
}
.recoveryScanDom
.scanInfo
>
span
:last-child
{
margin-right
:
0
;
}
\ No newline at end of file
client/components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage.jsx
View file @
c963de04
...
@@ -7,9 +7,6 @@ export default class RecoverySecondPage extends React.Component{
...
@@ -7,9 +7,6 @@ export default class RecoverySecondPage extends React.Component{
constructor
(
props
){
constructor
(
props
){
super
(
props
);
super
(
props
);
this
.
scanQrcode
=
this
.
scanQrcode
.
bind
(
this
);
//扫码回收
this
.
scanQrcode
=
this
.
scanQrcode
.
bind
(
this
);
//扫码回收
this
.
wrongQrcode
=
this
.
wrongQrcode
.
bind
(
this
);
//扫描错误商品
this
.
correctQrcode
=
this
.
correctQrcode
.
bind
(
this
);
//扫描正确商品
this
.
putSkuToBox
=
this
.
putSkuToBox
.
bind
(
this
);
//将商品放入回收箱
this
.
wrongSku
=
this
.
wrongSku
.
bind
(
this
);
//完成回收箱商品回收
this
.
wrongSku
=
this
.
wrongSku
.
bind
(
this
);
//完成回收箱商品回收
this
.
uploadWrongSku
=
this
.
uploadWrongSku
.
bind
(
this
);
//货品不符上报
this
.
uploadWrongSku
=
this
.
uploadWrongSku
.
bind
(
this
);
//货品不符上报
this
.
state
=
{
this
.
state
=
{
...
@@ -20,43 +17,10 @@ export default class RecoverySecondPage extends React.Component{
...
@@ -20,43 +17,10 @@ export default class RecoverySecondPage extends React.Component{
}
}
}
}
getPopInfo
(){
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32 backff775c colfff"
}
key=
{
"recoveryContainerCorrectQrcode"
}
text=
{
"已放入"
}
option=
{
this
.
putSkuToBox
}
/>
return
(
<
PopModel
popupTitle=
{
"货品匹配成功"
}
classContainer=
{
"recoveryPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-correct font150 col27ce61"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
请将货品放入回收箱
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>
)
}
wrongQrcode
(){
//拿错货品
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"recoveryContainerQrcode font32"
}
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
});
}
wrongSku
(){
wrongSku
(){
//货道商品不符
//货道商品不符
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"recoveryPopInfoWrongSkuBtn1 font32"
}
key=
{
"recoveryContainerShelfWrong1"
}
style=
{
{
'width'
:
"100%"
}
}
text=
{
"货品不符"
}
option=
{
this
.
uploadWrongSku
}
/>
let
btnDom1
=
<
Button
btnContainer=
{
"recoveryPopInfoWrongSkuBtn1 font32"
}
key=
{
"recoveryContainerShelfWrong1"
}
text=
{
"货品不符"
}
option=
{
this
.
uploadWrongSku
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"recoveryPopInfoWrongSkuBtn2 backff775c colfff font32"
}
key=
{
"recoveryContainerShelfWrong2"
}
text=
{
"关闭窗口"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"recoveryPopInfoWrongSkuBtn2 backff775c colfff font32"
}
key=
{
"recoveryContainerShelfWrong2"
}
text=
{
"关闭窗口"
}
option=
{
hidePopup
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"遇到问题-货品不符"
}
classContainer=
{
"recoveryPopInfo"
}
>
<
PopModel
popupTitle=
{
"遇到问题-货品不符"
}
classContainer=
{
"recoveryPopInfo"
}
>
...
@@ -72,25 +36,16 @@ export default class RecoverySecondPage extends React.Component{
...
@@ -72,25 +36,16 @@ export default class RecoverySecondPage extends React.Component{
showPopup
({
popupChild
:
popDom
});
showPopup
({
popupChild
:
popDom
});
}
}
correctQrcode
(){
let
{
showPopup
}
=
this
.
props
;
let
popDom
=
this
.
getPopInfo
();
showPopup
({
popupChild
:
popDom
});
}
putSkuToBox
(){
//调取接口,将商品放入回收箱
}
uploadWrongSku
(){
uploadWrongSku
(){
//货品不符上报
//货品不符上报
this
.
props
.
wrongShelf
(
);
this
.
props
.
uploadError
(
CONFIG
.
taskErrorType
.
WRONG_SKU
);
}
}
scanQrcode
(){
scanQrcode
(){
//扫码回收
//扫码回收
this
.
props
.
finishBoxRecovery
();
this
.
props
.
beginScan
(
3
)
}
}
...
@@ -105,7 +60,7 @@ export default class RecoverySecondPage extends React.Component{
...
@@ -105,7 +60,7 @@ export default class RecoverySecondPage extends React.Component{
<
SkuInfoComponent
style=
{
{
'display'
:
'flex'
}
}
skuInfo=
{
headerInfo
.
taskList
||
{}
}
/>
<
SkuInfoComponent
style=
{
{
'display'
:
'flex'
}
}
skuInfo=
{
headerInfo
.
taskList
||
{}
}
/>
<
div
className=
{
"btn"
}
>
<
div
className=
{
"btn"
}
>
<
Button
btnContainer=
{
"recoverySecondPageBtn font32 colfff"
}
key=
{
"RecoverySecondPageBtn"
}
text=
{
'扫码回收'
}
option=
{
this
.
scanQrcode
}
/>
<
Button
btnContainer=
{
"recoverySecondPageBtn font32 colfff"
}
key=
{
"RecoverySecondPageBtn"
}
text=
{
'扫码回收'
}
option=
{
this
.
scanQrcode
}
/>
<
div
className=
{
"text colff775c font28"
}
onClick=
{
()
=>
this
.
wrong
Qrcode
()
}
>
货品不符?
</
div
>
<
div
className=
{
"text colff775c font28"
}
onClick=
{
()
=>
this
.
wrong
Sku
()
}
>
货品不符?
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
client/config/index.js
View file @
c963de04
import
swiperContainers
from
'./swiperContainer'
import
swiperContainers
from
'./swiperContainer'
import
showPage
from
'./showPage'
import
showPage
from
'./showPage'
import
socketType
from
'./socketType'
import
socketType
from
'./socketType'
import
taskErrorType
from
'./taskErrorType'
module
.
exports
=
{
swiperContainers
,...
showPage
,
socketType
}
module
.
exports
=
{
swiperContainers
,...
showPage
,
socketType
,
taskErrorType
}
\ No newline at end of file
\ No newline at end of file
client/config/taskErrorType.js
View file @
c963de04
//异常类型("SU"货道不符 ,"SLT"货品少拿 ,"SUM"货品种类不符,"SF"货道已满)
//异常类型("SU"货道不符 ,"SLT"货品少拿 ,"SUM"货品种类不符,"SF"货道已满)
const
errorType
=
{
const
errorType
=
{
SU
:
'SU'
,
WRONG_SKU
:
'SU'
,
//回收 货品不符合
SLT
:
'SLT'
,
SLT
:
'SLT'
,
SUM
:
'SUM'
,
SUM
:
'SUM'
,
SF
:
'SF'
SF
:
'SF'
...
...
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
c963de04
...
@@ -16,7 +16,7 @@ export default class HomePageContainer extends React.Component{
...
@@ -16,7 +16,7 @@ export default class HomePageContainer extends React.Component{
render
(){
render
(){
let
props
=
this
.
props
;
let
props
=
this
.
props
;
let
{
headerInfo
}
=
props
;
let
{
headerInfo
=
{}
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
let
{
taskInfo
=
{}}
=
headerInfo
;
let
buttonStyle
=
{
background
:
'#ff775c'
,
margin
:
"0 auto"
,
marginTop
:
'77px'
};
let
buttonStyle
=
{
background
:
'#ff775c'
,
margin
:
"0 auto"
,
marginTop
:
'77px'
};
return
(
return
(
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
c963de04
...
@@ -3,7 +3,7 @@ import React from 'react'
...
@@ -3,7 +3,7 @@ import React from 'react'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
hasNoSku
,
getTaskName
}
from
"../../actions/common"
;
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
hasNoSku
,
getTaskName
}
from
"../../actions/common"
;
import
{
finishBoxRecovery
,
wrongShelf
}
from
"../../actions/recovery"
;
import
{
finishBoxRecovery
}
from
"../../actions/recovery"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
,
clearProductSuccess
}
from
"../../actions/ScanBarCode"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
,
clearProductSuccess
}
from
"../../actions/ScanBarCode"
...
@@ -201,22 +201,26 @@ class PageContainer extends React.Component {
...
@@ -201,22 +201,26 @@ class PageContainer extends React.Component {
}
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
let
{
state
,
dispatch
}
=
nextProps
;
let
{
state
,
dispatch
}
=
nextProps
;
console
.
log
(
"pagecontainer nextProps "
,
nextProps
)
console
.
log
(
"pagecontainer nextProps "
,
Object
.
keys
(
nextProps
))
console
.
log
(
"pagecontainer nextProps "
,
nextProps
.
state
)
console
.
log
(
"pagecontainer nextProps "
,
Object
.
keys
(
nextProps
.
state
))
let
userinfo
=
state
.
userInfo
;
let
userinfo
=
state
.
userInfo
;
let
nowUserInfo
=
this
.
props
.
state
.
userInfo
;
let
nowUserInfo
=
this
.
props
.
state
.
userInfo
;
let
isNotOneUser
=
userinfo
.
employee
&&
userinfo
.
employee
.
id
&&
let
isNotOneUser
=
userinfo
&&
userinfo
.
employee
&&
userinfo
.
employee
.
id
&&
(
!
nowUserInfo
||
!
nowUserInfo
.
employee
||
(
nowUserInfo
.
employee
.
id
!==
userinfo
.
employee
.
id
));
(
!
nowUserInfo
||
!
nowUserInfo
.
employee
||
(
nowUserInfo
.
employee
.
id
!==
userinfo
.
employee
.
id
));
let
isNotOneTask
=
userinfo
.
type
&&
userinfo
.
type
!==
nowUserInfo
.
type
;
let
isNotOneTask
=
userinfo
&&
userinfo
.
type
&&
userinfo
.
type
!==
nowUserInfo
.
type
;
if
(
isNotOneUser
&&
isNotOneTask
){
if
(
isNotOneUser
&&
isNotOneTask
){
//不是同一个用户,并且不是同一个任务
//不是同一个用户,并且不是同一个任务
this
.
dealPageByType
(
userinfo
.
type
);
this
.
dealPageByType
(
userinfo
.
type
);
}
}
if
(
state
.
errMsg
.
errMsg
){
if
(
state
.
errMsg
&&
state
.
errMsg
.
errMsg
){
//有错误信息,弹出错误信息弹窗
//有错误信息,弹出错误信息弹窗
this
.
showError
(
state
.
errMsg
.
errMsg
)
this
.
showError
(
state
.
errMsg
.
errMsg
)
}
}
//根据后台数据控制该显示的页面
//根据后台数据控制该显示的页面
if
(
nextProps
.
state
.
commonInfo
.
taskInfo
){
if
(
nextProps
.
state
.
commonInfo
&&
nextProps
.
state
.
commonInfo
.
taskInfo
){
let
num
=
nextProps
.
state
.
commonInfo
.
taskInfo
.
currentTaskNum
;
let
num
=
nextProps
.
state
.
commonInfo
.
taskInfo
.
currentTaskNum
;
switch
(
num
){
switch
(
num
){
case
1
:
case
1
:
...
@@ -602,15 +606,16 @@ class PageContainer extends React.Component {
...
@@ -602,15 +606,16 @@ class PageContainer extends React.Component {
case showPage[10]:
case showPage[10]:
pages =
<
RecoveryPage
pages =
<
RecoveryPage
headerInfo
=
{
state
.
commonInfo
}
headerInfo
=
{
state
.
commonInfo
}
recoveryInfo
=
{
state
.
recoveryInfo
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
getTaskName=
{
()
=>
dispatch
(
getTaskName
(
3
,
2
))
}
getTaskName=
{
()
=>
dispatch
(
getTaskName
(
3
,
2
))
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
())
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
wrongShelf=
{
()
=>
dispatch
(
wrongShelf
())
}
uploadError=
{
(
exceptionType
)
=>
dispatch
(
uploadError
(
state
.
commonInfo
,
exceptionType
))
}
getBarCodeProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getBarCodeProductInfo
({
barcode
,
commonInfo
:
state
.
commonInfo
}))}
}
/>
;
/>
;
break;
break;
case showPage[11]:
case showPage[11]:
console.log("showPage[11] ",state)
pages =
<
ReplenishContainer
pages =
<
ReplenishContainer
headerInfo
=
{
state
.
commonInfo
}
headerInfo
=
{
state
.
commonInfo
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
...
...
client/containers/RecoveryContainer/RecoveryContainer.jsx
View file @
c963de04
...
@@ -4,23 +4,26 @@ import LeftContainer from '../LeftContainer/LeftContainer';
...
@@ -4,23 +4,26 @@ import LeftContainer from '../LeftContainer/LeftContainer';
import
RightContainer
from
'../RightContainer/RightContainer'
;
import
RightContainer
from
'../RightContainer/RightContainer'
;
import
RecovertyFirstPage
from
'../../components/RecoveryComponent/RecoveryFirstPage/RecoveryFirstPage'
import
RecovertyFirstPage
from
'../../components/RecoveryComponent/RecoveryFirstPage/RecoveryFirstPage'
import
RecoverySecondPage
from
'../../components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage'
import
RecoverySecondPage
from
'../../components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage'
import
RecoveryScanPage
from
'../../components/RecoveryComponent/RecoveryScanPage/RecoveryScanPage'
require
(
'./index.css'
);
require
(
'./index.css'
);
const
recoveryPageIndex
=
{
const
recoveryPageIndex
=
{
1
:
"boxRecovery"
,
1
:
"getFirstPage"
,
2
:
"shelfRecovery"
2
:
"getSecondPage"
,
3
:
"getScanPage"
}
}
export
default
class
RecoveryContainer
extends
React
.
Component
{
export
default
class
RecoveryContainer
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
showPage
:
recoveryPageIndex
[
1
]
//展示回收箱页面
showPage
:
1
//展示回收箱页面
};
};
this
.
getFirstPage
=
this
.
getFirstPage
.
bind
(
this
);
//展示第一页
this
.
getFirstPage
=
this
.
getFirstPage
.
bind
(
this
);
//展示第一页
this
.
getSecondPage
=
this
.
getSecondPage
.
bind
(
this
);
//展示第二页
this
.
getSecondPage
=
this
.
getSecondPage
.
bind
(
this
);
//展示第二页
this
.
getPage
=
this
.
getPage
.
bind
(
this
);
//获取要展示的页面
this
.
getPage
=
this
.
getPage
.
bind
(
this
);
//获取要展示的页面
this
.
finishBoxRecovery
=
this
.
finishBoxRecovery
.
bind
(
this
);
//完成回收箱商品回收
this
.
finishBoxRecovery
=
this
.
finishBoxRecovery
.
bind
(
this
);
//完成回收箱商品回收
this
.
setPage
=
this
.
setPage
.
bind
(
this
);
//完成回收箱商品回收
}
}
componentWillMount
()
{
componentWillMount
()
{
...
@@ -32,13 +35,24 @@ export default class RecoveryContainer extends React.Component{
...
@@ -32,13 +35,24 @@ export default class RecoveryContainer extends React.Component{
console
.
log
(
"没有回收箱物品"
)
console
.
log
(
"没有回收箱物品"
)
//没有回收箱物品
//没有回收箱物品
this
.
setState
({
this
.
setState
({
showPage
:
recoveryPageIndex
[
2
]
showPage
:
2
})
})
}
}
}
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
let
{
hidePopup
,
headerInfo
}
=
nextProps
;
console
.
log
(
"nextProps "
,
nextProps
)
console
.
log
(
"props "
,
this
.
props
)
if
(
this
.
props
.
headerInfo
&&
this
.
props
.
headerInfo
.
taskList
&&
headerInfo
&&
headerInfo
.
taskList
){
let
oldTaskList
=
this
.
props
.
headerInfo
.
taskList
;
let
taskList
=
headerInfo
.
taskList
;
if
(
taskList
.
skuId
!==
oldTaskList
.
skuId
||
(
taskList
.
skuId
===
oldTaskList
.
skuId
&&
taskList
.
recoverNum
!==
oldTaskList
.
recoverNum
)){
hidePopup
();
this
.
finishBoxRecovery
();
}
}
}
}
...
@@ -47,49 +61,58 @@ export default class RecoveryContainer extends React.Component{
...
@@ -47,49 +61,58 @@ export default class RecoveryContainer extends React.Component{
let
props
=
this
.
props
;
let
props
=
this
.
props
;
props
.
getTaskName
()
props
.
getTaskName
()
this
.
setState
({
this
.
setState
({
showPage
:
recoveryPageIndex
[
2
]
showPage
:
2
})
})
}
}
getFirstPage
(){
getFirstPage
(
props
){
return
(
return
(
<
RecovertyFirstPage
finishBoxRecovery=
{
()
=>
this
.
finishBoxRecovery
()
}
/>
<
RecovertyFirstPage
finishBoxRecovery=
{
()
=>
this
.
finishBoxRecovery
()
}
/>
)
)
}
}
getSecondPage
(){
getSecondPage
(
props
){
let
props
=
this
.
props
;
return
(
return
(
<
RecoverySecondPage
{
...
props
}
/>
<
RecoverySecondPage
{
...
props
}
beginScan=
{
this
.
setPage
}
/>
)
)
}
}
getPage
(){
getScanPage
(
props
){
console
.
log
(
"getPage "
,
this
.
state
.
showPage
)
return
(
switch
(
this
.
state
.
showPage
){
<
RecoveryScanPage
{
...
props
}
goBack=
{
this
.
setPage
}
/>
case
recoveryPageIndex
[
1
]:
)
return
this
.
getFirstPage
();
case
recoveryPageIndex
[
2
]:
return
this
.
getSecondPage
();
}
}
setPage
(
page
){
this
.
setState
({
showPage
:
page
})
}
getPage
(
type
){
return
(
props
)
=>
this
[
recoveryPageIndex
[
type
]](
props
)
}
}
render
(){
render
(){
let
dom
=
this
.
getPage
();
let
props
=
this
.
props
;
let
props
=
this
.
props
;
let
dom
=
this
.
getPage
(
this
.
state
.
showPage
)(
props
);
return
(
return
(
<
div
className=
{
"recoveryContainer page"
}
>
<
div
className=
{
"recoveryContainer page"
}
>
{
{
this
.
state
.
showPage
===
3
?
this
.
getScanPage
(
props
)
:
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
>
{
props
.
headerInfo
&&
props
.
headerInfo
.
storeInfo
?
props
.
headerInfo
&&
props
.
headerInfo
.
storeInfo
?
<
Header
headerInfo=
{
props
.
headerInfo
}
/>
:
null
<
Header
headerInfo=
{
props
.
headerInfo
}
/>
:
null
}
}
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
LeftContainer
leftInfo=
{
props
.
headerInfo
}
/>
<
RightContainer
>
<
RightContainer
>
{
{
dom
}
dom
}
</
RightContainer
>
</
RightContainer
>
</
div
>
</
div
>
}
</
div
>
)
)
}
}
}
}
client/containers/RecoveryContainer/index.css
View file @
c963de04
...
@@ -12,8 +12,10 @@
...
@@ -12,8 +12,10 @@
position
:
relative
;
position
:
relative
;
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
}
.recoveryPopInfo
.btn
.recoveryContainerQrcode
{
.recoveryPopInfo
.btn
>
div
:nth-child
(
2
)
{
display
:
inline-block
;
margin-top
:
5%
;
margin-top
:
10%
;
}
}
\ No newline at end of file
client/containers/ReplenishContainer/ReplenishContainer.jsx
View file @
c963de04
...
@@ -101,7 +101,7 @@ export default class ReplenishContainer extends React.Component{
...
@@ -101,7 +101,7 @@ export default class ReplenishContainer extends React.Component{
console
.
log
(
"render "
,
this
.
state
.
pageType
,
this
.
state
.
showScanQrcode
);
console
.
log
(
"render "
,
this
.
state
.
pageType
,
this
.
state
.
showScanQrcode
);
let
props
=
this
.
props
;
let
props
=
this
.
props
;
return
(
return
(
<
div
className=
{
"replenishContainer"
}
>
<
div
className=
{
"replenishContainer
page
"
}
>
{
{
this
.
state
.
showScanQrcode
?
this
.
state
.
showScanQrcode
?
<
ReplenishScanPage
{
...
props
}
goBack=
{
this
.
goBack
}
/>
:
<
ReplenishScanPage
{
...
props
}
goBack=
{
this
.
goBack
}
/>
:
...
...
client/reducers/common.js
View file @
c963de04
import
actionTypes
from
'../actiontype/common'
;
import
actionTypes
from
'../actiontype/common'
;
const
saveCommonInfo
=
(
s
tate
,
data
)
=>
{
const
saveCommonInfo
=
(
newS
tate
,
data
)
=>
{
let
keys
=
Object
.
keys
(
data
);
let
keys
=
Object
.
keys
(
data
);
let
state
=
JSON
.
parse
(
JSON
.
stringify
(
newState
))
keys
.
forEach
(
k
=>
keys
.
forEach
(
k
=>
{
{
if
(
state
[
k
]){
if
(
state
[
k
]){
...
@@ -16,7 +17,7 @@ const saveCommonInfo = (state,data)=>{
...
@@ -16,7 +17,7 @@ const saveCommonInfo = (state,data)=>{
state
[
k
]
=
data
[
k
]
state
[
k
]
=
data
[
k
]
}
}
});
});
return
Object
.
assign
({},
state
)
;
return
Object
.
assign
({},
state
)
};
};
const
emptyCommInfo
=
(
state
,
data
)
=>
{
const
emptyCommInfo
=
(
state
,
data
)
=>
{
...
...
client/reducers/index.js
View file @
c963de04
...
@@ -11,6 +11,7 @@ import errMsg from './error' //上报异常
...
@@ -11,6 +11,7 @@ import errMsg from './error' //上报异常
import
commonInfo
from
'./common'
//上报异常
import
commonInfo
from
'./common'
//上报异常
import
barcodeCommon
from
'./barcodeCommon'
import
barcodeCommon
from
'./barcodeCommon'
import
replenishInfo
from
'./replenish'
import
replenishInfo
from
'./replenish'
import
recoveryInfo
from
'./recovery'
export
default
combineReducers
({
export
default
combineReducers
({
troubleList
,
troubleList
,
storeInfo
,
storeInfo
,
...
@@ -23,7 +24,8 @@ export default combineReducers({
...
@@ -23,7 +24,8 @@ export default combineReducers({
errMsg
,
errMsg
,
commonInfo
,
commonInfo
,
barcodeCommon
,
barcodeCommon
,
replenishInfo
replenishInfo
,
recoveryInfo
})
})
...
...
client/reducers/replenish.js
View file @
c963de04
...
@@ -5,7 +5,7 @@ const setErrorInfo = (state,errorInfo)=>{
...
@@ -5,7 +5,7 @@ const setErrorInfo = (state,errorInfo)=>{
return
Object
.
assign
({},
state
,{
errorInfo
});
return
Object
.
assign
({},
state
,{
errorInfo
});
};
};
const
emptyErrorInfo
=
(
state
)
=>
{
const
emptyErrorInfo
=
(
state
)
=>
{
return
Object
.
assign
({},
state
,{
errorInfo
:
null
})
return
Object
.
assign
({},
state
,{
errorInfo
:
{}
})
}
}
export
default
function
(
state
=
{},
action
)
{
export
default
function
(
state
=
{},
action
)
{
...
...
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