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
1f6c7f23
Commit
1f6c7f23
authored
Sep 19, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调了一下 breakageContainer
parent
7b8b5cd0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
34 deletions
+83
-34
client/actions/barcodeCommon.js
+9
-5
client/actiontype/breakageContainer.js
+0
-5
client/components/BreakageComponent/BreakageCode/BreakageCode.jsx
+24
-12
client/components/BreakageComponent/BreakageCode/index.css
+28
-0
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
+11
-4
client/containers/BreakageContainer/BreakageConatiner.jsx
+7
-4
client/containers/PageContainer/PageContainer.jsx
+4
-3
client/reducers/BreakageContainer.js
+0
-0
client/reducers/barcodeCommon.js
+0
-1
No files found.
client/actions/barcodeCommon.js
View file @
1f6c7f23
...
@@ -30,9 +30,13 @@ const changeTaskStatus = (data)=>{
...
@@ -30,9 +30,13 @@ const changeTaskStatus = (data)=>{
//test 输入条形码获取商品信息
//test 输入条形码获取商品信息
const
getProductInfo
=
(
data
)
=>
{
const
getBarCodeProductInfo
=
(
data
)
=>
{
let
{
barcode
}
=
data
;
let
{
barcode
,
commonInfo
}
=
data
;
let
url
=
`http://192.168.10.128:8080/web/flat/barcode/1/A/LR/
${
barcode
}
`
// let {taskInfo,storeInfo,userInfo}=commonInfo;
// let storeId=storeInfo.id;
// let {currentTaskType,taskId,area}=taskInfo;
console
.
log
(
barcode
,
commonInfo
,
'这是吴加宝打印的数据'
)
let
url
=
`http://192.168.10.128:8080/web/flat/barcode/13/336/A/LR/
${
barcode
}
`
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
url
,{
fetch
(
url
,{
method
:
'GET'
,
method
:
'GET'
,
...
@@ -53,4 +57,4 @@ const saveProductInfo = (data)=>{
...
@@ -53,4 +57,4 @@ const saveProductInfo = (data)=>{
}
}
}
}
export
{
getProductInfo
}
export
{
getBarCodeProductInfo
}
\ No newline at end of file
\ No newline at end of file
client/actiontype/breakageContainer.js
deleted
100644 → 0
View file @
7b8b5cd0
const
breakActionType
=
{
GETPRODUCTINFO
:
'GETPRODUCTINFO'
}
export
default
breakActionType
\ No newline at end of file
client/components/BreakageComponent/BreakageCode/BreakageCode.jsx
View file @
1f6c7f23
import
React
from
'react'
import
React
from
'react'
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
require
(
'./index.css'
)
class
BreakageCode
extends
React
.
Component
{
class
BreakageCode
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
barcode
:
''
barcode
:
''
,
barcodeWord
:
false
}
}
}
}
render
(){
render
(){
let
{
barcode
}
=
this
.
state
;
let
{
barcode
,
barcodeWord
}
=
this
.
state
;
return
(
return
(
<
div
className=
{
'breakageContent'
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
background
:
'rgba(0,0,0,1)'
,
position
:
'absolute'
}
}
>
<
div
className=
{
'breakageContent'
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
background
:
'rgba(0,0,0,1)'
}
}
>
<
div
className=
{
'breakageHeader'
}
>
<
div
className=
{
"breakageCodeHeader font32 colfff "
}
>
<
span
>
返回
</
span
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
style=
{
{
flexBasis
:
'100px'
}
}
/
>
<
span
>
请输入遗留货
品的条形码
</
span
>
<
span
className=
{
"font40"
}
>
请输入遗留商
品的条形码
</
span
>
<
span
>
条形码残缺?
</
span
>
<
span
className=
{
'font30'
}
>
条形码残缺?
</
span
>
</
div
>
</
div
>
<
div
className=
{
'breakageCodeContent'
}
>
<
div
className=
{
'breakageCodeContent'
}
>
<
p
>
条形码输入错误,请重新输入
</
p
>
{
<
input
type=
"text"
vlaue=
{
barcode
}
onChange=
{
(
ev
)
=>
{
this
.
setState
({
barcode
:
ev
.
target
.
value
})}
}
/>
barcodeWord
?<
p
className=
{
'font30'
}
style=
{
{
color
:
'#d0021b'
,
textAlign
:
'center'
,
marginTop
:
'20px'
}
}
>
条形码输入错误,请重新输入
</
p
>:
null
<
p
>
or
<
span
>
条形码扫描
</
span
></
p
>
}
<
input
type=
"text"
className=
{
'font30'
}
vlaue=
{
barcode
}
onChange=
{
(
ev
)
=>
{
this
.
setState
({
barcode
:
ev
.
target
.
value
})}
}
/>
<
p
className=
{
'barcodeScan font30 colfff'
}
>
or
<
span
className=
{
'colff7860'
}
>
条形码扫描
</
span
></
p
>
</
div
>
</
div
>
<
Button
text=
{
'确定'
}
option=
{
this
.
getCodeProduct
.
bind
(
this
)
}
btnContainer=
{
'font30 backff775c colfff'
}
style=
{
{
border
:
'0'
}
}
/>
<
Button
text=
{
'确定'
}
option=
{
this
.
getCodeProduct
.
bind
(
this
)
}
btnContainer=
{
'font30 backff775c colfff'
}
style=
{
{
border
:
'0'
,
margin
:
'0 auto'
,
marginTop
:
'120px'
}
}
/>
</
div
>
</
div
>
)
)
}
}
getCodeProduct
(){
getCodeProduct
(){
let
{
barcode
}
=
this
.
state
;
let
{
barcode
}
=
this
.
state
;
this
.
props
.
getProductInfo
(
barcode
)
//验证输入的条形码是否为空
if
(
barcode
){
this
.
props
.
getBarCodeProductInfo
(
barcode
);
this
.
props
.
changePage
(
2
)
this
.
setState
({
barcodeWord
:
false
})
}
else
{
this
.
setState
({
barcodeWord
:
true
})
}
}
}
}
}
export
default
BreakageCode
;
export
default
BreakageCode
;
\ No newline at end of file
client/components/BreakageComponent/BreakageCode/index.css
View file @
1f6c7f23
.breakageContent
.breakageCodeHeader
{
width
:
100%
;
line-height
:
98px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
text-align
:
center
;
padding
:
0
20px
;
box-sizing
:
border-box
;
}
.breakageContent
.breakageCodeContent
{
text-align
:
center
;
margin-top
:
120px
;
}
.breakageContent
.breakageCodeContent
input
{
width
:
540px
;
height
:
80px
;
border
:
2px
solid
#9b9b9b
;
border-radius
:
10px
;
margin-top
:
20px
;
}
.breakageContent
.breakageCodeContent
.barcodeScan
{
margin-top
:
30px
;
}
.breakageContent
.breakageCodeContent
.barcodeScan
span
{
margin-left
:
15px
;
}
\ No newline at end of file
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
View file @
1f6c7f23
...
@@ -3,11 +3,16 @@ import Button from '../../../components/CommonComponent/ButtonComponent/ButtonCo
...
@@ -3,11 +3,16 @@ import Button from '../../../components/CommonComponent/ButtonComponent/ButtonCo
require
(
'./index.css'
)
require
(
'./index.css'
)
class
BreakageProductDetail
extends
React
.
Component
{
class
BreakageProductDetail
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
)
super
(
props
);
this
}
}
render
(){
render
(){
let
{
breakageProductInfo
}
=
this
.
props
;
return
(
return
(
<
div
>
{
Object
.
keys
(
breakageProductInfo
).
length
>
0
?
<
div
className=
{
'breakageContent'
}
>
<
div
className=
{
'breakageContent'
}
>
<
div
className=
{
'commonPage'
}
>
<
div
className=
{
'commonPage'
}
>
<
div
className=
{
'pageTitle clo333 font40'
}
style=
{
{
marginBottom
:
'20px'
}
}
>
<
div
className=
{
'pageTitle clo333 font40'
}
style=
{
{
marginBottom
:
'20px'
}
}
>
...
@@ -17,10 +22,10 @@ class BreakageProductDetail extends React.Component{
...
@@ -17,10 +22,10 @@ class BreakageProductDetail extends React.Component{
<
div
className=
{
'breakProduct'
}
>
<
div
className=
{
'breakProduct'
}
>
<
div
className=
{
'breakProductInfo'
}
>
<
div
className=
{
'breakProductInfo'
}
>
<
div
className=
{
'breakProductImg'
}
>
<
div
className=
{
'breakProductImg'
}
>
<
img
src=
{
UTILPATH
.
localImg
.
defaultImg
}
alt=
""
/>
<
img
src=
{
breakageProductInfo
.
product
.
skuImage
}
alt=
""
/>
</
div
>
</
div
>
<
div
style=
{
{
marginTop
:
'30px'
,
textAlign
:
'left'
,
marginLeft
:
'10px'
}
}
>
<
div
style=
{
{
marginTop
:
'30px'
,
textAlign
:
'left'
,
marginLeft
:
'10px'
}
}
>
<
h2
className=
{
'col333 font40'
}
style=
{
{
fontWeight
:
'800'
}
}
>
雪碧 250ml
</
h2
>
<
h2
className=
{
'col333 font40'
}
style=
{
{
fontWeight
:
'800'
}
}
>
{
breakageProductInfo
.
product
.
skuName
}
</
h2
>
<
p
className=
{
'col333 font28'
}
style=
{
{
marginTop
:
'20px'
}
}
><
span
>
条形码:
</
span
>
56546213456554
</
p
>
<
p
className=
{
'col333 font28'
}
style=
{
{
marginTop
:
'20px'
}
}
><
span
>
条形码:
</
span
>
56546213456554
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -46,7 +51,9 @@ class BreakageProductDetail extends React.Component{
...
@@ -46,7 +51,9 @@ class BreakageProductDetail extends React.Component{
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
Button
btnContainer=
{
'colfff font30 backff775c'
}
text=
{
'提交'
}
style=
{
{
position
:
'absolute'
,
bottom
:
'120px'
,
left
:
'50%'
,
transform
:
'translate(-50%)'
}
}
/>
<
Button
btnContainer=
{
'colfff font30 backff775c'
}
text=
{
'提交'
}
style=
{
{
position
:
'absolute'
,
bottom
:
'120px'
,
left
:
'50%'
,
transform
:
'translate(-50%)'
}
}
option=
{
{}
}
/>
</
div
>:
null
}
</
div
>
</
div
>
)
)
}
}
...
...
client/containers/BreakageContainer/BreakageConatiner.jsx
View file @
1f6c7f23
...
@@ -30,7 +30,7 @@ class BreakageContainer extends React.Component {
...
@@ -30,7 +30,7 @@ class BreakageContainer extends React.Component {
this
.
getPages
()
this
.
getPages
()
}
}
</
RightContainer
>
</
RightContainer
>
</
div
>:<
BreakageCode
changePage=
{
this
.
changePage
}
get
ProductInfo=
{
this
.
getproductCode
.
bind
(
this
)
}
/>
</
div
>:<
BreakageCode
changePage=
{
this
.
changePage
.
bind
(
this
)
}
getBarCode
ProductInfo=
{
this
.
getproductCode
.
bind
(
this
)
}
/>
}
}
</
div
>
</
div
>
)
)
...
@@ -40,8 +40,10 @@ class BreakageContainer extends React.Component {
...
@@ -40,8 +40,10 @@ class BreakageContainer extends React.Component {
}
}
//改变显示的组件
//改变显示的组件
changePage
(
page
){
changePage
(
page
){
console
.
log
(
page
,
'这是传过来显示那个页面的值'
)
this
.
setState
({
this
.
setState
({
showPage
:
page
showPage
:
page
,
isShow
:
true
})
})
}
}
//切换到扫码的页面
//切换到扫码的页面
...
@@ -61,13 +63,13 @@ class BreakageContainer extends React.Component {
...
@@ -61,13 +63,13 @@ class BreakageContainer extends React.Component {
/>
/>
break
;
break
;
case
2
:
case
2
:
pages
=
<
BreakageProductDetail
/>
pages
=
<
BreakageProductDetail
breakageProductInfo=
{
props
.
breakageProductInfo
}
/>
break
;
break
;
}
}
return
pages
;
return
pages
;
}
}
getproductCode
(
barcode
){
getproductCode
(
barcode
){
this
.
props
.
getProductInfo
(
barcode
)
this
.
props
.
get
BarCode
ProductInfo
(
barcode
)
}
}
}
}
export
default
BreakageContainer
export
default
BreakageContainer
\ No newline at end of file
client/containers/PageContainer/PageContainer.jsx
View file @
1f6c7f23
...
@@ -27,7 +27,7 @@ import TakeStokeContainer from '../TakeStokeContainer/TakeStokeContainer'
...
@@ -27,7 +27,7 @@ import TakeStokeContainer from '../TakeStokeContainer/TakeStokeContainer'
import
BreakageContainer
from
'../BreakageContainer/BreakageConatiner'
import
BreakageContainer
from
'../BreakageContainer/BreakageConatiner'
import
RecoveryPage
from
'../RecoveryContainer/RecoveryContainer'
import
RecoveryPage
from
'../RecoveryContainer/RecoveryContainer'
import
ReplenishContainer
from
'../ReplenishContainer/ReplenishContainer'
import
ReplenishContainer
from
'../ReplenishContainer/ReplenishContainer'
import
{
getProductInfo
}
from
'../../actions/barcodeCommon'
import
{
get
BarCode
ProductInfo
}
from
'../../actions/barcodeCommon'
import
{
getTaskInfo
,
getTaskList
}
from
'../../actions/common'
import
{
getTaskInfo
,
getTaskList
}
from
'../../actions/common'
/*二期引用 end*/
/*二期引用 end*/
...
@@ -57,7 +57,7 @@ class PageContainer extends React.Component {
...
@@ -57,7 +57,7 @@ class PageContainer extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
showPage
:
showPage
[
5
],
showPage
:
showPage
[
13
],
lastPage
:
''
,
lastPage
:
''
,
page
:
null
,
page
:
null
,
popupInfo
:
defaultPopupInfo
,
popupInfo
:
defaultPopupInfo
,
...
@@ -593,7 +593,8 @@ class PageContainer extends React.Component {
...
@@ -593,7 +593,8 @@ class PageContainer extends React.Component {
pages =
<
BreakageContainer
pages =
<
BreakageContainer
pullTaskList=
{
()
=>
{
dispatch
(
hasNoSku
(
state
.
commonInfo
))}
}
pullTaskList=
{
()
=>
{
dispatch
(
hasNoSku
(
state
.
commonInfo
))}
}
headerInfo=
{
state
.
commonInfo
}
headerInfo=
{
state
.
commonInfo
}
getProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getProductInfo
({
barcode
}))}
}
getBarCodeProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getBarCodeProductInfo
({
barcode
,
commonInfo
:
state
.
commonInfo
}))}
}
breakageProductInfo=
{
state
.
barcodeCommon
}
/>
;
/>
;
break;
break;
case showPage[10]:
case showPage[10]:
...
...
client/reducers/BreakageContainer.js
deleted
100644 → 0
View file @
7b8b5cd0
client/reducers/barcodeCommon.js
View file @
1f6c7f23
...
@@ -3,7 +3,6 @@ import barcodeActionType from '../actiontype/barcodeCommon'
...
@@ -3,7 +3,6 @@ import barcodeActionType from '../actiontype/barcodeCommon'
//扫码商品的信息
//扫码商品的信息
const
saveProductInfo
=
(
data
,
content
)
=>
{
const
saveProductInfo
=
(
data
,
content
)
=>
{
console
.
log
(
content
,
'这是吴加宝打印的数据'
)
return
Object
.
assign
({},
data
,{
product
:
content
})
return
Object
.
assign
({},
data
,{
product
:
content
})
}
}
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