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
101e1cd9
Commit
101e1cd9
authored
Sep 21, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调回收修改BUG
parent
6b8de31b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
19 deletions
+25
-19
client/actions/barcodeCommon.js
+5
-5
client/actions/common.js
+3
-2
client/actions/recovery.js
+5
-4
client/actions/uploadError.js
+4
-4
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
+2
-2
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
+5
-2
client/containers/PageContainer/PageContainer.jsx
+1
-0
No files found.
client/actions/barcodeCommon.js
View file @
101e1cd9
import
fetch
from
'isomorphic-fetch'
import
saveCommonInfo
from
'./common'
import
{
saveCommonInfo
}
from
'./common'
import
barcodeActionType
from
'../actiontype/barcodeCommon'
import
replenishAction
from
'./replenish'
let
domain1
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.
128:8080
/web/'
let
domain
=
'http://192.168.10.
37:8080/maxbox
/web/'
// const changeStatus = (data)=>{
// let {taskId,currentTaskType}=data.taskInfo;
...
...
@@ -49,15 +49,15 @@ const getBarCodeProductInfo = (data)=>{
.
then
((
json
)
=>
{
if
(
json
.
meta
.
success
&&
json
.
data
){
dispatch
(
replenishAction
.
emptyErrorInfo
());
//补货清空错误数据
let
info
=
Object
.
assign
({},{
taskList
:
json
.
data
.
product
});
let
info
=
Object
.
assign
({},{
taskList
:
json
.
data
});
dispatch
(
saveCommonInfo
(
info
))
dispatch
(
saveProductInfo
(
json
.
data
))
}
else
{
switch
(
taskInfo
.
currentTask
Num
){
switch
(
taskInfo
.
currentTask
Type
){
case
3
:
//回收任务
break
;
case
4
:
case
'ADDR'
:
//补货任务
let
errorInfo
=
{
errorType
:
json
.
data
.
errorType
||
""
,
...
...
client/actions/common.js
View file @
101e1cd9
...
...
@@ -45,6 +45,7 @@ const getTaskInfo = (data)=>{
// credentials : 'include',
method
:
'GET'
,
mode
:
'cors'
,
headers
:
myHeaders
,
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
let
taskInfo
=
Object
.
assign
({});
...
...
@@ -122,7 +123,7 @@ const hasNoSku = (commonInfo)=>{
// credentials : 'include',
method
:
'PUT'
,
mode
:
'cors'
,
//
headers: myHeaders
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
dispatch
(
getTaskList
(
commonInfo
))
...
...
@@ -154,7 +155,7 @@ const getTaskList = (data={})=>{
let
childNum
=
0
;
let
currentTaskType
=
json
.
data
.
flatCommonVo
.
currentTaskType
;
let
currentTaskNum
=
json
.
data
.
flatCommonVo
.
currentTaskNum
;
if
(
currentTask
Num
===
3
){
if
(
currentTask
Type
===
'RE'
){
//回收
childNum
=
json
.
data
.
skuFlatVo
.
whetherType
?
1
:
2
}
...
...
client/actions/recovery.js
View file @
101e1cd9
import
fetch
from
'isomorphic-fetch'
;
import
actionType
from
'../actiontype/recovery'
import
{
getTaskList
}
from
"./common"
;
const
domain
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.37:8080/maxbox/web'
let
myHeaders
=
new
Headers
({
// 'Access-Control-Allow-Origin': '*',
...
...
@@ -21,13 +21,14 @@ const finishBoxRecovery = (info)=>{
taskType
:
taskInfo
.
currentTaskType
,
area
:
taskInfo
.
area
})
let
url
=
`
${
ENV
.
domain
}
/machine_pad/update_machine_recovery_sku.action`
let
url
=
`
${
domain
}
/machine_pad/update_machine_recovery_sku.action`
return
(
dispatch
)
=>
{
fetch
(
url
,{
//
credentials : 'include',
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
myHeaders
headers
:
myHeaders
,
body
:
JSON
.
stringify
(
bodyData
)
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
dispatch
(
getTaskList
(
info
));
...
...
client/actions/uploadError.js
View file @
101e1cd9
import
fetch
from
'isomorphic-fetch'
import
actionType
from
'../actiontype/error'
import
{
getTaskList
}
from
'./common'
let
domain
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.37:8080/maxbox/web/'
;
var
myHeaders
=
new
Headers
({
'Access-Control-Allow-Origin'
:
'*'
,
...
...
@@ -16,7 +16,7 @@ const uploadErrorOld = (info)=>{
taskId
:
info
.
taskId
};
return
(
dispatch
=>
{
fetch
(
domain
+
'/machine_pad/flat_warn_record'
,{
fetch
(
domain
+
'/machine_pad/flat_warn_record
.action
'
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
...
...
@@ -41,7 +41,7 @@ const uploadError = (info,exceptionType)=>{
area
:
taskInfo
.
area
||
''
};
return
(
dispatch
=>
{
fetch
(
domain
+
'
/machine_pad/flat_warn_record
'
,{
fetch
(
domain
+
'
machine_pad/exception_skupass_sku.action
'
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
...
...
@@ -50,7 +50,7 @@ const uploadError = (info,exceptionType)=>{
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
dispatch
(
getTaskList
());
dispatch
(
getTaskList
(
info
));
}).
catch
(
e
=>
{
console
.
error
(
e
)});
})
}
...
...
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
View file @
101e1cd9
...
...
@@ -25,9 +25,9 @@ export default class ReplenishScanPage extends React.Component{
}
componentWillReceiveProps
(
nextProps
){
if
(
nextProps
.
replenishInfo
&&
nextProps
.
replenishInfo
.
errorInfo
&&
nextProps
.
replenishInfo
.
errorInfo
.
errorMessage
){
if
(
nextProps
.
replenishInfo
&&
nextProps
.
replenishInfo
.
errorInfo
&&
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
){
//有错误信息,再对应页面弹出错误信息弹窗,要区分错误信息
nextProps
.
hidePopup
();
//
nextProps.hidePopup();
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
case
"NT"
:
...
...
client/components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage.jsx
View file @
101e1cd9
...
...
@@ -35,6 +35,9 @@ export default class ReplenishSkuPage extends React.Component{
}
handleScanQrcode
(){
//扫描下一个
this
.
props
.
finishBoxRecovery
();
this
.
continueScan
()
}
...
...
@@ -53,7 +56,7 @@ export default class ReplenishSkuPage extends React.Component{
<
div
className=
{
"btn pageBtn"
}
>
<
div
className=
{
"tips colff775c font30"
}
onClick=
{
()
=>
this
.
getPage
(
2
)
}
>
遇到问题?
</
div
>
<
Button
btnContainer=
{
"replenishPageBtn1 font32"
}
key=
{
"replenishPageBtn1"
}
text=
{
'扫描工作结束'
}
option=
{
this
.
handleScanOver
}
/>
<
Button
btnContainer=
{
"replenishPageBtn2 font32 colfff backff775c"
}
key=
{
"replenishPageBtn2"
}
text=
{
'扫描下一个'
}
option=
{
this
.
continueScan
}
/>
<
Button
btnContainer=
{
"replenishPageBtn2 font32 colfff backff775c"
}
key=
{
"replenishPageBtn2"
}
text=
{
'扫描下一个'
}
option=
{
this
.
handleScanQrcode
}
/>
</
div
>
</
div
>
</
div
>
...
...
@@ -266,7 +269,7 @@ export default class ReplenishSkuPage extends React.Component{
continueScan
(){
let
{
showPopup
,
hidePopup
,
beginScan
}
=
this
.
props
;
hidePopup
();
beginScan
()
beginScan
()
;
}
render
(){
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
101e1cd9
...
...
@@ -627,6 +627,7 @@ class PageContainer extends React.Component {
barcodeInfo=
{
state
.
barcodeCommon
}
replenishInfo=
{
state
.
replenishInfo
}
getBarCodeProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getBarCodeProductInfo
({
barcode
,
commonInfo
:
state
.
commonInfo
}))}
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
/>
/*以下是二期页面 end*/
}
...
...
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