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
09a556ed
Commit
09a556ed
authored
Sep 25, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善捕补货逻辑
parent
4110a4d2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
108 additions
and
183 deletions
+108
-183
client/actions/barcodeCommon.js
+19
-29
client/actions/breakaegContainer.js
+29
-5
client/actions/common.js
+4
-100
client/actions/recovery.js
+2
-4
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
+42
-30
client/containers/PageContainer/PageContainer.jsx
+7
-3
client/containers/ReplenishContainer/ReplenishContainer.jsx
+0
-9
client/containers/ReplenishContainer/index.css
+3
-2
client/reducers/replenish.js
+2
-1
No files found.
client/actions/barcodeCommon.js
View file @
09a556ed
...
@@ -2,33 +2,7 @@ import fetch from 'isomorphic-fetch'
...
@@ -2,33 +2,7 @@ import fetch from 'isomorphic-fetch'
import
{
saveCommonInfo
}
from
'./common'
import
{
saveCommonInfo
}
from
'./common'
import
barcodeActionType
from
'../actiontype/barcodeCommon'
import
barcodeActionType
from
'../actiontype/barcodeCommon'
import
replenishAction
from
'./replenish'
import
replenishAction
from
'./replenish'
let
domain1
=
ENV
.
domain
;
let
domain
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.128:8080/web/'
// const changeStatus = (data)=>{
// let {taskId,currentTaskType}=data.taskInfo;
// let url = `http://192.168.10.128:8080/web/flat/work/lr/status/${taskId}/${currentTaskType}`
// return (dispatch)=>{
// fetch(url,{
// credentials : 'include',
// method : 'PUT',
// mode : 'cors',
// body : {}
// }).then((response)=>response.json())
// .then((json)=>{
// if(json.data){
// getTaskList(data)
// }
// })
// }
// }
const
changeTaskStatus
=
(
data
)
=>
{
return
{
}
}
//test 输入条形码获取商品信息
//test 输入条形码获取商品信息
...
@@ -59,9 +33,25 @@ const getBarCodeProductInfo = (data)=>{
...
@@ -59,9 +33,25 @@ const getBarCodeProductInfo = (data)=>{
break
;
break
;
case
'ADDR'
:
case
'ADDR'
:
//补货任务
//补货任务
let
errorType
=
json
.
data
&&
json
.
data
.
errorType
?
json
.
data
.
errorType
:
""
;
let
errorMessage
=
json
.
meta
.
message
;
switch
(
errorType
){
case
"NT"
:
errorMessage
=
"不在本次补货范围内"
;
break
;
case
"NA"
:
errorMessage
=
"不在本区补货范围"
;
break
;
case
"NS"
:
errorMessage
=
"需要补完上一次的商品"
;
break
;
case
"TW"
:
errorMessage
=
"拿错货品"
;
break
;
}
let
errorInfo
=
{
let
errorInfo
=
{
errorType
:
json
.
data
.
errorType
||
""
,
errorType
:
errorType
,
errorMessage
:
json
.
meta
.
m
essage
errorMessage
:
errorM
essage
};
};
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
dispatch
(
replenishAction
.
wrongQrcode
(
errorInfo
));
break
;
break
;
...
...
client/actions/breakaegContainer.js
View file @
09a556ed
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
let
domain1
=
ENV
.
domain
;
import
{
getTaskList
}
from
"./common"
;
let
domain
=
'http://192.168.10.128:8080/web/'
let
domain
=
ENV
.
domain
;
//提交遗留上报的商品
//提交遗留上报的商品
let
myHeaders
=
new
Headers
({
// 'Access-Control-Allow-Origin': '*',
// 'Content-Type': 'text/plain;charset=UTF-8',
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Type'
:
'application/json; charset=UTF-8'
,
});
const
submitBreakageProduct
=
(
data
)
=>
{
const
submitBreakageProduct
=
(
data
)
=>
{
console
.
log
(
data
,
"执行了提交遗留上报"
)
console
.
log
(
data
,
"执行了提交遗留上报"
)
...
@@ -30,4 +35,23 @@ const submitBreakageProduct = (data)=>{
...
@@ -30,4 +35,23 @@ const submitBreakageProduct = (data)=>{
}
}
}
}
export
{
submitBreakageProduct
}
\ No newline at end of file
//test 没有散落货品
const
hasNoSku
=
(
commonInfo
)
=>
{
let
{
storeInfo
=
{},
userInfo
=
{},
taskInfo
=
{}}
=
commonInfo
;
console
.
log
(
"执行了没有散落商品的接口"
)
return
(
dispatch
)
=>
{
let
url
=
`
${
domain
}
flat/work/lr/status/
${
taskInfo
.
taskId
}
/
${
taskInfo
.
area
}
/
${
taskInfo
.
currentTaskType
}
`
;
fetch
(
url
,{
// credentials : 'include',
method
:
'PUT'
,
mode
:
'cors'
,
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
dispatch
(
getTaskList
(
commonInfo
))
})
}
}
export
{
submitBreakageProduct
,
hasNoSku
}
\ No newline at end of file
client/actions/common.js
View file @
09a556ed
import
fetch
from
'isomorphic-fetch'
;
import
fetch
from
'isomorphic-fetch'
;
import
actionType
from
'../actiontype/common'
import
actionType
from
'../actiontype/common'
import
{
addErrorInfo
}
from
'./uploadError'
import
{
addErrorInfo
}
from
'./uploadError'
let
domain1
=
ENV
.
domain
;
let
domain
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.128:8080/web/'
let
myHeaders
=
new
Headers
({
let
myHeaders
=
new
Headers
({
// 'Access-Control-Allow-Origin': '*',
// 'Access-Control-Allow-Origin': '*',
// 'Content-Type': 'text/plain;charset=UTF-8',
// 'Content-Type': 'text/plain;charset=UTF-8',
...
@@ -11,61 +9,11 @@ let myHeaders = new Headers({
...
@@ -11,61 +9,11 @@ let myHeaders = new Headers({
'Content-Type'
:
'application/json; charset=UTF-8'
,
'Content-Type'
:
'application/json; charset=UTF-8'
,
});
});
//开始工作
// const getTaskInfo = (data)=>{
// let {userInfo,storeInfo,taskInfo} = data;
// return(dispatch)=>{
// if(userInfo && userInfo.id && storeInfo && storeInfo.id) {
// let url = `${domain}flat/ready/${storeInfo.id}/${taskInfo.area}/${userInfo.id}`;
// fetch(url,{
// // credentials : 'include',
// method : 'GET',
// mode : 'cors',
// }).then((response)=>response.json())
// .then(json=>{
// let taskInfo=Object.assign({});
// if(json.meta.success && json.data){
// taskInfo = Object.assign({},json.data);
// dispatch(getTaskName(json.data.currentTaskNum))
// }
// dispatch(saveCommonInfo(Object.assign({},{taskInfo})))
// }).catch(e=>{console.error(e)})
// }else {
// dispatch(addErrorInfo("用户或门店不对"))
// }
// }
// };
const
getTaskInfo
=
(
data
)
=>
{
let
{
userInfo
,
storeInfo
,
taskInfo
}
=
data
;
return
(
dispatch
)
=>
{
if
(
userInfo
&&
userInfo
.
id
&&
storeInfo
&&
storeInfo
.
id
)
{
let
url
=
`
${
domain
}
flat/ready/
${
storeInfo
.
id
}
/
${
taskInfo
.
area
}
/
${
userInfo
.
id
}
`
;
fetch
(
url
,{
// credentials : 'include',
method
:
'GET'
,
mode
:
'cors'
,
headers
:
myHeaders
,
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
let
taskInfo
=
Object
.
assign
({});
if
(
json
.
meta
.
success
&&
json
.
data
){
taskInfo
=
Object
.
assign
({},
json
.
data
);
dispatch
(
getTaskName
(
json
.
data
.
currentTaskNum
))
}
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
})))
}).
catch
(
e
=>
{
console
.
error
(
e
)})
}
else
{
dispatch
(
addErrorInfo
(
"用户或门店不对"
))
}
}
};
//获取店铺信息
//获取店铺信息
const
getStoreInfo
=
(
storeId
)
=>
{
const
getStoreInfo
=
(
storeId
)
=>
{
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
let
bodyData
=
{
storeId
};
let
bodyData
=
{
storeId
};
fetch
(
domain
1
+
'pad_warehouse/getMachineData.action'
,{
fetch
(
domain
+
'pad_warehouse/getMachineData.action'
,{
// credentials : 'include',
// credentials : 'include',
method
:
'POST'
,
method
:
'POST'
,
mode
:
'cors'
,
mode
:
'cors'
,
...
@@ -89,7 +37,7 @@ const getStoreInfo = (storeId)=>{
...
@@ -89,7 +37,7 @@ const getStoreInfo = (storeId)=>{
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
let
bodyData
=
Object
.
assign
({},{
employeeId
,
storeId
})
let
bodyData
=
Object
.
assign
({},{
employeeId
,
storeId
})
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
domain
1
+
'machine_pad/get_alowed_task.action'
,{
fetch
(
domain
+
'machine_pad/get_alowed_task.action'
,{
// credentials : 'include',
// credentials : 'include',
method
:
'POST'
,
method
:
'POST'
,
mode
:
'cors'
,
mode
:
'cors'
,
...
@@ -113,23 +61,6 @@ const getUserinfo = (employeeId,storeId)=>{
...
@@ -113,23 +61,6 @@ const getUserinfo = (employeeId,storeId)=>{
}
}
};
};
//test 没有散落货品
const
hasNoSku
=
(
commonInfo
)
=>
{
let
{
storeInfo
=
{},
userInfo
=
{},
taskInfo
=
{}}
=
commonInfo
;
console
.
log
(
"执行了没有散落商品的接口"
)
return
(
dispatch
)
=>
{
let
url
=
`
${
domain
}
flat/work/lr/status/
${
taskInfo
.
taskId
}
/
${
taskInfo
.
area
}
/
${
taskInfo
.
currentTaskType
}
`
;
fetch
(
url
,{
// credentials : 'include',
method
:
'PUT'
,
mode
:
'cors'
,
headers
:
myHeaders
}).
then
(
response
=>
response
.
json
())
.
then
((
json
)
=>
{
dispatch
(
getTaskList
(
commonInfo
))
})
}
}
//拉取工单
//拉取工单
...
@@ -165,39 +96,12 @@ const getTaskList = (data={})=>{
...
@@ -165,39 +96,12 @@ const getTaskList = (data={})=>{
}
}
}
}
const
saveTaskListInfo
=
(
data
)
=>
{
return
{
type
:
actionType
.
GETTASKLIST
,
data
}
}
const
setBarcodeInfo
=
(
data
)
=>
{
return
{
type
:
actionType
.
SETBARCODEINFO
,
data
}
};
const
clearBarcodeInfo
=
(
data
)
=>
{
return
{
type
:
actionType
.
EMPTYBARCODEINFO
,
data
}
};
const
saveCommonInfo
=
(
data
)
=>
{
const
saveCommonInfo
=
(
data
)
=>
{
return
{
return
{
type
:
actionType
.
SAVECOMMONINFO
,
type
:
actionType
.
SAVECOMMONINFO
,
data
data
}
}
};
};
const
startalljob
=
(
data
)
=>
{
return
{
type
:
actionType
.
STARTALLJOB
,
data
}
}
const
logout
=
()
=>
{
const
logout
=
()
=>
{
let
data
=
Object
.
assign
({},{
userInfo
:{},
taskInfo
:{}});
let
data
=
Object
.
assign
({},{
userInfo
:{},
taskInfo
:{}});
return
{
return
{
...
@@ -213,4 +117,4 @@ const getTaskName = (currentTaskType,childTaskNum=0)=>{
...
@@ -213,4 +117,4 @@ const getTaskName = (currentTaskType,childTaskNum=0)=>{
}
}
}
}
export
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
getTaskList
,
hasNoSku
,
getTaskName
}
export
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
getTaskList
,
getTaskName
}
client/actions/recovery.js
View file @
09a556ed
import
fetch
from
'isomorphic-fetch'
;
import
fetch
from
'isomorphic-fetch'
;
import
actionType
from
'../actiontype/recovery'
import
{
getTaskList
}
from
"./common"
;
import
{
getTaskList
}
from
"./common"
;
const
domain1
=
ENV
.
domain
;
const
domain
=
ENV
.
domain
;
let
domain
=
'http://192.168.10.37:8080/maxbox/web'
let
myHeaders
=
new
Headers
({
let
myHeaders
=
new
Headers
({
// 'Access-Control-Allow-Origin': '*',
// 'Access-Control-Allow-Origin': '*',
// 'Content-Type': 'text/plain;charset=UTF-8',
// 'Content-Type': 'text/plain;charset=UTF-8',
...
@@ -21,7 +19,7 @@ const finishBoxRecovery = (info)=>{
...
@@ -21,7 +19,7 @@ const finishBoxRecovery = (info)=>{
taskType
:
taskInfo
.
currentTaskType
,
taskType
:
taskInfo
.
currentTaskType
,
area
:
taskInfo
.
area
area
:
taskInfo
.
area
})
})
let
url
=
`
${
domain
}
/
machine_pad/update_machine_recovery_sku.action`
let
url
=
`
${
domain
}
machine_pad/update_machine_recovery_sku.action`
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
url
,{
fetch
(
url
,{
credentials
:
'include'
,
credentials
:
'include'
,
...
...
client/components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage.jsx
View file @
09a556ed
...
@@ -12,11 +12,11 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -12,11 +12,11 @@ export default class ReplenishScanPage extends React.Component{
this
.
forgetSku
=
this
.
forgetSku
.
bind
(
this
)
this
.
forgetSku
=
this
.
forgetSku
.
bind
(
this
)
this
.
outReplenish
=
this
.
outReplenish
.
bind
(
this
)
this
.
outReplenish
=
this
.
outReplenish
.
bind
(
this
)
this
.
getSkuInfo
=
this
.
getSkuInfo
.
bind
(
this
)
this
.
getSkuInfo
=
this
.
getSkuInfo
.
bind
(
this
)
this
.
makeSureScanOver
=
this
.
makeSureScanOver
.
bind
(
this
);
this
.
submitBarcode
=
this
.
submitBarcode
.
bind
(
this
);
this
.
submitBarcode
=
this
.
submitBarcode
.
bind
(
this
);
this
.
failSubmit
=
this
.
failSubmit
.
bind
(
this
);
this
.
failSubmit
=
this
.
failSubmit
.
bind
(
this
);
this
.
changeShowInput
=
this
.
changeShowInput
.
bind
(
this
);
this
.
changeShowInput
=
this
.
changeShowInput
.
bind
(
this
);
this
.
getScanDom
=
this
.
getScanDom
.
bind
(
this
);
this
.
getScanDom
=
this
.
getScanDom
.
bind
(
this
);
this
.
hidePop
=
this
.
hidePop
.
bind
(
this
);
this
.
state
=
{
this
.
state
=
{
barcodeText
:
''
,
barcodeText
:
''
,
barcodeErrorText
:
''
,
barcodeErrorText
:
''
,
...
@@ -24,32 +24,53 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -24,32 +24,53 @@ export default class ReplenishScanPage extends React.Component{
}
}
}
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
if
(
nextProps
.
replenishInfo
&&
nextProps
.
replenishInfo
.
errorInfo
&&
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)){
console
.
log
(
"ReplenishScanPage componentWillReceiveProps "
,
nextProps
);
let
props
=
this
.
props
;
let
{
replenishInfo
}
=
props
;
if
(
nextProps
.
replenishInfo
&&
nextProps
.
replenishInfo
.
errorInfo
&&
nextProps
.
replenishInfo
.
errorInfo
.
errorMessage
){
//有错误信息,再对应页面弹出错误信息弹窗,要区分错误信息
//有错误信息,再对应页面弹出错误信息弹窗,要区分错误信息
// nextProps.hidePopup();
// nextProps.hidePopup();
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
if
(
!
replenishInfo
.
errorInfo
||
!
replenishInfo
.
errorInfo
.
errorMessage
||
(
replenishInfo
.
errorInfo
&&
replenishInfo
.
errorInfo
.
errorMessage
&&
replenishInfo
.
errorInfo
.
errorMessage
!==
nextProps
.
replenishInfo
.
errorInfo
.
errorMessage
)){
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
if
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
){
case
"NT"
:
switch
(
nextProps
.
replenishInfo
.
errorInfo
.
errorType
)
{
case
"NA"
:
case
"NT"
:
this
.
outReplenish
();
case
"NA"
:
break
;
this
.
outReplenish
();
case
"NS"
:
break
;
this
.
errorSku
();
case
"NS"
:
break
;
this
.
errorSku
();
break
;
}
}
else
{
//没有错误类型的错误
console
.
log
(
"ReplenishScanPage "
,
nextProps
.
replenishInfo
.
errorInfo
.
errorMessage
)
}
}
}
else
{
//没有错误类型的错误
console
.
log
(
"ReplenishScanPage "
,
nextProps
.
replenishInfo
.
errorInfo
.
errorMessage
)
}
}
}
}
}
}
goBack
(){
let
{
emptyErrorInfo
,
goBack
,
hidePopup
}
=
this
.
props
;
emptyErrorInfo
();
hidePopup
();
goBack
()
}
hidePop
(){
let
{
emptyErrorInfo
,
hidePopup
}
=
this
.
props
;
emptyErrorInfo
();
hidePopup
();
}
getOtherHeader
(){
getOtherHeader
(){
let
{
headerInfo
,
goBack
}
=
this
.
props
;
let
{
headerInfo
}
=
this
.
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
let
{
taskInfo
=
{}}
=
headerInfo
;
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
goBack
()
}
/>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
this
.
goBack
.
bind
(
this
)
()
}
/>
<
span
className=
{
"middle"
}
>
任务目标:将
{
taskInfo
.
area
||
""
}
区补货箱中的货品扫码后放到货架上
</
span
>
<
span
className=
{
"middle"
}
>
任务目标:将
{
taskInfo
.
area
||
""
}
区补货箱中的货品扫码后放到货架上
</
span
>
</
div
>
</
div
>
}
}
...
@@ -77,7 +98,7 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -77,7 +98,7 @@ export default class ReplenishScanPage extends React.Component{
//货道已满解决办法
//货道已满解决办法
let
{
showPopup
,
hidePopup
,
barcodeInfo
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
,
barcodeInfo
}
=
this
.
props
;
let
{
product
}
=
barcodeInfo
;
let
{
product
}
=
barcodeInfo
;
let
btnDom
=
<
Button
btnContainer=
{
"replenishScanPageErrorSkuBtn font32 backff775c colfff"
}
style=
{
{
marginTop
:
'10%'
}
}
key=
{
"replenishScanPageErrorSkuBtn"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
makeSureScanOver
}
/>
let
btnDom
=
<
Button
btnContainer=
{
"replenishScanPageErrorSkuBtn font32 backff775c colfff"
}
key=
{
"replenishScanPageErrorSkuBtn"
}
text=
{
"确认扫描完毕"
}
option=
{
this
.
hidePop
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo replenishScanPageErrorSku"
}
>
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo replenishScanPageErrorSku"
}
>
<
div
className=
{
"icon iconfont icon-exclamation colf5a623 font150"
}
/>
<
div
className=
{
"icon iconfont icon-exclamation colf5a623 font150"
}
/>
...
@@ -95,7 +116,7 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -95,7 +116,7 @@ export default class ReplenishScanPage extends React.Component{
//忘记样子
//忘记样子
forgetSku
(){
forgetSku
(){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"replenishScanPageForgetSkuBtn font32 backff775c colfff"
}
style=
{
{
marginTop
:
'10%'
}
}
key=
{
"replenishScanPageForgetSkuBtn"
}
text=
{
"继续扫描"
}
option=
{
hidePopu
p
}
/>
let
btnDom
=
<
Button
btnContainer=
{
"replenishScanPageForgetSkuBtn font32 backff775c colfff"
}
style=
{
{
marginTop
:
"10%"
}
}
key=
{
"replenishScanPageForgetSkuBtn"
}
text=
{
"继续扫描"
}
option=
{
this
.
hidePo
p
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo replenishScanPageForgetSku"
}
>
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo replenishScanPageForgetSku"
}
>
{
this
.
getSkuInfo
()
}
{
this
.
getSkuInfo
()
}
...
@@ -110,7 +131,7 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -110,7 +131,7 @@ export default class ReplenishScanPage extends React.Component{
outReplenish
(){
outReplenish
(){
//货道已满解决办法
//货道已满解决办法
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom
=
<
Button
btnContainer=
{
"replenishContainerQrcode font32 backff775c colfff"
}
style=
{
{
marginTop
:
'10%'
}
}
key=
{
"replenishContainerWrongQrcode"
}
text=
{
"关闭"
}
option=
{
hidePopu
p
}
/>
let
btnDom
=
<
Button
btnContainer=
{
"replenishContainerQrcode font32 backff775c colfff"
}
key=
{
"replenishContainerWrongQrcode"
}
text=
{
"关闭"
}
option=
{
this
.
hidePo
p
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo"
}
>
<
PopModel
popupTitle=
{
"扫描货品异常"
}
classContainer=
{
"replenishPopInfo"
}
>
<
div
className=
{
"icon iconfont icon-wrong font150"
}
/>
<
div
className=
{
"icon iconfont icon-wrong font150"
}
/>
...
@@ -143,7 +164,7 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -143,7 +164,7 @@ export default class ReplenishScanPage extends React.Component{
<
span
className=
{
"skuPosTitle"
}
>
货道信息:
</
span
>
<
span
className=
{
"skuPosTitle"
}
>
货道信息:
</
span
>
<
span
className=
{
""
}
>
{
barcodeInfo
.
position
||
""
}
</
span
>
<
span
className=
{
""
}
>
{
barcodeInfo
.
position
||
""
}
</
span
>
</
li
>
</
li
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
货道编号:
</
span
>
{
product
.
positionNum
||
""
}
</
li
>
<
li
><
span
className=
{
"skuPosTitle fl"
}
>
货道编号:
</
span
>
{
barcodeInfo
.
positionNum
||
""
}
</
li
>
</
ul
>
</
ul
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -151,11 +172,6 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -151,11 +172,6 @@ export default class ReplenishScanPage extends React.Component{
)
)
}
}
makeSureScanOver
(){
//确认扫描完毕
let
{
hidePopup
}
=
this
.
props
;
hidePopup
()
}
failSubmit
(){
failSubmit
(){
this
.
setState
({
this
.
setState
({
...
@@ -168,7 +184,7 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -168,7 +184,7 @@ export default class ReplenishScanPage extends React.Component{
submitBarcode
(){
submitBarcode
(){
//提交条形码信息
//提交条形码信息
let
barcodeText
=
this
.
state
.
barcodeText
;
let
barcodeText
=
this
.
state
.
barcodeText
;
let
{
showPopup
,
getBarCodeProductInfo
}
=
this
.
props
;
let
{
getBarCodeProductInfo
}
=
this
.
props
;
if
(
barcodeText
){
if
(
barcodeText
){
barcodeText
=
barcodeText
.
trim
();
barcodeText
=
barcodeText
.
trim
();
if
(
this
.
checkNumber
(
barcodeText
)){
if
(
this
.
checkNumber
(
barcodeText
)){
...
@@ -207,7 +223,6 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -207,7 +223,6 @@ export default class ReplenishScanPage extends React.Component{
* @returns {*}
* @returns {*}
*/
*/
getScanDom
(){
getScanDom
(){
let
{
headerInfo
}
=
this
.
props
;
return
(
return
(
<
div
className=
{
"replenishScanDom"
}
>
<
div
className=
{
"replenishScanDom"
}
>
<
div
className=
{
"colff775c scanTips font30"
}
onClick=
{
()
=>
this
.
changeShowInput
()
}
><
span
className=
{
"colfff font26"
}
>
or
</
span
>
手动输入条形码
</
div
>
<
div
className=
{
"colff775c scanTips font30"
}
onClick=
{
()
=>
this
.
changeShowInput
()
}
><
span
className=
{
"colfff font26"
}
>
or
</
span
>
手动输入条形码
</
div
>
...
@@ -227,9 +242,6 @@ export default class ReplenishScanPage extends React.Component{
...
@@ -227,9 +242,6 @@ export default class ReplenishScanPage extends React.Component{
render
(){
render
(){
let
props
=
this
.
props
;
let
{
headerInfo
}
=
props
;
let
{
taskInfo
=
{}}
=
headerInfo
;
return
(
return
(
<
div
className=
{
"replenishScanPage"
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
backgroundColor
:
'#000'
}
}
>
<
div
className=
{
"replenishScanPage"
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
backgroundColor
:
'#000'
}
}
>
<
Header
<
Header
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
09a556ed
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
import
React
from
'react'
import
React
from
'react'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
hasNoSku
,
getTaskName
}
from
"../../actions/common"
;
import
{
finishBoxRecovery
}
from
"../../actions/recovery"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
,
clearProductSuccess
}
from
"../../actions/ScanBarCode"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
,
clearProductSuccess
}
from
"../../actions/ScanBarCode"
...
@@ -29,8 +29,11 @@ import RecoveryPage from '../RecoveryContainer/RecoveryContainer'
...
@@ -29,8 +29,11 @@ import RecoveryPage from '../RecoveryContainer/RecoveryContainer'
import
ReplenishContainer
from
'../ReplenishContainer/ReplenishContainer'
import
ReplenishContainer
from
'../ReplenishContainer/ReplenishContainer'
import
{
getBarCodeProductInfo
}
from
'../../actions/barcodeCommon'
import
{
getBarCodeProductInfo
}
from
'../../actions/barcodeCommon'
import
{
getTaskList
}
from
'../../actions/common'
import
{
getTaskList
}
from
'../../actions/common'
import
{
submitBreakageProduct
}
from
'../../actions/breakaegContainer'
import
{
submitBreakageProduct
,
hasNoSku
}
from
'../../actions/breakaegContainer'
import
{
checkProductQuantity
}
from
'../../actions/TokeStokeContainer'
import
{
checkProductQuantity
}
from
'../../actions/TokeStokeContainer'
import
{
getStoreInfo
,
saveCommonInfo
,
getUserinfo
,
logout
,
getTaskName
}
from
"../../actions/common"
;
import
{
finishBoxRecovery
}
from
"../../actions/recovery"
;
import
replenishAction
from
"../../actions/replenish"
;
/*二期引用 end*/
/*二期引用 end*/
import
{
on
,
remove
}
from
'../../util/event'
;
import
{
on
,
remove
}
from
'../../util/event'
;
...
@@ -629,6 +632,7 @@ class PageContainer extends React.Component {
...
@@ -629,6 +632,7 @@ class PageContainer extends React.Component {
replenishInfo=
{
state
.
replenishInfo
}
replenishInfo=
{
state
.
replenishInfo
}
getBarCodeProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getBarCodeProductInfo
({
barcode
,
commonInfo
:
state
.
commonInfo
}))}
}
getBarCodeProductInfo=
{
(
barcode
)
=>
{
dispatch
(
getBarCodeProductInfo
({
barcode
,
commonInfo
:
state
.
commonInfo
}))}
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
finishBoxRecovery=
{
()
=>
dispatch
(
finishBoxRecovery
(
state
.
commonInfo
))
}
emptyErrorInfo=
{
()
=>
dispatch
(
replenishAction
.
emptyErrorInfo
())
}
/>
/>
/*以下是二期页面 end*/
/*以下是二期页面 end*/
}
}
...
...
client/containers/ReplenishContainer/ReplenishContainer.jsx
View file @
09a556ed
...
@@ -79,15 +79,6 @@ export default class ReplenishContainer extends React.Component{
...
@@ -79,15 +79,6 @@ export default class ReplenishContainer extends React.Component{
return
<
ReplenishScanPage
{
...
props
}
/>
return
<
ReplenishScanPage
{
...
props
}
/>
}
}
getOtherHeader
(){
return
<
div
className=
{
"otherHeader replenishScanQrcodeHeader font32 clearfix colfff "
}
>
<
i
className=
{
"iconfont middle icon font50 icon-circle-left circleIcon fl"
}
onClick=
{
()
=>
this
.
goBack
.
bind
(
this
)()
}
/>
<
span
className=
{
"middle"
}
>
任务目标:将A区补货箱中的货品扫码后放到货架上
</
span
>
</
div
>
}
goBack
(){
goBack
(){
this
.
setState
({
this
.
setState
({
showScanQrcode
:
false
,
showScanQrcode
:
false
,
...
...
client/containers/ReplenishContainer/index.css
View file @
09a556ed
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
width
:
200px
;
width
:
200px
;
height
:
200px
;
height
:
200px
;
border
:
1px
solid
#e5e5e5
;
border
:
1px
solid
#e5e5e5
;
margin
:
0
8
0px
0
60px
;
margin
:
0
6
0px
0
60px
;
}
}
.replenishSkuInfo
.skuInfo
img
{
.replenishSkuInfo
.skuInfo
img
{
...
@@ -56,8 +56,9 @@
...
@@ -56,8 +56,9 @@
flex
:
1
;
flex
:
1
;
}
}
.replenishSkuInfo
.skuInfo
.skuPos
ul
>
li
{
.replenishSkuInfo
.skuInfo
.skuPos
ul
>
li
{
padding-left
:
2
6%
;
padding-left
:
3
6%
;
position
:
relative
;
position
:
relative
;
min-height
:
60px
;
}
}
.replenishSkuInfo
.skuInfo
.skuPos
ul
>
li
.skuPosTitle
{
.replenishSkuInfo
.skuInfo
.skuPos
ul
>
li
.skuPosTitle
{
position
:
absolute
;
position
:
absolute
;
...
...
client/reducers/replenish.js
View file @
09a556ed
...
@@ -2,7 +2,8 @@ import actionTypes from '../actiontype/replenish';
...
@@ -2,7 +2,8 @@ import actionTypes from '../actiontype/replenish';
const
setErrorInfo
=
(
state
,
errorInfo
)
=>
{
const
setErrorInfo
=
(
state
,
errorInfo
)
=>
{
return
Object
.
assign
({},
state
,{
errorInfo
});
let
newState
=
JSON
.
parse
(
JSON
.
stringify
(
state
));
return
Object
.
assign
({},
newState
,{
errorInfo
});
};
};
const
emptyErrorInfo
=
(
state
)
=>
{
const
emptyErrorInfo
=
(
state
)
=>
{
return
Object
.
assign
({},
state
,{
errorInfo
:{}})
return
Object
.
assign
({},
state
,{
errorInfo
:{}})
...
...
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