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
2740581d
Commit
2740581d
authored
Sep 28, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change breakage&tokeStore
parent
31a78ff8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
18 deletions
+28
-18
client/components/BreakageComponent/BreakageCode/BreakageCode.jsx
+1
-10
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
+6
-0
client/components/BreakageComponent/SanCodeComponent/SanCodeComponent.jsx
+4
-0
client/components/BreakageComponent/defaultComponent/DefaultComponnet.jsx
+2
-0
client/containers/BreakageContainer/BreakageConatiner.jsx
+15
-8
No files found.
client/components/BreakageComponent/BreakageCode/BreakageCode.jsx
View file @
2740581d
import
React
from
'react'
import
React
from
'react'
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
BarcodeComponent
from
'../../CommonComponent/BarcodeComponent/BarcodeComponent'
import
BarcodeComponent
from
'../../CommonComponent/BarcodeComponent/BarcodeComponent'
require
(
'./index.css'
)
require
(
'./index.css'
)
class
BreakageCode
extends
React
.
Component
{
class
BreakageCode
extends
React
.
Component
{
...
@@ -18,18 +17,10 @@ class BreakageCode extends React.Component{
...
@@ -18,18 +17,10 @@ class BreakageCode extends React.Component{
<
BarcodeComponent
getBarCodeProductInfo=
{
this
.
props
.
getBarCodeProductInfo
}
<
BarcodeComponent
getBarCodeProductInfo=
{
this
.
props
.
getBarCodeProductInfo
}
changePage=
{
this
.
props
.
changePage
}
changePage=
{
this
.
props
.
changePage
}
/>
/>
{
/* <div className={'breakageCodeContent'}>
{
barcodeWord?<p className={'font30'} style={{color:'#d0021b',textAlign:'center',marginTop:'20px'}}>条形码输入错误,请重新输入</p>:null
}
<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>
<Button text={'确定'} option={this.getCodeProduct.bind(this)} btnContainer={'font30 backff775c colfff'} style={{border:'0',margin:'0 auto',marginTop:'120px'}} /> */
}
</
div
>
</
div
>
)
)
}
}
//控制显示扫码
changeSanCodePage
(){
changeSanCodePage
(){
this
.
props
.
changeSanCodePage
(
'SanCode'
)
this
.
props
.
changeSanCodePage
(
'SanCode'
)
}
}
...
...
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
View file @
2740581d
...
@@ -86,6 +86,8 @@ class BreakageProductDetail extends React.Component{
...
@@ -86,6 +86,8 @@ class BreakageProductDetail extends React.Component{
</
div
>
</
div
>
)
)
}
}
//改变显示的报损页面
changePageDefault
(){
changePageDefault
(){
let
{
product
}
=
this
.
props
.
breakageProductInfo
;
let
{
product
}
=
this
.
props
.
breakageProductInfo
;
let
{
statusColor
}
=
this
.
state
;
let
{
statusColor
}
=
this
.
state
;
...
@@ -93,9 +95,13 @@ class BreakageProductDetail extends React.Component{
...
@@ -93,9 +95,13 @@ class BreakageProductDetail extends React.Component{
this
.
props
.
submitBreakageProduct
(
productDetail
);
this
.
props
.
submitBreakageProduct
(
productDetail
);
this
.
props
.
changePopShow
(
true
)
this
.
props
.
changePopShow
(
true
)
}
}
//点击添加商品状态选中样式
changeProductStatus
(
key
){
changeProductStatus
(
key
){
this
.
setState
({
statusColor
:
key
})
this
.
setState
({
statusColor
:
key
})
}
}
//点击添加商品位置选中状态
changePositionColor
(
key
){
changePositionColor
(
key
){
this
.
setState
({
positionColor
:
key
})
this
.
setState
({
positionColor
:
key
})
}
}
...
...
client/components/BreakageComponent/SanCodeComponent/SanCodeComponent.jsx
View file @
2740581d
...
@@ -20,9 +20,13 @@ class SanCodeComponent extends React.Component{
...
@@ -20,9 +20,13 @@ class SanCodeComponent extends React.Component{
</
div
>
</
div
>
</
div
>
</
div
>
}
}
//控制隐藏扫码页
changCodePage
(){
changCodePage
(){
this
.
props
.
changeCodePage
(
true
)
this
.
props
.
changeCodePage
(
true
)
}
}
//显示手动输入条形码页
changeSanCodePage
(){
changeSanCodePage
(){
this
.
props
.
changeSanCodePage
(
'HandCode'
)
this
.
props
.
changeSanCodePage
(
'HandCode'
)
}
}
...
...
client/components/BreakageComponent/defaultComponent/DefaultComponnet.jsx
View file @
2740581d
...
@@ -23,6 +23,8 @@ class DefaultComponent extends React.Component{
...
@@ -23,6 +23,8 @@ class DefaultComponent extends React.Component{
</
div
>
</
div
>
)
)
}
}
//控制显示扫码页面并且显示扫码页
skipInputCode
(){
skipInputCode
(){
this
.
props
.
changeCodePage
(
false
);
this
.
props
.
changeCodePage
(
false
);
this
.
props
.
changeSanCodePage
(
'SanCode'
)
this
.
props
.
changeSanCodePage
(
'SanCode'
)
...
...
client/containers/BreakageContainer/BreakageConatiner.jsx
View file @
2740581d
...
@@ -13,10 +13,10 @@ class BreakageContainer extends React.Component {
...
@@ -13,10 +13,10 @@ class BreakageContainer extends React.Component {
constructor
(
props
){
constructor
(
props
){
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
showPage
:
1
,
showPage
:
1
,
//初始显示的页面
isShow
:
true
,
isShow
:
true
,
//控制扫码页的显示隐藏
SanCodePage
:
'SanCode'
,
SanCodePage
:
'SanCode'
,
//控制显示扫码或手动输入
popShow
:
false
popShow
:
false
//控制弹框
}
}
this
.
changePage
=
this
.
changePage
.
bind
(
this
);
this
.
changePage
=
this
.
changePage
.
bind
(
this
);
}
}
...
@@ -53,14 +53,13 @@ class BreakageContainer extends React.Component {
...
@@ -53,14 +53,13 @@ class BreakageContainer extends React.Component {
</
div
>
</
div
>
)
)
}
}
componentDidMount
(){
}
//控制弹框消失
//控制弹框消失
changePopHide
(){
changePopHide
(){
this
.
changePopShow
(
false
)
this
.
changePopShow
(
false
)
this
.
changePage
(
1
)
this
.
changePage
(
1
)
}
}
//改变显示的组件
//改变显示的组件
changePage
(
page
){
changePage
(
page
){
this
.
setState
({
this
.
setState
({
...
@@ -75,12 +74,15 @@ class BreakageContainer extends React.Component {
...
@@ -75,12 +74,15 @@ class BreakageContainer extends React.Component {
isShow
:
bool
isShow
:
bool
})
})
}
}
//根据传入的值判断显示扫码页或手动输入码页
changeSanCodePage
(
CodePage
){
changeSanCodePage
(
CodePage
){
this
.
setState
({
this
.
setState
({
SanCodePage
:
CodePage
SanCodePage
:
CodePage
})
})
}
}
//根据 判断 显示应该显示的组件
//根据判断显示应该显示的组件
getPages
(){
getPages
(){
let
pages
=
null
;
let
pages
=
null
;
let
props
=
this
.
props
;
let
props
=
this
.
props
;
...
@@ -102,6 +104,7 @@ class BreakageContainer extends React.Component {
...
@@ -102,6 +104,7 @@ class BreakageContainer extends React.Component {
}
}
return
pages
;
return
pages
;
}
}
//根据数据显示扫码 还是手动输入条形码
//根据数据显示扫码 还是手动输入条形码
getSanCodePgae
(){
getSanCodePgae
(){
let
{
SanCodePage
}
=
this
.
state
;
let
{
SanCodePage
}
=
this
.
state
;
...
@@ -118,14 +121,18 @@ class BreakageContainer extends React.Component {
...
@@ -118,14 +121,18 @@ class BreakageContainer extends React.Component {
}
}
return
SanPage
;
return
SanPage
;
}
}
//把二维码传给后台
//把二维码传给后台
getproductCode
(
barcode
){
getproductCode
(
barcode
){
this
.
props
.
getBarCodeProductInfo
(
barcode
)
this
.
props
.
getBarCodeProductInfo
(
barcode
)
}
}
//把 商品的详细信息传给后台
//把商品的详细信息传给后台
transmitInfo
(
productDetail
){
transmitInfo
(
productDetail
){
this
.
props
.
submitBreakageProduct
(
productDetail
)
this
.
props
.
submitBreakageProduct
(
productDetail
)
}
}
//控制弹框的显示和隐藏
changePopShow
(
bool
){
changePopShow
(
bool
){
this
.
setState
({
popShow
:
bool
})
this
.
setState
({
popShow
:
bool
})
}
}
...
...
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