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
9b9606d3
Commit
9b9606d3
authored
Nov 08, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 breakage
parent
13acee51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
client/components/CommonComponent/BarcodeComponent/BarcodeComponent.jsx
+6
-8
No files found.
client/components/CommonComponent/BarcodeComponent/BarcodeComponent.jsx
View file @
9b9606d3
...
@@ -23,7 +23,7 @@ class BarcodeComponent extends React.Component{
...
@@ -23,7 +23,7 @@ class BarcodeComponent extends React.Component{
{
{
barcodeWord
?<
p
className=
{
'font30'
}
style=
{
{
color
:
'#d0021b'
,
textAlign
:
'center'
,
marginTop
:
'20px'
}
}
>
条形码输入错误,请重新输入
</
p
>:
null
barcodeWord
?<
p
className=
{
'font30'
}
style=
{
{
color
:
'#d0021b'
,
textAlign
:
'center'
,
marginTop
:
'20px'
}
}
>
条形码输入错误,请重新输入
</
p
>:
null
}
}
<
input
type=
"text"
className=
{
'font30'
}
v
la
ue=
{
barcode
}
onChange=
{
(
ev
)
=>
{
this
.
setState
({
barcode
:
ev
.
target
.
value
})}
}
/>
<
input
type=
"text"
className=
{
'font30'
}
v
al
ue=
{
barcode
}
onChange=
{
(
ev
)
=>
{
this
.
setState
({
barcode
:
ev
.
target
.
value
})}
}
/>
<
p
className=
{
'barcodeScan font30 colfff'
}
>
or
<
span
className=
{
'colff7860'
}
>
条形码扫描
</
span
></
p
>
<
p
className=
{
'barcodeScan font30 colfff'
}
>
or
<
span
className=
{
'colff7860'
}
>
条形码扫描
</
span
></
p
>
<
Button
text=
{
'确定'
}
option=
{
this
.
getCodeProduct
.
bind
(
this
)
}
btnContainer=
{
'font30 backff775c colfff'
}
style=
{
{
border
:
'0'
,
margin
:
'0 auto'
,
marginTop
:
'120px'
}
}
/>
<
Button
text=
{
'确定'
}
option=
{
this
.
getCodeProduct
.
bind
(
this
)
}
btnContainer=
{
'font30 backff775c colfff'
}
style=
{
{
border
:
'0'
,
margin
:
'0 auto'
,
marginTop
:
'120px'
}
}
/>
</
div
>
</
div
>
...
@@ -33,25 +33,24 @@ class BarcodeComponent extends React.Component{
...
@@ -33,25 +33,24 @@ class BarcodeComponent extends React.Component{
let
{
barcode
}
=
this
.
state
;
let
{
barcode
}
=
this
.
state
;
let
props
=
this
.
props
;
let
props
=
this
.
props
;
//验证输入的条形码是否为空
//验证输入的条形码是否为空
console
.
log
(
barcode
,
'sakldjklasjkdljasjdajskdjksajl'
)
if
(
barcode
){
if
(
barcode
){
props
.
getBarCodeProductInfo
(
barcode
);
props
.
getBarCodeProductInfo
(
barcode
);
// props.changePage&&props.changePage(2)
// props.changePage&&props.changePage(2)
this
.
setState
({
barcodeWord
:
false
,
barcode
:
''
});
this
.
setState
({
barcodeWord
:
false
,
barcode
:
''
});
}
else
{
}
else
{
this
.
setState
({
barcodeWord
:
true
})
this
.
setState
({
barcodeWord
:
true
,
barcode
:
''
})
}
}
}
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
let
props
=
this
.
props
;
let
props
=
this
.
props
;
if
(
nextProps
.
breakageProductInfo
.
product
&&
nextProps
.
breakageProductInfo
.
product
.
success
!==
false
){
if
(
nextProps
.
breakageProductInfo
.
product
&&
nextProps
.
breakageProductInfo
.
product
.
success
!==
false
){
this
.
setState
({
barcode
:
''
})
props
.
changePage
&&
props
.
changePage
(
2
)
props
.
changePage
&&
props
.
changePage
(
2
)
}
}
}
}
componentDidMount
(){
this
.
setState
({
barcode
:
''
})
}
}
}
export
default
BarcodeComponent
;
export
default
BarcodeComponent
;
\ 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