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
f9c40116
Commit
f9c40116
authored
Nov 15, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改平板一期
parent
be0f343f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
197 additions
and
202 deletions
+197
-202
client/actions/TokeStokeContainer.js
+0
-2
client/actions/getTroubles.js
+10
-7
client/actions/reportDamageList.js
+0
-2
client/components/CommonComponent/PopupComponent/PopupComponent.jsx
+3
-0
client/components/CommonComponent/PopupComponent/PopupMiddleComponent.jsx
+27
-0
client/components/CommonComponent/TextAreaContainer/TextAreaContainer.jsx
+10
-5
client/components/ReportDamageListComponent/DamageItemComponent/DamageItem.jsx
+2
-4
client/components/TroubleComponent/TroubleItemComponent/TroubleItemComponent.jsx
+20
-12
client/containers/FinishAskContainer/FinishAskContainer.jsx
+7
-12
client/containers/HomeContainer/HomeContainer.jsx
+2
-3
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
+55
-34
client/containers/PageContainer/PageContainer.jsx
+15
-20
client/containers/ReportDamagesListContainer/ReportDamagesListContainer.jsx
+10
-15
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
+24
-17
client/containers/TroubleContainer/TroubleContainer.jsx
+11
-14
client/reducers/TokeStokeContainer.js
+0
-1
client/reducers/trouble.js
+1
-54
No files found.
client/actions/TokeStokeContainer.js
View file @
f9c40116
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
import
tokeActionType
from
'../actiontype/TokeStokeContainer'
import
tokeActionType
from
'../actiontype/TokeStokeContainer'
import
{
getTaskList
}
from
'./common'
import
{
getTaskList
}
from
'./common'
console
.
log
(
tokeActionType
,
'dhakjshdjhasjhdjshj'
)
let
domain
=
ENV
.
domain
;
let
domain
=
ENV
.
domain
;
let
domain1
=
'http://192.168.10.176:8080/web/'
//点击提交后台核对商品数量
//点击提交后台核对商品数量
const
checkProductQuantity
=
(
data
)
=>
{
const
checkProductQuantity
=
(
data
)
=>
{
let
{
commonInfo
,
tokeProductInfo
}
=
data
;
let
{
commonInfo
,
tokeProductInfo
}
=
data
;
...
...
client/actions/getTroubles.js
View file @
f9c40116
...
@@ -2,10 +2,11 @@ import fetch from 'isomorphic-fetch';
...
@@ -2,10 +2,11 @@ import fetch from 'isomorphic-fetch';
import
actionTypes
from
'../actiontype/trouble'
import
actionTypes
from
'../actiontype/trouble'
import
userActionTypes
from
"../actiontype/user"
;
import
userActionTypes
from
"../actiontype/user"
;
import
{
saveHeaderInfo
}
from
'./initHeader'
import
{
saveHeaderInfo
}
from
'./initHeader'
import
{
saveCommonInfo
}
from
"./common"
;
const
domain
=
ENV
.
domain
;
const
domain
=
ENV
.
domain
;
let
json
=
{
let
meta
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"data"
:
{
"details"
:
[{
"details"
:
[{
...
@@ -151,10 +152,11 @@ var myHeaders = new Headers({
...
@@ -151,10 +152,11 @@ var myHeaders = new Headers({
const
getTroubleList
=
(
info
)
=>
{
const
getTroubleList
=
(
info
)
=>
{
let
{
storeInfo
=
{},
userInfo
=
{},
taskInfo
=
{}}
=
info
;
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
let
bodyData
=
Object
.
assign
({},
{
let
bodyData
=
Object
.
assign
({},
{
employeeId
:
i
nfo
.
employeeId
,
employeeId
:
userI
nfo
.
employeeId
,
storeId
:
info
.
storeI
d
storeId
:
storeInfo
.
i
d
});
});
fetch
(
domain
+
'machine_pad/list_fault.action'
,
{
fetch
(
domain
+
'machine_pad/list_fault.action'
,
{
credentials
:
'include'
,
credentials
:
'include'
,
...
@@ -165,7 +167,7 @@ const getTroubleList = (info) => {
...
@@ -165,7 +167,7 @@ const getTroubleList = (info) => {
}).
then
((
response
)
=>
response
.
json
())
}).
then
((
response
)
=>
response
.
json
())
.
then
(
json
=>
{
.
then
(
json
=>
{
if
(
json
.
meta
.
success
&&
json
.
data
)
{
if
(
json
.
meta
.
success
&&
json
.
data
)
{
dispatch
(
save
HeaderInfo
({
taskId
:
json
.
data
.
taskId
,
sellOrderId
:
json
.
data
.
sellOrderId
}))
dispatch
(
save
CommonInfo
({
taskInfo
:
{
taskId
:
json
.
data
.
taskId
,
sellOrderId
:
json
.
data
.
sellOrderId
}
}))
dispatch
(
saveTroubleList
(
json
.
data
))
dispatch
(
saveTroubleList
(
json
.
data
))
}
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
...
@@ -175,8 +177,9 @@ const getTroubleList = (info) => {
...
@@ -175,8 +177,9 @@ const getTroubleList = (info) => {
};
};
const
updateTroubleList
=
(
info
,
headerInfo
)
=>
{
const
updateTroubleList
=
(
info
,
headerInfo
)
=>
{
let
{
taskInfo
=
{},
userInfo
=
{},
storeInfo
=
{}}
=
headerInfo
;
let
bodyData
=
Object
.
assign
({},
{
details
:
info
},
headerInfo
);
let
bodyData
=
Object
.
assign
({},
{
details
:
info
},
{
taskId
:
taskInfo
.
taskId
,
employeeId
:
storeInfo
.
employeeId
,
storeId
:
storeInfo
.
id
});
bodyData
=
Object
.
assign
({},
{
details
:
info
},
{
taskId
:
taskInfo
.
taskId
,
employeeId
:
""
,
storeId
:
""
});
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
domain
+
'machine_pad/save_all.action'
,
{
fetch
(
domain
+
'machine_pad/save_all.action'
,
{
credentials
:
'include'
,
credentials
:
'include'
,
...
@@ -190,7 +193,7 @@ const updateTroubleList = (info, headerInfo) => {
...
@@ -190,7 +193,7 @@ const updateTroubleList = (info, headerInfo) => {
console
.
error
(
e
)
console
.
error
(
e
)
})
})
}
}
}
}
;
export
{
getTroubleList
,
updateTroubleList
}
export
{
getTroubleList
,
updateTroubleList
}
client/actions/reportDamageList.js
View file @
f9c40116
...
@@ -13,8 +13,6 @@ export function getReportDamageList (postData) {
...
@@ -13,8 +13,6 @@ export function getReportDamageList (postData) {
headers
:
{
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
'content-type'
:
'application/json;charset=UTF-8'
,
},
},
body
:
{}
}).
then
((
response
)
=>
response
.
json
())
}).
then
((
response
)
=>
response
.
json
())
.
then
(
.
then
(
(
json
)
=>
{
(
json
)
=>
{
...
...
client/components/CommonComponent/PopupComponent/PopupComponent.jsx
View file @
f9c40116
...
@@ -9,6 +9,9 @@ export default class PopupComponent extends React.Component{
...
@@ -9,6 +9,9 @@ export default class PopupComponent extends React.Component{
render
(){
render
(){
let
{
popupInfo
}
=
this
.
props
;
let
{
popupInfo
}
=
this
.
props
;
let
{
showPopup
=
false
,
popupChild
=
null
}
=
popupInfo
;
let
{
showPopup
=
false
,
popupChild
=
null
}
=
popupInfo
;
if
(
!
popupChild
&&
this
.
props
.
children
){
popupChild
=
this
.
props
.
children
;
}
return
(
return
(
<
div
className=
{
"popupComponent "
+
(
showPopup
?
' '
:
'hide '
)
}
>
<
div
className=
{
"popupComponent "
+
(
showPopup
?
' '
:
'hide '
)
}
>
{
popupChild
}
{
popupChild
}
...
...
client/components/CommonComponent/PopupComponent/PopupMiddleComponent.jsx
0 → 100644
View file @
f9c40116
import
React
from
'react'
;
require
(
'./index.css'
)
export
default
class
PopupMiddleComponent
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
}
render
(){
let
props
=
this
.
props
;
let
{
popupText
=
''
,
popupButtons
=
[],
style
=
{},
classNames
=
""
}
=
props
;
let
dom
=
popupButtons
.
map
((
a
,
k
)
=>
{
return
a
;
});
return
(
<
div
className=
{
"defaultPopup col333 "
+
classNames
}
style=
{
style
}
>
<
div
className=
{
"defaultPopupText font30"
}
>
{
popupText
}
</
div
>
<
div
className=
{
"defaultPopupButtons font32"
}
>
{
dom
}
</
div
>
</
div
>
)
}
}
\ No newline at end of file
client/components/CommonComponent/TextAreaContainer/TextAreaContainer.jsx
View file @
f9c40116
...
@@ -35,14 +35,19 @@ export default class TextAreaContainer extends React.Component{
...
@@ -35,14 +35,19 @@ export default class TextAreaContainer extends React.Component{
this
.
setState
({
text
:
value
});
this
.
setState
({
text
:
value
});
}
}
handleBlur
(){
handleBlur
(){
this
.
props
.
setStyle
({})
if
(
this
.
props
.
setStyle
){
this
.
props
.
setStyle
({})
}
}
}
handleFocus
(){
handleFocus
(){
this
.
props
.
setStyle
({
if
(
this
.
props
.
setStyle
)
{
'position'
:
'absolute'
,
this
.
props
.
setStyle
({
'top'
:
'0px'
'position'
:
'absolute'
,
})
'top'
:
'0px'
})
}
}
}
saveText
(){
saveText
(){
...
...
client/components/ReportDamageListComponent/DamageItemComponent/DamageItem.jsx
View file @
f9c40116
...
@@ -13,9 +13,7 @@ export default class DamageItem extends React.Component{
...
@@ -13,9 +13,7 @@ export default class DamageItem extends React.Component{
let
showImgDom
=
<
div
onClick=
{
()
=>
hidePopup
()
}
className=
{
"showBigImg"
}
>
let
showImgDom
=
<
div
onClick=
{
()
=>
hidePopup
()
}
className=
{
"showBigImg"
}
>
<
img
src=
{
imgSrc
}
alt=
""
/>
<
img
src=
{
imgSrc
}
alt=
""
/>
</
div
>;
</
div
>;
showPopup
({
showPopup
(
showImgDom
);
popupChild
:
showImgDom
});
}
}
render
(){
render
(){
let
{
itemInfo
,
deleteItem
}
=
this
.
props
;
let
{
itemInfo
,
deleteItem
}
=
this
.
props
;
...
@@ -34,7 +32,7 @@ export default class DamageItem extends React.Component{
...
@@ -34,7 +32,7 @@ export default class DamageItem extends React.Component{
type=
{
"custom"
}
type=
{
"custom"
}
imgSrc
=
{
item
.
filePath
}
imgSrc
=
{
item
.
filePath
}
handleClikImgFunc
=
{()=
>
{
this
.
showImg
(
item
.
filePath
)
}
}
handleClikImgFunc
=
{()=
>
{
this
.
showImg
(
item
.
filePath
)
}
}
>
</
ImgToolComponent
>
/
>
})
})
return (
return (
...
...
client/components/TroubleComponent/TroubleItemComponent/TroubleItemComponent.jsx
View file @
f9c40116
import
React
from
'react'
;
import
React
from
'react'
;
import
ImageComponent
from
'../../CommonComponent/ImgToolComponent/CommonSmalContainer'
;
import
ImageComponent
from
'../../CommonComponent/ImgToolComponent/CommonSmalContainer'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
import
PopModel
from
'../../CommonComponent/PopupComponent/PopupChildComponent'
require
(
'./index.css'
)
require
(
'./index.css'
)
export
default
class
TroubleItemComponent
extends
React
.
Component
{
export
default
class
TroubleItemComponent
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
...
@@ -60,10 +62,12 @@ export default class TroubleItemComponent extends React.Component{
...
@@ -60,10 +62,12 @@ export default class TroubleItemComponent extends React.Component{
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnDom1
=
<
Button
key=
{
"confirmDeleteTroubleImg1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom1
=
<
Button
key=
{
"confirmDeleteTroubleImg1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
key=
{
"confirmDeleteTroubleImg2"
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
}
}
text=
{
"确定"
}
option=
{
()
=>
this
.
deleteImgById
(
fileId
)
}
/>
let
btnDom2
=
<
Button
key=
{
"confirmDeleteTroubleImg2"
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
}
}
text=
{
"确定"
}
option=
{
()
=>
this
.
deleteImgById
(
fileId
)
}
/>
showPopup
({
let
popDom
=
<
PopModel
popupText=
{
"确定删除此照片吗"
}
popupButtons=
{
[
btnDom1
,
btnDom2
]
}
/>
popupText
:
'确定删除此照片吗'
,
showPopup
({
popupChild
:
popDom
});
popupButtons
:[
btnDom1
,
btnDom2
]
// showPopup({
})
// popupText:'确定删除此照片吗',
// popupButtons:[btnDom1,btnDom2]
// })
}
}
showImg
(
imgSrc
){
showImg
(
imgSrc
){
...
@@ -71,11 +75,14 @@ export default class TroubleItemComponent extends React.Component{
...
@@ -71,11 +75,14 @@ export default class TroubleItemComponent extends React.Component{
let
showImgDom
=
<
div
onClick=
{
()
=>
hidePopup
()
}
className=
{
"showBigImg"
}
>
let
showImgDom
=
<
div
onClick=
{
()
=>
hidePopup
()
}
className=
{
"showBigImg"
}
>
<
img
src=
{
imgSrc
}
alt=
""
/>
<
img
src=
{
imgSrc
}
alt=
""
/>
</
div
>;
</
div
>;
console
.
log
(
"showimg"
)
let
popDom
=
<
PopModel
popupTitle=
{
""
}
classContainer=
{
"troubleContainerPopup"
}
>
showPopup
({
{
showImgDom
}
popupChild
:
showImgDom
,
</
PopModel
>;
showPopup
:
true
showPopup
({
popupChild
:
popDom
});
});
// showPopup({
// popupChild : showImgDom,
// showPopup : true
// });
}
}
...
@@ -118,9 +125,10 @@ export default class TroubleItemComponent extends React.Component{
...
@@ -118,9 +125,10 @@ export default class TroubleItemComponent extends React.Component{
}
;
}
;
let swiperContainer = CONFIG.swiperContainers.troubleSwiperImgContainer + item.errorCode;
let swiperContainer = CONFIG.swiperContainers.troubleSwiperImgContainer + item.errorCode;
let swiperCount = imgLength+1;
let swiperCount = imgLength+1;
let text = "";
let text = item.explanation.length
>
200 ? item.explanation.substring(0,200) + '...' : item.explanation
if(item.explanation)
{
text
=
item
.
explanation
.
length
>
200
?
item
.
explanation
.
substring
(
0
,
200
)
+
'...'
:
item
.
explanation
}
return (
return (
<
div
className=
{
"troubleItemComponent "
+
((
item
.
isExistProblem
===
1
&&
item
.
explanation
)
||
item
.
isExistProblem
===
2
?
'finish'
:
''
)
}
>
<
div
className=
{
"troubleItemComponent "
+
((
item
.
isExistProblem
===
1
&&
item
.
explanation
)
||
item
.
isExistProblem
===
2
?
'finish'
:
''
)
}
>
<
div
className=
{
"finishBox"
}
>
<
div
className=
{
"finishBox"
}
>
...
...
client/containers/FinishAskContainer/FinishAskContainer.jsx
View file @
f9c40116
...
@@ -2,6 +2,7 @@ import React from 'react';
...
@@ -2,6 +2,7 @@ import React from 'react';
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
Clock
from
'../../components/CommonComponent/ClockComponent/ClockComponent'
import
Clock
from
'../../components/CommonComponent/ClockComponent/ClockComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
PopModel
from
'../../components/CommonComponent/PopupComponent/PopupMiddleComponent'
require
(
'./index.css'
);
require
(
'./index.css'
);
...
@@ -44,11 +45,8 @@ export default class FinishAskContainer extends React.Component{
...
@@ -44,11 +45,8 @@ export default class FinishAskContainer extends React.Component{
style=
{
{
'width'
:
UTILPATH
.
getRemByPx
(
260
),
'marginLeft'
:
UTILPATH
.
getRemByPx
(
30
),
'borderRadius'
:
UTILPATH
.
getRemByPx
(
10
)}
}
style=
{
{
'width'
:
UTILPATH
.
getRemByPx
(
260
),
'marginLeft'
:
UTILPATH
.
getRemByPx
(
30
),
'borderRadius'
:
UTILPATH
.
getRemByPx
(
10
)}
}
callback=
{
this
.
beginCloseDoor
}
callback=
{
this
.
beginCloseDoor
}
/>;
/>;
this
.
props
.
showPopup
({
let
popDom
=
<
PopModel
classNames=
{
"popupExtClass"
}
popupText=
{
"检测到店铺反常,请站出店铺,关闭店铺门后重新验证您的身份"
}
popupButtons=
{
[
btnDom
,
clockDom
]
}
/>
popupText
:
'检测到店铺反常,请站出店铺,关闭店铺门后重新验证您的身份'
,
this
.
props
.
showPopup
({
popupChild
:
popDom
});
popupButtons
:[
btnDom
,
clockDom
],
classNames
:
'popupExtClass'
})
this
.
props
.
uploadErrs
(
2
);
this
.
props
.
uploadErrs
(
2
);
}
}
...
@@ -62,21 +60,18 @@ export default class FinishAskContainer extends React.Component{
...
@@ -62,21 +60,18 @@ export default class FinishAskContainer extends React.Component{
style=
{
{
'width'
:
UTILPATH
.
getRemByPx
(
260
),
'marginLeft'
:
UTILPATH
.
getRemByPx
(
30
),
'borderRadius'
:
UTILPATH
.
getRemByPx
(
10
)}
}
style=
{
{
'width'
:
UTILPATH
.
getRemByPx
(
260
),
'marginLeft'
:
UTILPATH
.
getRemByPx
(
30
),
'borderRadius'
:
UTILPATH
.
getRemByPx
(
10
)}
}
callback=
{
this
.
closeDoor
}
callback=
{
this
.
closeDoor
}
/>;
/>;
this
.
props
.
showPopup
({
let
popDom
=
<
PopModel
popupText=
{
"您的任务是否已结束"
}
popupButtons=
{
[
btnDom
,
clockDom
]
}
/>
popupText
:
'您的任务是否已结束'
,
this
.
props
.
showPopup
({
popupChild
:
popDom
});
popupButtons
:[
btnDom
,
clockDom
]
});
this
.
props
.
uploadErrs
(
2
);
this
.
props
.
uploadErrs
(
2
);
}
}
render
(){
render
(){
let
{
userInfo
,
store
Info
}
=
this
.
props
;
let
{
header
Info
}
=
this
.
props
;
return
(
return
(
<
div
>
<
div
>
<
HeaderComponent
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
headerInfo=
{
headerInfo
}
storeInfo=
{
storeInfo
}
/>
/>
<
div
className=
{
"finishAskContainer"
}
>
<
div
className=
{
"finishAskContainer"
}
>
<
div
className=
{
"finishAskText font32"
}
>
<
div
className=
{
"finishAskText font32"
}
>
...
...
client/containers/HomeContainer/HomeContainer.jsx
View file @
f9c40116
...
@@ -22,13 +22,12 @@ export default class HomeContainer extends React.Component{
...
@@ -22,13 +22,12 @@ export default class HomeContainer extends React.Component{
render
(){
render
(){
let
props
=
this
.
props
;
let
props
=
this
.
props
;
let
{
userInfo
,
store
Info
,
judgeDoorStatus
}
=
props
;
let
{
header
Info
,
judgeDoorStatus
}
=
props
;
return
(
return
(
<
div
>
<
div
>
<
HeaderComponent
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
headerInfo=
{
headerInfo
}
storeInfo=
{
storeInfo
}
/>
/>
<
div
className=
{
"homeContainer"
}
>
<
div
className=
{
"homeContainer"
}
>
<
img
className=
{
"homeIcon"
}
src=
{
UTILPATH
.
localImg
.
defaultImg
}
alt=
""
/>
<
img
className=
{
"homeIcon"
}
src=
{
UTILPATH
.
localImg
.
defaultImg
}
alt=
""
/>
...
...
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
View file @
f9c40116
This diff is collapsed.
Click to expand it.
client/containers/PageContainer/PageContainer.jsx
View file @
f9c40116
...
@@ -108,7 +108,7 @@ class PageContainer extends React.Component {
...
@@ -108,7 +108,7 @@ class PageContainer extends React.Component {
this
.
taskTypeOption
=
{
this
.
taskTypeOption
=
{
'
FIRST
'
:
this
.
showTroublePage
,
'
ER
'
:
this
.
showTroublePage
,
'SECOND'
:
this
.
showSecondTroubelPage
'SECOND'
:
this
.
showSecondTroubelPage
};
};
}
}
...
@@ -140,6 +140,9 @@ class PageContainer extends React.Component {
...
@@ -140,6 +140,9 @@ class PageContainer extends React.Component {
console
.
log
(
data
);
console
.
log
(
data
);
dispatch
(
saveCommonInfo
({
ip
:
data
.
ip
}));
dispatch
(
saveCommonInfo
({
ip
:
data
.
ip
}));
dispatch
(
getStoreInfo
(
data
.
storeId
));
dispatch
(
getStoreInfo
(
data
.
storeId
));
//dispatch(saveCommonInfo({userInfo:{employeeId:20}}));
//dispatch(getUserinfo(20,data.storeId));
});
});
on
(
CONFIG
.
socketType
.
GETSOCKETMSG
,
this
,
function
(
data
)
{
on
(
CONFIG
.
socketType
.
GETSOCKETMSG
,
this
,
function
(
data
)
{
console
.
log
(
"==GETSTOREINFO==="
)
console
.
log
(
"==GETSTOREINFO==="
)
...
@@ -170,6 +173,7 @@ class PageContainer extends React.Component {
...
@@ -170,6 +173,7 @@ class PageContainer extends React.Component {
if
(
storeInfo
&&
userinfo
&&
if
(
storeInfo
&&
userinfo
&&
storeInfo
.
id
&&
userinfo
.
employeeId
storeInfo
.
id
&&
userinfo
.
employeeId
){
){
dispatch
(
saveCommonInfo
({
userInfo
:{
employeeId
:
userinfo
.
employeeId
}}));
dispatch
(
getUserinfo
(
userinfo
.
employeeId
,
storeInfo
.
id
))
dispatch
(
getUserinfo
(
userinfo
.
employeeId
,
storeInfo
.
id
))
}
}
if
(
info
.
area
){
if
(
info
.
area
){
...
@@ -209,13 +213,14 @@ class PageContainer extends React.Component {
...
@@ -209,13 +213,14 @@ class PageContainer extends React.Component {
let
nextCommonInfo
=
state
.
commonInfo
;
let
nextCommonInfo
=
state
.
commonInfo
;
let
nextUserInfo
=
nextCommonInfo
.
userInfo
||
{};
let
nextUserInfo
=
nextCommonInfo
.
userInfo
||
{};
if
(
nextUserInfo
&&
nextUserInfo
.
taskType
&&
nextUserInfo
.
id
)
{
if
(
nextUserInfo
&&
nextUserInfo
.
taskType
&&
nextUserInfo
.
id
)
{
let
commonInfo
=
state
.
commonInfo
;
let
commonInfo
=
this
.
props
.
state
.
commonInfo
;
let
{
userInfo
=
{}}
=
commonInfo
.
userInfo
;
let
{
userInfo
=
{}}
=
commonInfo
;
if
(
!
userInfo
||
!
userInfo
.
taskType
||
!
userInfo
.
id
||
(
if
(
!
userInfo
||
!
userInfo
.
taskType
||
!
userInfo
.
id
||
(
userInfo
.
id
!==
nextUserInfo
.
id
userInfo
.
id
!==
nextUserInfo
.
id
||
(
userInfo
.
employeeId
!==
nextUserInfo
.
employeeId
)
)
||
(
)
||
(
userInfo
.
taskType
!==
nextUserInfo
.
taskType
userInfo
.
taskType
!==
nextUserInfo
.
taskType
)){
)){
console
.
log
(
"componentWillReceiveProps in "
,
nextUserInfo
);
//如果不是同一个用户或者不是同一个任务,会再次进入
//如果不是同一个用户或者不是同一个任务,会再次进入
this
.
dealPageByType
(
nextUserInfo
.
taskType
);
this
.
dealPageByType
(
nextUserInfo
.
taskType
);
}
}
...
@@ -225,7 +230,6 @@ class PageContainer extends React.Component {
...
@@ -225,7 +230,6 @@ class PageContainer extends React.Component {
if
(
nextUserInfo
.
taskType
===
"SECOND"
&&
nextTaskInfo
&&
nextTaskInfo
.
currentTaskType
){
if
(
nextUserInfo
.
taskType
===
"SECOND"
&&
nextTaskInfo
&&
nextTaskInfo
.
currentTaskType
){
switch
(
nextTaskInfo
.
currentTaskType
)
{
switch
(
nextTaskInfo
.
currentTaskType
)
{
case
'LR'
:
case
'LR'
:
console
.
log
(
"遗留上报任务,吴加宝"
)
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
break
;
case
'CK'
:
case
'CK'
:
...
@@ -283,6 +287,7 @@ class PageContainer extends React.Component {
...
@@ -283,6 +287,7 @@ class PageContainer extends React.Component {
}
}
showTroublePage
(
info
){
showTroublePage
(
info
){
console
.
log
(
"showTroublePage "
,
info
)
let
{
dispatch
}
=
this
.
props
;
let
{
dispatch
}
=
this
.
props
;
dispatch
(
getTroubleList
(
info
))
dispatch
(
getTroubleList
(
info
))
this
.
setState
({
this
.
setState
({
...
@@ -331,7 +336,6 @@ class PageContainer extends React.Component {
...
@@ -331,7 +336,6 @@ class PageContainer extends React.Component {
}
}
countBack
(){
countBack
(){
console
.
log
(
"countbackTimer "
,
this
.
countbackTimer
,)
if
(
!
this
.
countbackTimer
&&
this
.
countBackTime
>=
0
){
if
(
!
this
.
countbackTimer
&&
this
.
countBackTime
>=
0
){
this
.
countBackTime
--
;
this
.
countBackTime
--
;
this
.
countbackTimer
=
window
.
setTimeout
(()
=>
{
this
.
countbackTimer
=
window
.
setTimeout
(()
=>
{
...
@@ -520,8 +524,7 @@ class PageContainer extends React.Component {
...
@@ -520,8 +524,7 @@ class PageContainer extends React.Component {
pages
=
<
TroubleContainer
pages
=
<
TroubleContainer
troubleList=
{
state
.
troubleList
}
troubleList=
{
state
.
troubleList
}
refreshImg
=
{
state
.
refreshImg
}
refreshImg
=
{
state
.
refreshImg
}
storeInfo=
{
commonInfo
.
storeInfo
}
headerInfo
=
{
commonInfo
}
userInfo=
{
state
.
userInfo
}
initTroubleList=
{
(
info
)
=>
dispatch
(
getTroubleList
(
info
))
}
initTroubleList=
{
(
info
)
=>
dispatch
(
getTroubleList
(
info
))
}
showTextArea=
{
(
text
)
=>
this
.
showTextArea
(
text
)
}
showTextArea=
{
(
text
)
=>
this
.
showTextArea
(
text
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
...
@@ -529,15 +532,13 @@ class PageContainer extends React.Component {
...
@@ -529,15 +532,13 @@ class PageContainer extends React.Component {
changePages=
{
(
pageIndex
)
=>
this
.
changePages
(
pageIndex
)
}
changePages=
{
(
pageIndex
)
=>
this
.
changePages
(
pageIndex
)
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
updateTroubleList=
{
(
info
)
=>
dispatch
(
updateTroubleList
(
info
,
state
.
header
Info
))
}
updateTroubleList=
{
(
info
)
=>
dispatch
(
updateTroubleList
(
info
,
common
Info
))
}
emptyImg=
{
()
=>
dispatch
(
emptyImg
())
}
emptyImg=
{
()
=>
dispatch
(
emptyImg
())
}
/>;
/>;
break
;
break
;
case
showPage
[
2
]:
case
showPage
[
2
]:
pages
=
<
ScanBarCodeContainer
pages
=
<
ScanBarCodeContainer
headerInfo
=
{
commonInfo
}
headerInfo
=
{
commonInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
getProductInfo
=
{(
postData
)=
>
dispatch(scanBarCodeGetProductInfo(postData))}
getProductInfo
=
{(
postData
)=
>
dispatch(scanBarCodeGetProductInfo(postData))}
submitProductInfo =
{
(
postData
)
=>
dispatch
(
submitProductInfo
(
postData
))
}
submitProductInfo =
{
(
postData
)
=>
dispatch
(
submitProductInfo
(
postData
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
...
@@ -555,8 +556,6 @@ class PageContainer extends React.Component {
...
@@ -555,8 +556,6 @@ class PageContainer extends React.Component {
deleteDamageItem =
{
(
postData
)
=>
{
dispatch
(
deleteDamageItem
(
postData
))}
}
deleteDamageItem =
{
(
postData
)
=>
{
dispatch
(
deleteDamageItem
(
postData
))}
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
headerInfo =
{
commonInfo
}
headerInfo =
{
commonInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
state =
{
state
}
state =
{
state
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
...
@@ -572,23 +571,19 @@ class PageContainer extends React.Component {
...
@@ -572,23 +571,19 @@ class PageContainer extends React.Component {
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
headerInfo =
{
commonInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
state =
{
state
}
state =
{
state
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
/
>
;
/
>
;
break;
break;
case showPage[7]:
case showPage[7]:
pages =
<
HomeContainer
showClock=
{
this
.
state
.
showClock
}
storeInfo=
{
state
.
storeInfo
}
pages =
<
HomeContainer
showClock=
{
this
.
state
.
showClock
}
userInfo=
{
state
.
user
Info
}
headerInfo=
{
common
Info
}
judgeDoorStatus=
{
this
.
judgeDoorStatus
}
judgeDoorStatus=
{
this
.
judgeDoorStatus
}
/>
;
/>
;
break;
break;
case showPage[8]:
case showPage[8]:
pages =
<
FinishAskContainer
storeInfo=
{
state
.
storeInfo
}
pages =
<
FinishAskContainer
headerInfo=
{
commonInfo
}
userInfo=
{
state
.
userInfo
}
endCountBack=
{
this
.
endCountBack
}
endCountBack=
{
this
.
endCountBack
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
showOpenDoorPage=
{
()
=>
this
.
showOpenDoorPage
.
bind
(
this
)()
}
showOpenDoorPage=
{
()
=>
this
.
showOpenDoorPage
.
bind
(
this
)()
}
...
...
client/containers/ReportDamagesListContainer/ReportDamagesListContainer.jsx
View file @
f9c40116
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
import
React
from
'react'
;
import
React
from
'react'
;
import
SwiperComponent
from
'../../components/CommonComponent/SwiperComponent/SwiperComponent'
import
SwiperComponent
from
'../../components/CommonComponent/SwiperComponent/SwiperComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
{
connect
}
from
'react-redux'
;
require
(
'./index.css'
);
require
(
'./index.css'
);
import
DamageItem
from
'../../components/ReportDamageListComponent/DamageItemComponent/DamageItem'
import
DamageItem
from
'../../components/ReportDamageListComponent/DamageItemComponent/DamageItem'
...
@@ -11,19 +10,20 @@ export default class ReportDamagesListContainer extends React.Component{
...
@@ -11,19 +10,20 @@ export default class ReportDamagesListContainer extends React.Component{
super
(
props
)
super
(
props
)
}
}
componentWillMount
(){
componentWillMount
(){
let
{
getReportDamageList
,
state
}
=
this
.
props
;
let
{
getReportDamageList
,
state
,
headerInfo
}
=
this
.
props
;
let
{
userInfo
,
headerInfo
,
storeInfo
}
=
state
;
let
{
taskInfo
=
{},
storeInfo
=
{}}
=
headerInfo
;
let
postData
=
{};
let
postData
=
{};
postData
.
taskId
=
headerInfo
.
taskId
?
header
Info
.
taskId
:
""
;
postData
.
taskId
=
taskInfo
.
taskId
?
task
Info
.
taskId
:
""
;
postData
.
storeId
=
headerInfo
.
storeI
d
;
postData
.
storeId
=
storeInfo
.
i
d
;
getReportDamageList
(
postData
)
getReportDamageList
(
postData
)
}
}
hanldeDeleteDamageItem
(
data
){
hanldeDeleteDamageItem
(
data
){
let
postData
=
{};
let
postData
=
{};
let
{
deleteDamageItem
,
state
}
=
this
.
props
;
let
{
deleteDamageItem
,
state
}
=
this
.
props
;
let
{
headerInfo
}
=
state
;
let
{
commonInfo
=
{}}
=
state
;
let
taskId
=
headerInfo
.
taskId
?
headerInfo
.
taskId
:
""
;
let
{
userInfo
=
{},
storeInfo
=
{},
taskInfo
=
{}}
=
commonInfo
;
let
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
""
;
let
taskId
=
taskInfo
.
taskId
?
taskInfo
.
taskId
:
""
;
let
storeId
=
storeInfo
.
id
?
storeInfo
.
id
:
""
;
postData
.
inventoryLossId
=
data
;
postData
.
inventoryLossId
=
data
;
postData
.
storeId
=
storeId
;
postData
.
storeId
=
storeId
;
postData
.
taskId
=
taskId
;
postData
.
taskId
=
taskId
;
...
@@ -39,7 +39,7 @@ export default class ReportDamagesListContainer extends React.Component{
...
@@ -39,7 +39,7 @@ export default class ReportDamagesListContainer extends React.Component{
}
}
render
(){
render
(){
let
{
reportDamageList
,
userInfo
,
store
Info
}
=
this
.
props
.
state
;
let
{
reportDamageList
,
common
Info
}
=
this
.
props
.
state
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
reportDamageListUi
=
[];
let
reportDamageListUi
=
[];
if
(
reportDamageList
&&
reportDamageList
.
length
>
0
){
if
(
reportDamageList
&&
reportDamageList
.
length
>
0
){
...
@@ -65,8 +65,7 @@ export default class ReportDamagesListContainer extends React.Component{
...
@@ -65,8 +65,7 @@ export default class ReportDamagesListContainer extends React.Component{
<
div
className=
{
"ReportDamagesListContainer"
}
>
<
div
className=
{
"ReportDamagesListContainer"
}
>
<
HeaderComponent
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
headerInfo=
{
commonInfo
}
storeInfo=
{
storeInfo
}
/>
/>
<
div
className=
{
"damageTitleContainer"
}
>
故障相关报损商品(非货架区)
</
div
>
<
div
className=
{
"damageTitleContainer"
}
>
故障相关报损商品(非货架区)
</
div
>
<
div
className=
{
"damageProductList"
}
>
<
div
className=
{
"damageProductList"
}
>
...
@@ -90,7 +89,4 @@ export default class ReportDamagesListContainer extends React.Component{
...
@@ -90,7 +89,4 @@ export default class ReportDamagesListContainer extends React.Component{
)
)
}
}
}
function
select
(
store
)
{
return
Object
.
assign
({},
{
state
:
store
})
}
}
\ No newline at end of file
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
View file @
f9c40116
...
@@ -5,7 +5,7 @@ import ProductDetailItem from '../../components/ScanBarCodeComponent/ProductDeta
...
@@ -5,7 +5,7 @@ import ProductDetailItem from '../../components/ScanBarCodeComponent/ProductDeta
import
PopupComponent
from
'../../components/CommonComponent/PopupComponent/PopupComponent'
import
PopupComponent
from
'../../components/CommonComponent/PopupComponent/PopupComponent'
import
ButtonComponent
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
ButtonComponent
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
Qrcode
from
'../../components/CommonComponent/Qrcode/Qrcode'
import
Qrcode
from
'../../components/CommonComponent/Qrcode/Qrcode'
import
PopupModel
from
'../../components/CommonComponent/PopupComponent/PopupMiddleComponent'
require
(
'./index.css'
);
require
(
'./index.css'
);
export
default
class
ScanBarCodeContainer
extends
React
.
Component
{
export
default
class
ScanBarCodeContainer
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -32,7 +32,7 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -32,7 +32,7 @@ export default class ScanBarCodeContainer extends React.Component{
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
//显示查询到的商品的数据
//显示查询到的商品的数据
let
{
state
,
changePages
}
=
nextProps
;
let
{
state
,
changePages
}
=
nextProps
;
let
{
scanBarCode
,
userInfo
,
store
Info
,
refreshImg
,
errMsg
}
=
state
;
let
{
scanBarCode
,
header
Info
,
refreshImg
,
errMsg
}
=
state
;
let
productInfo
=
state
.
scanBarCode
;
let
productInfo
=
state
.
scanBarCode
;
let
{
inventorylossId
,
skuBaseInfoVo
,
packingList
,
positionList
,
data_currentProblemObj
,
submit
}
=
productInfo
;
let
{
inventorylossId
,
skuBaseInfoVo
,
packingList
,
positionList
,
data_currentProblemObj
,
submit
}
=
productInfo
;
let
{
clearProductSuccess
,
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
clearProductSuccess
,
showPopup
,
hidePopup
}
=
this
.
props
;
...
@@ -93,21 +93,21 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -93,21 +93,21 @@ export default class ScanBarCodeContainer extends React.Component{
this
.
setState
({
this
.
setState
({
showPopup
:
true
,
showPopup
:
true
,
popupInfo
:{
popupInfo
:{
"popupText"
:
"输入合法的条形码"
,
popupText
:
"输入合法的条形码"
,
"showPopup"
:
true
,
showPopup
:
true
,
"popupButtons"
:
[<
ButtonComponent
key=
{
"btn"
+
this
.
state
.
barCodeValue
}
option=
{
this
.
handleTryAgainClick
.
bind
(
this
)
}
text=
{
"再次尝试"
}
/>]
popupButtons
:
[<
ButtonComponent
key=
{
"btn"
+
this
.
state
.
barCodeValue
}
option=
{
this
.
handleTryAgainClick
.
bind
(
this
)
}
text=
{
"再次尝试"
}
/>]
}
}
})
})
return
return
}
}
// 2. 请求查询接口
// 2. 请求查询接口
//准备查询数据
//准备查询数据
let
{
getProductInfo
,
state
}
=
this
.
props
;
let
{
getProductInfo
,
state
,
headerInfo
}
=
this
.
props
;
let
{
headerInfo
}
=
state
;
let
{
taskInfo
=
{},
storeInfo
=
{},
userInfo
=
{}}
=
headerInfo
;
let
postData
=
{};
let
postData
=
{};
postData
.
warehouseId
=
headerInfo
.
storeId
?
Number
(
headerInfo
.
storeI
d
):
""
;
postData
.
warehouseId
=
storeInfo
.
id
?
Number
(
storeInfo
.
i
d
):
""
;
postData
.
taskId
=
headerInfo
.
taskId
?
Number
(
header
Info
.
taskId
):
""
;
postData
.
taskId
=
taskInfo
.
taskId
?
Number
(
task
Info
.
taskId
):
""
;
postData
.
sellOrderId
=
headerInfo
.
sellOrderId
?
Number
(
header
Info
.
sellOrderId
):
""
;
postData
.
sellOrderId
=
taskInfo
.
sellOrderId
?
Number
(
task
Info
.
sellOrderId
):
""
;
postData
.
skuBarcode
=
String
(
this
.
state
.
barCodeValue
);
postData
.
skuBarcode
=
String
(
this
.
state
.
barCodeValue
);
getProductInfo
(
postData
);
getProductInfo
(
postData
);
this
.
setState
({
this
.
setState
({
...
@@ -171,17 +171,20 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -171,17 +171,20 @@ export default class ScanBarCodeContainer extends React.Component{
}
}
//点击编辑报损的商品的提交按钮
//点击编辑报损的商品的提交按钮
handleSubmitProductInfo
(
data
){
handleSubmitProductInfo
(
data
){
let
{
submitProductInfo
,
userInfo
,
storeInfo
,
headerInfo
}
=
this
.
props
;
let
{
submitProductInfo
,
headerInfo
}
=
this
.
props
;
//检查如果选择了 包装损坏还没有上传图片的话进行提示
//检查如果选择了 包装损坏还没有上传图片的话进行提示
let
{
taskInfo
=
{}}
=
headerInfo
;
let
pakageStatus
=
data
.
packingStatus
;
let
pakageStatus
=
data
.
packingStatus
;
let
packingStatusImageIds
=
data
.
data_currentProblemObj
;
let
packingStatusImageIds
=
data
.
data_currentProblemObj
;
data
.
taskId
=
headerInfo
.
taskId
?
Number
(
header
Info
.
taskId
):
""
data
.
taskId
=
taskInfo
.
taskId
?
Number
(
task
Info
.
taskId
):
""
submitProductInfo
(
data
);
submitProductInfo
(
data
);
}
}
render
()
{
render
()
{
let
{
state
}
=
this
.
props
;
let
{
state
,
headerInfo
}
=
this
.
props
;
let
{
userInfo
,
storeInfo
}
=
state
;
let
productInfo
=
state
.
scanBarCode
;
let
productInfo
=
state
.
scanBarCode
;
console
.
log
(
"popupInfo "
,
this
.
state
.
popupInfo
);
let
{
popupText
=
""
,
popupButtons
=
[],
popupChild
=
null
,
showPopup
=
false
}
=
this
.
state
.
popupInfo
;
console
.
log
(
"showPopup "
,
showPopup
)
return
(
return
(
<
div
className=
{
"scanBarCodeContainer"
}
>
<
div
className=
{
"scanBarCodeContainer"
}
>
{
this
.
state
.
showQr
?(
{
this
.
state
.
showQr
?(
...
@@ -190,8 +193,7 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -190,8 +193,7 @@ export default class ScanBarCodeContainer extends React.Component{
<
div
>
<
div
>
<
HeaderComponent
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
headerInfo=
{
headerInfo
}
storeInfo=
{
storeInfo
}
/>
/>
<
div
className=
{
"container"
}
>
<
div
className=
{
"container"
}
>
<
div
className=
{
"inputContaienr"
}
>
<
div
className=
{
"inputContaienr"
}
>
...
@@ -201,7 +203,12 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -201,7 +203,12 @@ export default class ScanBarCodeContainer extends React.Component{
</
div
>
</
div
>
{
{
this
.
state
.
showProductInfo
?(
this
.
state
.
showProductInfo
?(
<
PopupComponent
popupInfo
=
{
this
.
state
.
popupInfo
}
/>
<
PopupComponent
popupInfo=
{
this
.
state
.
popupInfo
}
>
{
popupChild
?
popupChild
:
<
PopupModel
popupText=
{
popupText
}
popupButtons=
{
popupButtons
}
/>
}
</
PopupComponent
>
):
""
):
""
}
}
</
div
>
</
div
>
...
...
client/containers/TroubleContainer/TroubleContainer.jsx
View file @
f9c40116
...
@@ -6,6 +6,7 @@ import TextArea from "../../components/CommonComponent/TextAreaContainer/TextAre
...
@@ -6,6 +6,7 @@ import TextArea from "../../components/CommonComponent/TextAreaContainer/TextAre
import
Qrcode
from
'../../components/CommonComponent/Qrcode/Qrcode'
import
Qrcode
from
'../../components/CommonComponent/Qrcode/Qrcode'
import
FinishTrouble
from
'../../components/TroubleComponent/FinishTroubleComponent/FinishTroubleComponent'
import
FinishTrouble
from
'../../components/TroubleComponent/FinishTroubleComponent/FinishTroubleComponent'
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
PopModel
from
'../../components/CommonComponent/PopupComponent/PopupMiddleComponent'
require
(
'./index.css'
)
require
(
'./index.css'
)
const
showDom
=
{
const
showDom
=
{
...
@@ -199,12 +200,10 @@ export default class TroubleContainer extends React.Component{
...
@@ -199,12 +200,10 @@ export default class TroubleContainer extends React.Component{
if
(
hasChange
){
if
(
hasChange
){
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnDom1
=
<
Button
key=
{
"textGoBackTrouble1"
}
style=
{
{
'width'
:
btnWidth
,
'marginRight'
:
btnMarginLeft
}
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom1
=
<
Button
btnContainer=
{
"btne5"
}
key=
{
"textGoBackTrouble1"
}
style=
{
{
'width'
:
btnWidth
,
'marginRight'
:
btnMarginLeft
}
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
key=
{
"textGoBackTrouble2"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"放弃"
}
option=
{
this
.
abandonSaveText
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"btne5"
}
key=
{
"textGoBackTrouble2"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"放弃"
}
option=
{
this
.
abandonSaveText
}
/>
showPopup
({
let
popDom
=
<
PopModel
popupText=
{
"是否放弃更新编辑的内容?"
}
popupButtons=
{
[
btnDom1
,
btnDom2
]
}
/>
popupText
:
'是否放弃更新编辑的内容?'
,
showPopup
({
popupChild
:
popDom
});
popupButtons
:[
btnDom1
,
btnDom2
]
})
}
else
{
}
else
{
this
.
abandonSaveText
();
this
.
abandonSaveText
();
}
}
...
@@ -219,12 +218,10 @@ export default class TroubleContainer extends React.Component{
...
@@ -219,12 +218,10 @@ export default class TroubleContainer extends React.Component{
return
!
d
.
isExistProblem
||
(
d
.
isExistProblem
===
1
&&
!
d
.
explanation
)
return
!
d
.
isExistProblem
||
(
d
.
isExistProblem
===
1
&&
!
d
.
explanation
)
});
});
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnDom
=
<
Button
key=
{
"dealTrouble1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"关闭"
}
option=
{
hidePopup
}
/>
let
btnDom
=
<
Button
btnContainer=
{
"btne5"
}
key=
{
"dealTrouble1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"关闭"
}
option=
{
hidePopup
}
/>
if
(
arr
&&
arr
.
length
>
0
){
if
(
arr
&&
arr
.
length
>
0
){
showPopup
({
let
popDom
=
<
PopModel
popupText=
{
"请完成所有需要处理的故障的必填项"
}
popupButtons=
{
[
btnDom
]
}
/>
popupText
:
'请完成所有需要处理的故障的必填项'
,
showPopup
({
popupChild
:
popDom
});
popupButtons
:[
btnDom
]
})
}
else
{
}
else
{
details
.
forEach
((
d
)
=>
{
details
.
forEach
((
d
)
=>
{
d
.
imagesFileId
=
Array
.
isArray
(
d
.
files
)
?
d
.
files
.
map
(
f
=>
f
.
id
).
join
(
','
)
:
d
.
imagesFileId
;
d
.
imagesFileId
=
Array
.
isArray
(
d
.
files
)
?
d
.
files
.
map
(
f
=>
f
.
id
).
join
(
','
)
:
d
.
imagesFileId
;
...
@@ -240,10 +237,11 @@ export default class TroubleContainer extends React.Component{
...
@@ -240,10 +237,11 @@ export default class TroubleContainer extends React.Component{
}
}
getDefaultDom
(){
getDefaultDom
(){
let
{
userInfo
,
store
Info
,
getRefreshImg
,
deleteImg
,
changePages
,
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
header
Info
,
getRefreshImg
,
deleteImg
,
changePages
,
showPopup
,
hidePopup
}
=
this
.
props
;
let
troubleList
=
this
.
state
.
troubleList
;
let
troubleList
=
this
.
state
.
troubleList
;
let
showTrouble
=
Array
.
isArray
(
troubleList
.
details
)
&&
troubleList
.
details
.
length
>
0
;
let
showTrouble
=
Array
.
isArray
(
troubleList
.
details
)
&&
troubleList
.
details
.
length
>
0
;
let
details
=
Array
.
isArray
(
troubleList
.
details
)
?
troubleList
.
details
:
[];
let
details
=
Array
.
isArray
(
troubleList
.
details
)
?
troubleList
.
details
:
[];
console
.
log
(
details
);
let
imgLength
=
details
.
map
(
d
=>
Array
.
isArray
(
d
.
files
)
?
d
.
files
.
length
:
0
).
reduce
((
pre
,
next
)
=>
{
return
pre
+
next
},
0
);
let
imgLength
=
details
.
map
(
d
=>
Array
.
isArray
(
d
.
files
)
?
d
.
files
.
length
:
0
).
reduce
((
pre
,
next
)
=>
{
return
pre
+
next
},
0
);
let
dom
=
details
.
map
((
i
,
k
)
=>
{
let
dom
=
details
.
map
((
i
,
k
)
=>
{
return
<
TroubleItem
key=
{
k
}
item=
{
i
}
num=
{
k
+
1
}
setItem=
{
this
.
setItem
}
return
<
TroubleItem
key=
{
k
}
item=
{
i
}
num=
{
k
+
1
}
setItem=
{
this
.
setItem
}
...
@@ -282,8 +280,7 @@ export default class TroubleContainer extends React.Component{
...
@@ -282,8 +280,7 @@ export default class TroubleContainer extends React.Component{
<
div
className=
{
"toubleContainer "
+
(
showTrouble
?
''
:
'hide'
)
}
>
<
div
className=
{
"toubleContainer "
+
(
showTrouble
?
''
:
'hide'
)
}
>
<
HeaderComponent
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
headerInfo=
{
headerInfo
}
storeInfo=
{
storeInfo
}
/>
/>
{
{
...
...
client/reducers/TokeStokeContainer.js
View file @
f9c40116
import
tokeActionType
from
'../actiontype/TokeStokeContainer'
import
tokeActionType
from
'../actiontype/TokeStokeContainer'
console
.
log
(
tokeActionType
,
'reducer'
)
const
addTokeState
=
(
state
,
data
)
=>
{
const
addTokeState
=
(
state
,
data
)
=>
{
return
Object
.
assign
({},
state
,
data
)
return
Object
.
assign
({},
state
,
data
)
...
...
client/reducers/trouble.js
View file @
f9c40116
import
actionTypes
from
'../actiontype/trouble'
;
import
actionTypes
from
'../actiontype/trouble'
;
let
data
=
{
"details"
:
[
{
"id"
:
1634
,
"errorCode"
:
"ER00001"
,
"type"
:
"KN"
,
"description"
:
"2:左侧动作故障,4:机械手移动到放货位置出错()"
,
"files"
:
[
{
"id"
:
16
,
"filePath"
:
"/tmp/2016-08-16/1471329685902.jpg"
},
{
"id"
:
17
,
"filePath"
:
"/sku/0/0/427/1471329704482.jpg"
},
{
"id"
:
18
,
"filePath"
:
"/sku/0/0/426/1471330380712.jpg"
}
],
},
{
"id"
:
1
,
"errorCode"
:
null
,
"type"
:
"OP"
,
"files"
:
[
{
"id"
:
16
,
"filePath"
:
"/tmp/2016-08-16/1471329685902.jpg"
},
{
"id"
:
17
,
"filePath"
:
"/sku/0/0/427/1471329704482.jpg"
},
{
"id"
:
18
,
"filePath"
:
"/sku/0/0/426/1471330380712.jpg"
}
],
"parentProblemName"
:
"机械故障"
,
"subProblemName"
:
"其他问题111"
}
],
"employee"
:
{
"id"
:
5
,
"employeeName"
:
"机器库管员"
,
"headImageUrl"
:
"/static/coupon/gounian/banner_hongbaotupian-3-14.jpg"
},
"taskIds"
:
[
155
]
}
const
dealTroubleList
=
(
data
)
=>
{
const
dealTroubleList
=
(
data
)
=>
{
let
defaultInfo
=
{
let
defaultInfo
=
{
...
@@ -65,7 +12,7 @@ const dealTroubleList = (data)=>{
...
@@ -65,7 +12,7 @@ const dealTroubleList = (data)=>{
};
};
let
info
=
Object
.
assign
({},
defaultInfo
,
data
);
let
info
=
Object
.
assign
({},
defaultInfo
,
data
);
info
.
details
=
info
.
details
.
map
((
i
)
=>
{
info
.
details
=
info
.
details
.
map
((
i
)
=>
{
return
Object
.
assign
({},
i
,
defaultDetailItem
);
return
Object
.
assign
({},
defaultDetailItem
,
i
);
});
});
return
info
;
return
info
;
};
};
...
...
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