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
d65e7cd5
Commit
d65e7cd5
authored
Nov 02, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 2071
parent
38ba5926
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
5 deletions
+77
-5
client/actions/barcodeCommon.js
+18
-3
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
+59
-2
No files found.
client/actions/barcodeCommon.js
View file @
d65e7cd5
...
@@ -22,6 +22,21 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -22,6 +22,21 @@ const getBarCodeProductInfo = (data)=>{
.
then
((
json
)
=>
{
.
then
((
json
)
=>
{
if
(
!
json
.
meta
.
success
&&!
json
.
data
){
if
(
!
json
.
meta
.
success
&&!
json
.
data
){
dispatch
(
saveProductInfo
(
json
.
meta
))
dispatch
(
saveProductInfo
(
json
.
meta
))
switch
(
taskInfo
.
currentTaskType
){
case
3
:
//回收任务
break
;
case
'ADDR'
:
//补货任务
let
errorType
=
"WrongBarcode"
;
let
errorMessage
=
json
.
meta
.
message
;
let
errorInfo
=
{
errorType
:
errorType
,
errorMessage
:
json
.
meta
.
message
};
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
break
;
}
}
else
{
}
else
{
if
(
json
.
meta
.
success
&&
json
.
data
){
if
(
json
.
meta
.
success
&&
json
.
data
){
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
...
@@ -36,7 +51,7 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -36,7 +51,7 @@ const getBarCodeProductInfo = (data)=>{
break
;
break
;
case
'ADDR'
:
case
'ADDR'
:
//补货任务
//补货任务
let
errorType
=
json
.
data
&&
json
.
data
.
errorType
?
json
.
data
.
errorType
:
""
;
let
errorType
=
json
.
data
&&
json
.
data
.
errorType
?
json
.
data
.
errorType
:
"
WrongBarcode
"
;
let
errorMessage
=
json
.
meta
.
message
;
let
errorMessage
=
json
.
meta
.
message
;
switch
(
errorType
){
switch
(
errorType
){
case
"NT"
:
case
"NT"
:
...
@@ -53,8 +68,8 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -53,8 +68,8 @@ const getBarCodeProductInfo = (data)=>{
break
;
break
;
}
}
let
errorInfo
=
{
let
errorInfo
=
{
errorType
:
errorType
,
errorType
,
errorMessage
:
errorMessage
errorMessage
};
};
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
break
;
break
;
...
...
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
View file @
d65e7cd5
...
@@ -58,12 +58,20 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -58,12 +58,20 @@ export default class ReplenishScanPage extends React.Component{
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
case
"NT"
:
case
"NT"
:
//不在本次
this
.
outReplenish
.
call
(
this
);
break
;
case
"NA"
:
case
"NA"
:
this
.
outReplenish
();
//不在本区
this
.
outAreaReplenish
.
call
(
this
);
break
;
break
;
case
"NS"
:
case
"NS"
:
this
.
errorSku
();
this
.
errorSku
();
break
;
break
;
case
"WrongBarcode"
:
this
.
onWrongBarcode
.
call
(
this
);
break
;
}
}
}
else
{
}
else
{
//没有错误类型的错误
//没有错误类型的错误
...
@@ -176,12 +184,21 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -176,12 +184,21 @@ export default class ReplenishScanPage extends React.Component{
barcodeText
:
e
.
target
.
value
barcodeText
:
e
.
target
.
value
})
})
}
}
handleFocus
(){
if
(
this
.
state
.
barcodeErrorText
){
this
.
setState
({
barcodeErrorText
:
''
,
barcodeText
:
""
})
}
}
getBarcodeInput
(){
getBarcodeInput
(){
return
(
return
(
<
div
className=
{
"replenishScanBarcodeInputDom"
}
>
<
div
className=
{
"replenishScanBarcodeInputDom"
}
>
<
div
className=
{
"barcodeInputText font30"
}
>
{
this
.
state
.
barcodeErrorText
}
</
div
>
<
div
className=
{
"barcodeInputText font30"
}
>
{
this
.
state
.
barcodeErrorText
}
</
div
>
<
input
value=
{
this
.
state
.
barcodeText
}
className=
{
"barcodeInput font30 col000"
}
type=
"text"
onChange=
{
this
.
handleInputChange
.
bind
(
this
)
}
/>
<
input
value=
{
this
.
state
.
barcodeText
}
className=
{
"barcodeInput font30 col000"
}
onFocus=
{
this
.
handleFocus
.
bind
(
this
)
}
type=
"text"
onChange=
{
this
.
handleInputChange
.
bind
(
this
)
}
/>
<
div
className=
{
"barcodeInputTip font30 colff775c"
}
onClick=
{
()
=>
this
.
changeShowInput
()
}
><
span
className=
{
"colfff"
}
>
or
</
span
>
条形码扫描
</
div
>
<
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
}
/>
<
Button
btnContainer=
{
"barcodeInputBarcode font32 backff775c colfff"
}
key=
{
"barcodeInputBarcode"
}
text=
{
"确定"
}
option=
{
this
.
submitBarcode
}
/>
</
div
>
</
div
>
...
@@ -248,6 +265,46 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -248,6 +265,46 @@ export default class ReplenishScanPage extends React.Component{
showPopup
({
popupChild
:
popDom
});
showPopup
({
popupChild
:
popDom
});
}
}
//不在本区补货范围
outAreaReplenish
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
,
headerInfo
}
=
this
.
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
console
.
log
(
"不在本区补货范围 "
,
taskInfo
);
let
btnDom
=
<
Button
btnContainer=
{
"replenishContainerQrcode font32 backff775c colfff"
}
key=
{
"replenishContainerWrongQrcode"
}
text=
{
"关闭"
}
option=
{
this
.
hidePop
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-wrong font150 colf00"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
此货品不在
{
taskInfo
.
area
||
""
}
区补货范围内,请放入物流回收箱!
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
//条形码错误
onWrongBarcode
(){
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"replenishContainerQrcode font32 backff775c colfff"
}
key=
{
"replenishContainerWrongQrcode"
}
text=
{
"关闭"
}
option=
{
this
.
hidePop
}
/>
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-wrong font150 colf00"
}
/>
<
div
className=
{
"text font40 col000"
}
>
<
p
>
条形码错误!
</
p
>
</
div
>
<
div
className=
{
"btn"
}
>
{
btnDom
}
</
div
>
</
PopModel
>;
showPopup
({
popupChild
:
popDom
});
}
getSkuInfo
(){
getSkuInfo
(){
let
{
headerInfo
}
=
this
.
props
;
let
{
headerInfo
}
=
this
.
props
;
let
{
taskList
=
{}}
=
headerInfo
;
let
{
taskList
=
{}}
=
headerInfo
;
...
...
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