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
6 years ago
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 2071
parent
38ba5926
Hide 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)=>{
.
then
((
json
)
=>
{
if
(
!
json
.
meta
.
success
&&!
json
.
data
){
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
{
if
(
json
.
meta
.
success
&&
json
.
data
){
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
...
...
@@ -36,7 +51,7 @@ const getBarCodeProductInfo = (data)=>{
break
;
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
;
switch
(
errorType
){
case
"NT"
:
...
...
@@ -53,8 +68,8 @@ const getBarCodeProductInfo = (data)=>{
break
;
}
let
errorInfo
=
{
errorType
:
errorType
,
errorMessage
:
errorMessage
errorType
,
errorMessage
};
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
break
;
...
...
This diff is collapsed.
Click to expand it.
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
View file @
d65e7cd5
...
...
@@ -58,12 +58,20 @@ export default class ReplenishScanPage extends React.Component{
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
case
"NT"
:
//不在本次
this
.
outReplenish
.
call
(
this
);
break
;
case
"NA"
:
this
.
outReplenish
();
//不在本区
this
.
outAreaReplenish
.
call
(
this
);
break
;
case
"NS"
:
this
.
errorSku
();
break
;
case
"WrongBarcode"
:
this
.
onWrongBarcode
.
call
(
this
);
break
;
}
}
else
{
//没有错误类型的错误
...
...
@@ -176,12 +184,21 @@ export default class ReplenishScanPage extends React.Component{
barcodeText
:
e
.
target
.
value
})
}
handleFocus
(){
if
(
this
.
state
.
barcodeErrorText
){
this
.
setState
({
barcodeErrorText
:
''
,
barcodeText
:
""
})
}
}
getBarcodeInput
(){
return
(
<
div
className=
{
"replenishScanBarcodeInputDom"
}
>
<
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
>
<
Button
btnContainer=
{
"barcodeInputBarcode font32 backff775c colfff"
}
key=
{
"barcodeInputBarcode"
}
text=
{
"确定"
}
option=
{
this
.
submitBarcode
}
/>
</
div
>
...
...
@@ -248,6 +265,46 @@ export default class ReplenishScanPage extends React.Component{
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
(){
let
{
headerInfo
}
=
this
.
props
;
let
{
taskList
=
{}}
=
headerInfo
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment