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
7d4cff60
Commit
7d4cff60
authored
Sep 12, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试 TakeStokeContainer
parent
26b90deb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
9 deletions
+47
-9
client/containers/PageContainer/PageContainer.jsx
+1
-1
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
+31
-5
client/mock/data/tokeStoke.json
+11
-0
client/mock/index.js
+4
-3
No files found.
client/containers/PageContainer/PageContainer.jsx
View file @
7d4cff60
...
...
@@ -59,7 +59,7 @@ class PageContainer extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
showPage
:
showPage
[
10
],
showPage
:
showPage
[
6
],
lastPage
:
''
,
page
:
null
,
popupInfo
:
defaultPopupInfo
,
...
...
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
View file @
7d4cff60
...
...
@@ -6,11 +6,15 @@ import {headerStatus} from '../../config/showPage'
require
(
'./index.css'
)
class
TakeStokeContaniner
extends
React
.
Component
{
constructor
(
props
){
super
(
props
)
super
(
props
);
this
.
state
=
{
initNum
:
0
}
}
render
(){
let
{
initNum
}
=
this
.
state
;
return
(
<
div
className=
{
'TokeStokeContainer'
}
>
<
HeaderComponent
headerStatus=
{
headerStatus
[
1
]
}
/>
...
...
@@ -29,9 +33,9 @@ class TakeStokeContaniner extends React.Component {
<
div
className=
{
'numAdd'
}
>
<
p
>
数
量:
</
p
>
<
p
>
<
span
>
-
</
span
>
<
span
>
0
</
span
>
<
span
>
+
</
span
>
<
span
onClick=
{
this
.
reduceNum
.
bind
(
this
,
'dis'
)
}
>
-
</
span
>
<
span
>
{
initNum
}
</
span
>
<
span
onClick=
{
this
.
reduceNum
.
bind
(
this
,
'add'
)
}
>
+
</
span
>
</
p
>
</
div
>
</
div
>
...
...
@@ -52,11 +56,32 @@ class TakeStokeContaniner extends React.Component {
<
img
src=
""
alt=
""
/>
</
div
>
</
div
>
<
div
className=
{
"toknStokeSubmit"
}
><
button
>
提交
</
button
></
div
>
<
div
className=
{
"toknStokeSubmit"
}
><
button
onClick=
{
this
.
submitNum
}
>
提交
</
button
></
div
>
</
div
>
</
RightContainer
>
</
div
>
)
}
//控制货道内商品数量的加减
reduceNum
(
str
){
let
{
initNum
}
=
this
.
state
;
if
(
str
===
"add"
){
initNum
++
;
this
.
setState
({
initNum
})
}
else
{
if
(
initNum
>
0
){
initNum
--
;
}
this
.
setState
({
initNum
})
}
}
submitNum
(){
}
}
export
default
TakeStokeContaniner
\ No newline at end of file
client/mock/data/tokeStoke.json
0 → 100644
View file @
7d4cff60
{
"area"
:
"A区"
,
"position"
:
"1号柜"
,
"positionNum"
:
"13-2-6-3"
,
"filePath"
:
"././"
,
"id"
:
"231"
,
"name"
:
"雪碧"
,
"skuId"
:
"123"
,
"initNum"
:
0
}
\ No newline at end of file
client/mock/index.js
View file @
7d4cff60
import
Mock
from
'mockjs'
Mock
.
mock
(
'
'
,(
)
=>
{
import
data
from
'./data/TokeStoke.json'
Mock
.
mock
(
'
/pandian'
,(
req
,
res
)
=>
{
return
data
})
export
default
Mock
\ 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