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
b8296cba
Commit
b8296cba
authored
Sep 20, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理报损模块
parent
0105a36f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
19 deletions
+41
-19
client/actions/TokeStokeContainer.js
+31
-14
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
+5
-2
client/containers/BreakageContainer/BreakageConatiner.jsx
+4
-2
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
+1
-1
No files found.
client/actions/TokeStokeContainer.js
View file @
b8296cba
import
fetch
from
'isomorphic-fetch'
import
{
SUBMIT_NUM
}
from
'../actiontype/TokeStokeContainer'
//初始的任务 返回工单
fetch
(
url
,{
credentials
:
'include'
,
...
...
@@ -12,16 +13,32 @@ fetch(url,{
.
then
((
data
)
=>
{
console
.
log
(
data
)
}).
catch
(
e
=>
{
console
.
log
(
'err'
+
e
)})
//点击提交后台核对商品数量 后台应该返回我ture 或者 false
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:{}
}).
then
(
response
=>
response
.
json
())
.
then
((
data
)
=>
{
console
.
log
(
data
)
}).
catch
(
e
=>
{
console
.
log
(
'err'
+
e
)})
\ No newline at end of file
//点击提交后台核对商品数量 后台应该返回我ture 或者 false
const
checkProductQuantity
=
(
data
)
=>
{
let
url
=
`http://192.168.10.128:8080/web/flat/barcode`
return
(
dispatch
)
=>
{
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:{}
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
checkQuantity
(
json
)
}).
catch
(
e
=>
{
console
.
log
(
'err'
+
e
)})
}
}
const
checkQuantity
=
(
data
)
=>
{
return
{
type
:
SUBMIT_NUM
,
data
}
}
export
{
checkProductQuantity
}
\ No newline at end of file
client/components/BreakageComponent/BreakageProductDetail/BreakageProductDetail.jsx
View file @
b8296cba
...
...
@@ -4,7 +4,6 @@ require('./index.css')
class
BreakageProductDetail
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
this
}
render
(){
...
...
@@ -51,11 +50,14 @@ class BreakageProductDetail extends React.Component{
</
div
>
</
div
>
</
div
>
<
Button
btnContainer=
{
'colfff font30 backff775c'
}
text=
{
'提交'
}
style=
{
{
position
:
'absolute'
,
bottom
:
'120px'
,
left
:
'50%'
,
transform
:
'translate(-50%)'
}
}
option=
{
{}
}
/>
<
Button
btnContainer=
{
'colfff font30 backff775c'
}
text=
{
'提交'
}
style=
{
{
position
:
'absolute'
,
bottom
:
'120px'
,
left
:
'50%'
,
transform
:
'translate(-50%)'
}
}
option=
{
this
.
changePageDefault
.
bind
(
this
)
}
/>
</
div
>:
null
}
</
div
>
)
}
changePageDefault
(){
this
.
props
.
changePage
(
1
)
}
}
export
default
BreakageProductDetail
\ No newline at end of file
client/containers/BreakageContainer/BreakageConatiner.jsx
View file @
b8296cba
...
...
@@ -40,12 +40,12 @@ class BreakageContainer extends React.Component {
}
//改变显示的组件
changePage
(
page
){
console
.
log
(
page
,
'这是传过来显示那个页面的值'
)
this
.
setState
({
showPage
:
page
,
isShow
:
true
})
}
//切换到扫码的页面
changeCodePage
(
bool
){
this
.
setState
({
...
...
@@ -63,7 +63,9 @@ class BreakageContainer extends React.Component {
/>
break
;
case
2
:
pages
=
<
BreakageProductDetail
breakageProductInfo=
{
props
.
breakageProductInfo
}
/>
pages
=
<
BreakageProductDetail
breakageProductInfo=
{
props
.
breakageProductInfo
}
changePage=
{
this
.
changePage
}
/>
break
;
}
return
pages
;
...
...
client/containers/TakeStokeContainer/TakeStokeContainer.jsx
View file @
b8296cba
...
...
@@ -11,7 +11,7 @@ class TakeStokeContaniner extends React.Component {
super
(
props
);
this
.
state
=
{
showButton
:
true
,
number
:
1
,
number
:
2
,
initNum
:
0
}
}
...
...
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