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
cca6cc8a
Commit
cca6cc8a
authored
6 years ago
by
yaxiLiuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
âfixed the p1 bugsâ
parent
26a7ee62
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
14 deletions
+69
-14
client/actions/otherQuestion.js
+7
-0
client/components/OtherQuestionComponent/EditProblemComponent.jsx
+21
-3
client/containers/FinishAskContainer/FinishAskContainer.jsx
+1
-1
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
+35
-5
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
+5
-5
No files found.
client/actions/otherQuestion.js
View file @
cca6cc8a
...
@@ -73,7 +73,14 @@ export function deleteProblem(postData) {
...
@@ -73,7 +73,14 @@ export function deleteProblem(postData) {
.
then
(
.
then
(
(
json
)
=>
{
(
json
)
=>
{
if
(
json
.
meta
.
success
){
if
(
json
.
meta
.
success
){
if
(
postData
.
type
==
"deleteProblemAll"
){
dispatch
(
deleteProblemSuccess
({
"submitOtherProblem"
:
true
,
"feedIds"
:
json
.
data
.
feedIds
}))
dispatch
(
deleteProblemSuccess
({
"submitOtherProblem"
:
true
,
"feedIds"
:
json
.
data
.
feedIds
}))
}
if
(
postData
.
type
==
"deleteProblemOne"
){
dispatch
(
deleteProblemSuccess
({
"feedIds"
:
json
.
data
.
feedIds
}))
}
}
else
{
}
else
{
}
}
...
...
This diff is collapsed.
Click to expand it.
client/components/OtherQuestionComponent/EditProblemComponent.jsx
View file @
cca6cc8a
...
@@ -57,6 +57,7 @@ export default class EditProblemItem extends React.Component{
...
@@ -57,6 +57,7 @@ export default class EditProblemItem extends React.Component{
}
}
handleShowElement
(
value
){
handleShowElement
(
value
){
let
that
=
this
;
if
(
value
==
"showDetailElement"
){
if
(
value
==
"showDetailElement"
){
//点击了 小分类 检查如果大分类未选择则进行提示
//点击了 小分类 检查如果大分类未选择则进行提示
if
(
!
this
.
state
.
currentBigId
){
if
(
!
this
.
state
.
currentBigId
){
...
@@ -67,6 +68,13 @@ export default class EditProblemItem extends React.Component{
...
@@ -67,6 +68,13 @@ export default class EditProblemItem extends React.Component{
this
.
setState
(
this
.
setState
(
{
{
[
value
]:
!
this
.
state
[
value
]
[
value
]:
!
this
.
state
[
value
]
},()
=>
{
if
(
value
==
"showCategoryElement"
&&
!
this
.
state
.
showCategoryElement
){
that
.
setState
({
"showDetailElement"
:
false
})
}
}
}
)
)
}
}
...
@@ -82,7 +90,8 @@ export default class EditProblemItem extends React.Component{
...
@@ -82,7 +90,8 @@ export default class EditProblemItem extends React.Component{
let
childProblem
=
this
.
state
.
problemList
[
String
(
bigProblemId
)].
dicDetails
;
let
childProblem
=
this
.
state
.
problemList
[
String
(
bigProblemId
)].
dicDetails
;
this
.
setState
({
this
.
setState
({
currentDetailProblem
:
childProblem
,
currentDetailProblem
:
childProblem
,
currentBigId
:
bigProblemId
currentBigId
:
bigProblemId
,
showDetailElement
:
true
});
});
data
.
type
=
"problemType"
;
data
.
type
=
"problemType"
;
data
.
problemId
=
bigProblemId
;
data
.
problemId
=
bigProblemId
;
...
@@ -198,8 +207,17 @@ export default class EditProblemItem extends React.Component{
...
@@ -198,8 +207,17 @@ export default class EditProblemItem extends React.Component{
{
imgListUi
}
{
imgListUi
}
</
div
>
</
div
>
<
div
className=
{
"operationLeft"
}
>
<
div
className=
{
"operationLeft"
}
>
<
ImgToolComponent
type=
{
"add"
}
handleClikImgFunc
=
{
addImg
()}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
<
ImgToolComponent
<
ImgToolComponent
handleClikImgFunc
=
{
getRefreshImg
()}
type=
{
"refresh"
}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
disabled
=
{
this
.
state
.
currentBigId
||
this
.
state
.
currentSmallId
?
false
:
true
}
type=
{
"add"
}
handleClikImgFunc
=
{
addImg
()}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
<
ImgToolComponent
disabled
=
{
this
.
state
.
currentBigId
||
this
.
state
.
currentSmallId
?
false
:
true
}
handleClikImgFunc
=
{
getRefreshImg
()}
type=
{
"refresh"
}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
client/containers/FinishAskContainer/FinishAskContainer.jsx
View file @
cca6cc8a
...
@@ -84,7 +84,7 @@ export default class FinishAskContainer extends React.Component{
...
@@ -84,7 +84,7 @@ export default class FinishAskContainer extends React.Component{
</
div
>
</
div
>
<
div
className=
{
"finishAskButtons"
}
>
<
div
className=
{
"finishAskButtons"
}
>
<
Button
text=
{
"有"
}
style=
{
{
'marginTop'
:
'120px'
}
}
option=
{
this
.
selectTask
}
/>
<
Button
text=
{
"有"
}
style=
{
{
'marginTop'
:
'120px'
}
}
option=
{
this
.
selectTask
}
/>
<
Button
text=
{
"没有"
}
style=
{
{
'marginTop'
:
'40px'
}
}
option=
{
this
.
c
loseDoor
}
/>
<
Button
text=
{
"没有"
}
style=
{
{
'marginTop'
:
'40px'
}
}
option=
{
this
.
beginC
loseDoor
}
/>
<
Clock
style=
{
{
'marginTop'
:
'40px'
}
}
totalTime=
{
60
}
<
Clock
style=
{
{
'marginTop'
:
'40px'
}
}
totalTime=
{
60
}
callback=
{
this
.
judgeTask
}
/>
callback=
{
this
.
judgeTask
}
/>
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
View file @
cca6cc8a
...
@@ -63,11 +63,31 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -63,11 +63,31 @@ export default class OtherQuestionContainer extends React.Component{
currentProblemId
:
troubleId
currentProblemId
:
troubleId
})
})
}
}
handleRealExitEditRemarkOpeation
(
type
){
if
(
type
==
"exit"
){
this
.
setState
({
showTextArea
:
false
,
showPop
:
false
})
}
if
(
type
==
"cancel"
){
this
.
setState
({
showPop
:
false
})
}
}
// 2. 在编辑备注页面组件 点击返回
// 2. 在编辑备注页面组件 点击返回
handleEditGoBack
(){
handleEditGoBack
(){
this
.
setState
({
this
.
setState
({
showTextArea
:
false
showPop
:
true
,
popupInfo
:{
"popupText"
:
"是否放弃更新编辑的内容"
,
"showPopup"
:
true
,
"popupButtons"
:
[<
ButtonComponent
key=
{
"btn"
}
option=
{
this
.
handleRealExitEditRemarkOpeation
.
bind
(
this
,
"cancel"
)
}
text=
{
"取消"
}
/>,<
ButtonComponent
key=
{
"btn"
}
option=
{
this
.
handleRealExitEditRemarkOpeation
.
bind
(
this
,
"exit"
)
}
text=
{
"确定"
}
/>]
}
})
})
console
.
log
(
"点击文本框页的返回键"
);
console
.
log
(
"点击文本框页的返回键"
);
}
}
...
@@ -98,13 +118,14 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -98,13 +118,14 @@ export default class OtherQuestionContainer extends React.Component{
/*
/*
* 删除已经编辑的的问题
* 删除已经编辑的的问题
* */
* */
handleDeleteProblem
(
troubleId
){
handleDeleteProblem
(
troubleId
,
type
){
let
{
deleteProblem
,
headerInfo
}
=
this
.
props
;
let
{
deleteProblem
,
headerInfo
}
=
this
.
props
;
console
.
log
(
deleteProblem
);
console
.
log
(
deleteProblem
);
let
postData
=
{};
let
postData
=
{};
postData
.
feedIds
=
String
(
troubleId
);
postData
.
feedIds
=
String
(
troubleId
);
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
postData
.
type
=
type
;
deleteProblem
(
postData
);
deleteProblem
(
postData
);
}
}
...
@@ -139,7 +160,9 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -139,7 +160,9 @@ export default class OtherQuestionContainer extends React.Component{
let
problemsLength
=
postData
.
problems
.
length
;
let
problemsLength
=
postData
.
problems
.
length
;
let
needEdit
=
[];
let
needEdit
=
[];
postData
.
problems
.
map
((
item
,
index
)
=>
{
postData
.
problems
.
map
((
item
,
index
)
=>
{
if
(
item
.
problemType
==
undefined
){
console
.
log
(
"========提交====="
)
console
.
log
(
item
);
if
(
item
.
problemType
==
undefined
||
item
.
remark
==
""
){
needEdit
.
push
(
item
.
id
)
needEdit
.
push
(
item
.
id
)
}
}
if
(
index
+
1
==
postData
.
problems
.
length
&&
needEdit
.
length
==
0
){
if
(
index
+
1
==
postData
.
problems
.
length
&&
needEdit
.
length
==
0
){
...
@@ -210,6 +233,7 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -210,6 +233,7 @@ export default class OtherQuestionContainer extends React.Component{
postData
.
feedIds
=
""
;
postData
.
feedIds
=
""
;
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
postData
.
type
=
"deleteProblemAll"
deleteProblem
(
postData
);
deleteProblem
(
postData
);
}
}
//二维码返回
//二维码返回
...
@@ -244,7 +268,7 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -244,7 +268,7 @@ export default class OtherQuestionContainer extends React.Component{
baseInfo
=
{
item
}
baseInfo
=
{
item
}
remarkText
=
{
currentRemark
}
remarkText
=
{
currentRemark
}
getRefreshImg
=
{()=
>
(this.handleRefreshProbelmImg.bind(this,troubleId,this.state.taskTy))}
getRefreshImg
=
{()=
>
(this.handleRefreshProbelmImg.bind(this,troubleId,this.state.taskTy))}
deleteProblem =
{
()
=>
(
this
.
handleDeleteProblem
.
bind
(
this
,
troubleId
))
}
deleteProblem =
{
()
=>
(
this
.
handleDeleteProblem
.
bind
(
this
,
troubleId
,
"deleteProblemOne"
))
}
addImg =
{
()
=>
(
this
.
handleAddImg
.
bind
(
this
,
troubleId
))
}
addImg =
{
()
=>
(
this
.
handleAddImg
.
bind
(
this
,
troubleId
))
}
deleteImg =
{
(
errorId
,
type
,
fileId
)
=>
(
this
.
handleDeleteImg
.
bind
(
this
,
errorId
,
type
,
fileId
))
}
deleteImg =
{
(
errorId
,
type
,
fileId
)
=>
(
this
.
handleDeleteImg
.
bind
(
this
,
errorId
,
type
,
fileId
))
}
taskType =
{
this
.
state
.
taskTy
}
taskType =
{
this
.
state
.
taskTy
}
...
@@ -264,11 +288,17 @@ export default class OtherQuestionContainer extends React.Component{
...
@@ -264,11 +288,17 @@ export default class OtherQuestionContainer extends React.Component{
//控制Ui显示
//控制Ui显示
let elementUI = '';
let elementUI = '';
if(this.state.showTextArea)
{
if(this.state.showTextArea)
{
elementUI
=
<
TextArea
elementUI
=
<
div
>
<
TextArea
text=
{
this
.
state
.
tmpText
}
text=
{
this
.
state
.
tmpText
}
goBack=
{
this
.
handleEditGoBack
.
bind
(
this
)
}
goBack=
{
this
.
handleEditGoBack
.
bind
(
this
)
}
saveText=
{
this
.
handleSaveRemarkText
.
bind
(
this
)
}
saveText=
{
this
.
handleSaveRemarkText
.
bind
(
this
)
}
></
TextArea
>
></
TextArea
>
{
this
.
state
.
showPop
?(
<
PopupComponent
popupInfo
=
{
this
.
state
.
popupInfo
}
></
PopupComponent
>
):
""
}
</
div
>
}
else if(this.state.showQr)
{
}
else if(this.state.showQr)
{
elementUI
=
<
Qrcode
goBack=
{
this
.
handleQrBack
.
bind
(
this
)
}
url=
{
this
.
state
.
qrUrl
}
></
Qrcode
>
elementUI
=
<
Qrcode
goBack=
{
this
.
handleQrBack
.
bind
(
this
)
}
url=
{
this
.
state
.
qrUrl
}
></
Qrcode
>
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
View file @
cca6cc8a
...
@@ -153,14 +153,14 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -153,14 +153,14 @@ export default class ScanBarCodeContainer extends React.Component{
handleDeleteImg
(
id
){
handleDeleteImg
(
id
){
console
.
log
(
id
)
console
.
log
(
id
)
let
{
deleteImg
,
state
}
=
this
.
props
;
let
{
deleteImg
,
state
}
=
this
.
props
;
let
{
s
toreInfo
}
=
state
;
let
{
s
canBarCode
}
=
state
;
console
.
log
(
this
.
state
.
taskTy
)
console
.
log
(
this
.
state
.
taskTy
)
deleteImg
(
s
toreInfo
.
task
Id
,
this
.
state
.
taskTy
,
id
);
deleteImg
(
s
canBarCode
.
inventoryloss
Id
,
this
.
state
.
taskTy
,
id
);
}
}
handleRefreshImg
(
data
){
handleRefreshImg
(
data
){
let
{
getRefreshImg
,
state
}
=
this
.
props
;
let
{
getRefreshImg
,
state
}
=
this
.
props
;
let
{
s
toreInfo
}
=
state
;
let
{
s
canBarCode
}
=
state
;
getRefreshImg
(
s
toreInfo
.
task
Id
,
this
.
state
.
taskTy
);
getRefreshImg
(
s
canBarCode
.
inventoryloss
Id
,
this
.
state
.
taskTy
);
console
.
log
(
"刷新照片"
)
console
.
log
(
"刷新照片"
)
}
}
//点击编辑报损的商品的提交按钮
//点击编辑报损的商品的提交按钮
...
@@ -189,7 +189,7 @@ export default class ScanBarCodeContainer extends React.Component{
...
@@ -189,7 +189,7 @@ export default class ScanBarCodeContainer extends React.Component{
return
(
return
(
<
div
className=
{
"scanBarCodeContainer"
}
>
<
div
className=
{
"scanBarCodeContainer"
}
>
{
this
.
state
.
showQr
?(
{
this
.
state
.
showQr
?(
<
Qrcode
goBack=
{
this
.
handleQrBack
.
bind
(
this
)
}
url=
{
this
.
state
.
taskTy
}
></
Qrcode
>
<
Qrcode
goBack=
{
this
.
handleQrBack
.
bind
(
this
)
}
url=
{
this
.
state
.
qrUrl
}
></
Qrcode
>
):(
):(
<
div
>
<
div
>
<
HeaderComponent
<
HeaderComponent
...
...
This diff is collapsed.
Click to expand it.
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