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
9b43094c
Commit
9b43094c
authored
Jul 24, 2018
by
yaxiLiuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed the base function ï
parent
ebd5255b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
418 additions
and
380 deletions
+418
-380
client/actions/ScanBarCode.js
+19
-94
client/actions/otherQuestion.js
+82
-156
client/actions/reportDamageList.js
+59
-7
client/components/OtherQuestionComponent/EditProblemComponent.jsx
+27
-8
client/components/ReportDamageListComponent/DamageItemComponent/DamageItem.jsx
+2
-2
client/components/ScanBarCodeComponent/ProductDetailComponent/ProductDetailItem.jsx
+3
-8
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
+162
-70
client/containers/PageContainer/PageContainer.jsx
+13
-1
client/containers/ReportDamagesListContainer/ReportDamagesListContainer.jsx
+7
-3
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
+24
-19
client/reducers/otherQuestion.js
+13
-4
client/reducers/reportDamge.js
+3
-5
client/reducers/scanBarCode.js
+4
-3
No files found.
client/actions/ScanBarCode.js
View file @
9b43094c
import
fetch
from
'isomorphic-fetch'
;
import
*
as
actionTypes
from
'../actiontype/ScanBarCode'
;
import
actionTypes_error
from
'../actiontype/error'
let
domain
=
'http://192.168.10.189:8083'
;
const
fakeJsonData
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"needCheck"
:
true
,
"inventorylossId"
:
0
,
"skuBaseInfoVo"
:
{
"skuId"
:
972
,
"skuNumber"
:
"UB000972"
,
"skuName"
:
"怡宝饮用纯净水"
,
"skuImagePath"
:
"http://static.mjitech.com/static/sku/0/0/972/1503296770206.jpg"
,
"barcode"
:
"6901285991219"
,
"skuAttributesVoList"
:
[
{
"name"
:
"净含量"
,
"value"
:
"555"
,
"unit"
:
"ml"
}
]
},
"inventory"
:
null
,
"skuPassVoList"
:
[
{
"id"
:
14466
,
"warehouseId"
:
21
,
"cabinetAreaId"
:
21
,
"shelfId"
:
21211
,
"skuId"
:
972
,
"skuPassNumber"
:
2
,
"width"
:
6
,
"xPosition"
:
10
,
"yPosition"
:
15
,
"xAxis"
:
6
,
"yAxis"
:
6
,
"x1Axis"
:
0
,
"y1Axis"
:
45
,
"xOffset"
:
13
,
"yOffset"
:
12
,
"status"
:
"使用中"
,
"quantity"
:
0
,
"realQuantity"
:
97
,
"maxStock"
:
5
,
"scrapQuantity"
:
0
,
"remarks"
:
"21_5_1_2"
,
"deleted"
:
0
,
"skuName"
:
"怡宝饮用纯净水"
,
"skuNumber"
:
"UB000972"
,
"cabinetNumber"
:
3
,
"willoffSkuNumber"
:
0
}
],
"packingList"
:
[
"未确认包装情况"
,
"包装完整"
,
"包装损坏"
],
"positionList"
:
[
"未确认位置"
,
"机械手平台"
,
"出货传送区"
,
"轨道"
,
"其他位置"
]
}
}
const
fakeJsonData2
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{}}
let
domain
=
ENV
.
domain
;
export
function
scanBarCodeGetProductInfo
(
postData
)
{
return
(
dispatch
)
=>
{
/*let url = String(domain+'/web/machine_pad/scanning_sku_barcode_for_add_loss_task');
console.log(url)
let
url
=
String
(
domain
+
'/web/machine_pad/scanning_sku_barcode_for_add_loss_task'
);
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
...
...
@@ -102,38 +26,39 @@ export function scanBarCodeGetProductInfo(postData) {
}
}
).
catch
(
e
=>
dispatch
(
console
.
log
(
"出现错误"
))
)
*/
dispatch
(
initSuccess
(
fakeJsonData
.
data
))
)
/* dispatch(initSuccess(fakeJsonData.data))*/
}
}
export
function
submitProductInfo
(
post
a
Data
)
{
export
function
submitProductInfo
(
postData
)
{
return
(
dispatch
)
=>
{
/* let url = String(domain+'/web/s
submit_add_loss_task');
let
url
=
String
(
domain
+
'/web/machine_pad/
submit_add_loss_task'
);
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
JSON
.
stringify
(
postData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
if(json.is_succ){
}else{
if
(
json
.
data
){
let
submit
=
{
"submit"
:
true
}
dispatch
(
submitProductSuccess
(
submit
))
}
}
).catch(e=>dispatch(console.log("出现错误"))
)*/
let
submit
=
{
"submit"
:
true
}
dispatch
(
submitProductSuccess
(
submit
))
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
/* */
}
}
export
function
saveEditProductInfo
(
data
)
{
console
.
log
(
"=========action============"
)
console
.
log
(
data
)
return
(
dispatach
)
=>
{
dispatach
(
saveEditProductInfoSuccess
(
data
))
}
...
...
@@ -146,7 +71,7 @@ function initSuccess(data) {
data
}
}
function
submitProductSuccess
(
data
)
{
export
function
submitProductSuccess
(
data
)
{
return
{
type
:
actionTypes
.
SUBMIT_PRODUCT_SUCCESS
,
data
...
...
client/actions/otherQuestion.js
View file @
9b43094c
import
fetch
from
'isomorphic-fetch'
;
import
*
as
actionTypes
from
'../actiontype/otherQuestion'
;
const
domain
=
'http://test.mjitech.com'
;
const
fakeJsonData
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"feeds"
:
[
{
"id"
:
7
,
"files"
:
[
{
"id"
:
13
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/2/1471329355724.jpg"
},
{
"id"
:
14
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/425/1471329537289.jpg"
},
{
"id"
:
17
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/427/1471329704482.jpg"
}
],
"parentProblemName"
:
null
,
"subProblemName"
:
null
},
{
"id"
:
6
,
"files"
:
[
{
"id"
:
13
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/2/1471329355724.jpg"
},
{
"id"
:
14
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/425/1471329537289.jpg"
},
{
"id"
:
17
,
"filePath"
:
"http://static.mjitech.com/static/sku/0/0/427/1471329704482.jpg"
}
],
"parentProblemName"
:
null
,
"subProblemName"
:
null
}
],
"employee"
:
{
"id"
:
5
,
"employeeName"
:
"机器库管员"
,
"headImageUrl"
:
"/static/coupon/gounian/banner_hongbaotupian-3-14.jpg"
},
"warehouse"
:
{
"id"
:
13
,
"name"
:
"华贸商业街"
,
"image"
:
"/tmp/2018-05-25/1527243213701.jpg"
},
"problems"
:
[
{
"id"
:
18
,
"message"
:
"机械故障"
,
"type"
:
"OP"
,
"dicDetails"
:
[
{
"messageId"
:
2
,
"parentId"
:
null
,
"message"
:
"fdffdfde3"
},
{
"messageId"
:
3
,
"parentId"
:
null
,
"message"
:
"55d5fdf"
},
{
"messageId"
:
4
,
"parentId"
:
null
,
"message"
:
"dfdf"
}
]
const
domain
=
ENV
.
domain
;
//有服务器交互的actions
export
function
initGetOtherProblem
(
postData
)
{
return
(
dispatch
)
=>
{
let
url
=
String
(
domain
+
'/web/machine_pad/list_other_fault.action'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
{
"id"
:
19
,
"message"
:
"下位机程序Bug"
,
"type"
:
"OP"
,
"dicDetails"
:
[
{
"messageId"
:
7
,
"parentId"
:
null
,
"message"
:
"其他问题89"
},
{
"messageId"
:
8
,
"parentId"
:
null
,
"message"
:
"dfdfdf"
},
{
"messageId"
:
9
,
"parentId"
:
null
,
"message"
:
"werer"
body
:
JSON
.
stringify
(
postData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
if
(
json
.
meta
.
success
){
dispatch
(
initSuccess
(
json
.
data
))
}
else
{
}
]
}
]
}
}
const
fakseJsonData2
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"feed"
:
{
"id"
:
10
,
}
}
}
const
fakeJsonData3
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
"feeds"
:[
6
,
7
]
}
}
const
fakeJsonData4
=
{
"meta"
:
{
"code"
:
"200"
,
"message"
:
"成功"
,
"success"
:
true
},
"data"
:
{
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
/* */
}
}
//有服务器交互的actions
export
function
initGetOtherProblem
(
postData
)
{
export
function
addNewProbem
(
postData
)
{
return
(
dispatch
)
=>
{
/*let url = String(domain+'/web/machine_pad/list_other_fault.action');
let
url
=
String
(
domain
+
'/web/machine_pad/insert_problem.action'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
JSON
.
stringify
(
postData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
if(json.meta.
is_succ
){
initSuccess(json.data
)
if
(
json
.
meta
.
success
){
dispatch
(
addNewProblemSuccess
(
json
.
data
)
)
}
else
{
}
}
).catch(e=>dispatch(console.log("出现错误"))
)*/
dispatch
(
initSuccess
(
fakeJsonData
.
data
))
}
}
export
function
addNewProbem
(
postaData
)
{
return
(
dispatch
)
=>
{
fakseJsonData2
.
data
.
feed
.
id
++
dispatch
(
addNewProblemSuccess
(
fakseJsonData2
.
data
))
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
/* */
}
}
export
function
deleteProblem
(
postData
)
{
console
.
log
(
postData
)
return
(
dispatch
)
=>
{
dispatch
(
deleteProblemSuccess
(
fakeJsonData3
.
data
))
return
(
dispatch
)
=>
{
let
url
=
String
(
domain
+
'/web/machine_pad/skip_feed_problem.action'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
JSON
.
stringify
(
postData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
if
(
json
.
meta
.
success
){
dispatch
(
deleteProblemSuccess
({
"submitOtherProblem"
:
true
,
"feedIds"
:
json
.
data
.
feedIds
}))
}
else
{
}
}
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
}
}
export
function
submitProblemList
(
postData
)
{
console
.
log
(
"=====================postData=================="
);
console
.
log
(
postData
);
return
(
dispatch
)
=>
{
dispatch
(
submitProblemListSuccess
(
fakeJsonData4
))
return
(
dispatch
)
=>
{
let
url
=
String
(
domain
+
'/web/machine_pad/add_feed_problem.action'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
JSON
.
stringify
(
postData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
if
(
json
.
meta
.
success
){
dispatch
(
submitProblemListSuccess
({
"submitOtherProblem"
:
true
}))
}
else
{
}
}
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
}
}
//本地负责数据维护的action
...
...
client/actions/reportDamageList.js
View file @
9b43094c
import
fetch
from
'isomorphic-fetch'
;
import
*
as
actionTypes
from
'../actiontype/reportDamage'
;
import
actionTypes_error
from
"../actiontype/error"
;
let
domain
=
ENV
.
domain
;
const
fakeJson
=
{
"meta"
:
{
"code"
:
"200"
,
...
...
@@ -211,16 +213,59 @@ const fakeJson2 = {
]
}
export
function
getReportDamageList
(
postData
)
{
return
(
dispatch
)
=>
{
dispatch
(
getReportDamageListSuccess
(
fakeJson
.
data
))
return
(
dispatch
)
=>
{
let
url
=
String
(
domain
+
'/web/machine_pad/list_all_dealed_invetory_loss/'
+
postData
.
taskId
+
'.json'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'GET'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
{}
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
//处理数据如果
if
(
json
.
meta
.
success
){
dispatch
(
getReportDamageListSuccess
(
json
.
data
))
}
else
{
dispatch
(
throwError
(
json
.
meta
.
message
))
}
}).
catch
(
e
=>
{
console
.
error
(
e
)}
)
}
}
export
function
deleteDamageItem
(
postaData
)
{
console
.
log
(
postaData
)
console
.
log
(
"dffffffffffffffffffffffffffffffff"
)
return
(
dispatch
)
=>
{
dispatch
(
getReportDamageListSuccess
(
fakeJson2
.
data
))
export
function
deleteDamageItem
(
postaData
,
taskId
)
{
return
(
dispatch
)
=>
{
let
url
=
String
(
domain
+
'/web/machine_pad/delete_invetory_loss_by_saas'
);
console
.
log
(
url
)
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:
JSON
.
stringify
(
postaData
)
}).
then
((
response
)
=>
response
.
json
())
.
then
(
(
json
)
=>
{
//处理数据如果
let
success
=
json
.
meta
.
success
;
if
(
success
){
dispatch
(
getReportDamageList
({
"taskId"
:
500
}))
}
else
{
dispatch
(
throwError
(
json
.
meta
.
message
))
}
}
).
catch
(
e
=>
{
console
.
error
(
e
)}
)
/* dispatch(initSuccess(fakeJsonData.data))*/
}
}
...
...
@@ -238,4 +283,10 @@ function deleteDamageListSuccess(data) {
type
:
actionTypes
.
DELET_DAMAGEITEM_SUCCESS
,
data
}
}
function
throwError
(
data
)
{
return
{
type
:
actionTypes_error
.
ADDERRORINFO
,
errMsg
:
data
}
}
\ No newline at end of file
client/components/OtherQuestionComponent/EditProblemComponent.jsx
View file @
9b43094c
...
...
@@ -36,6 +36,26 @@ export default class EditProblemItem extends React.Component{
});
}
componentWillReceiveProps
(
nextProps
){
let
nextImgList
=
nextProps
.
imgList
;
let
{
editProblemItem
,
trouleId
}
=
this
.
props
let
imgList
=
this
.
props
.
imgList
;
//修改值
if
(
String
(
nextImgList
.
files
)
!=
String
(
imgList
.
files
)
||
String
(
imgList
.
errorId
)
!=
String
(
nextImgList
.
errorId
)){
if
(
trouleId
==
Number
(
nextImgList
.
errorId
)){
let
data
=
{};
data
.
type
=
"imgFiles"
;
data
.
files
=
nextImgList
.
files
;
data
.
troubelId
=
trouleId
;
editProblemItem
(
data
);
}
else
{
console
.
log
(
"==================不相等==========="
)
}
}
}
handleShowElement
(
value
){
if
(
value
==
"showDetailElement"
){
//点击了 小分类 检查如果大分类未选择则进行提示
...
...
@@ -91,13 +111,14 @@ export default class EditProblemItem extends React.Component{
}
render
(){
let
props
=
this
.
props
;
let
imgFiles
=
props
.
baseInfo
.
files
;
let
imgFiles
=
props
.
baseInfo
.
files
?
props
.
baseInfo
.
files
:[]
;
let
troubleId
=
props
.
trouleId
;
let
taskType
=
props
.
taskType
;
// 方法
// 1. 删除问题
let
deleteProblem
=
props
.
deleteProblem
;
// 2. 刷新图片
let
reRreshImg
=
props
.
reR
reshImg
;
let
getRefreshImg
=
props
.
getRef
reshImg
;
// 3. 添加图片
let
addImg
=
props
.
addImg
;
// 4. 删除图片
...
...
@@ -122,7 +143,7 @@ export default class EditProblemItem extends React.Component{
return
<
ImgToolComponent
key=
{
"troubelImg"
+
index
}
noCloseBtn=
{
false
}
handleClikCloseFunc
=
{
deleteImg
}
handleClikCloseFunc
=
{
deleteImg
(
troubleId
,
taskType
,
item
.
id
)
}
handleClikImgFunc
=
{()=
>
{}
}
type=
{
"custom"
}
imgSrc =
{
item
.
filePath
}
...
...
@@ -135,7 +156,7 @@ export default class EditProblemItem extends React.Component{
<
div
className=
{
"editUploadItem clearfix"
}
>
<
span
className=
{
"closeBtn"
}
onClick=
{
deleteProblem
()
}
>
×
</
span
>
<
div
className=
{
"newTroubleTitle"
}
>
新故障问题:故障
<
span
>
SD568844
</
span
>
新故障问题:故障
<
span
>
{
"OP0000"
+
troubleId
}
</
span
>
</
div
>
<
div
className=
{
"newTroubleContent clearfix"
}
>
<
span
className=
{
"startIcon"
}
>
*
</
span
>
...
...
@@ -177,10 +198,8 @@ export default class EditProblemItem extends React.Component{
{
imgListUi
}
</
div
>
<
div
className=
{
"operationLeft"
}
>
<
ImgToolComponent
type=
{
"add"
}
handleClikImgFunc
=
{
addImg
}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
{
imgFiles
&&
imgFiles
.
length
>
0
?(<
ImgToolComponent
handleClikImgFunc
=
{
reRreshImg
}
type=
{
"refresh"
}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>):
""
}
<
ImgToolComponent
type=
{
"add"
}
handleClikImgFunc
=
{
addImg
()}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
<
ImgToolComponent
handleClikImgFunc
=
{
getRefreshImg
()}
type=
{
"refresh"
}
noCloseBtn
=
{
true
}
></
ImgToolComponent
>
</
div
>
</
div
>
</
div
>
...
...
client/components/ReportDamageListComponent/DamageItemComponent/DamageItem.jsx
View file @
9b43094c
...
...
@@ -10,7 +10,7 @@ export default class DamageItem extends React.Component{
}
render
(){
let
{
itemInfo
,
deleteItem
}
=
this
.
props
;
let
{
lossPosition
,
packingStatus
,
skuBaseInfoVo
,
inventoryId
}
=
itemInfo
;
let
{
lossPosition
,
packingStatus
,
skuBaseInfoVo
,
inventory
Loss
Id
}
=
itemInfo
;
let
productContent
=
''
skuBaseInfoVo
.
skuAttributesVoList
.
map
((
item
,
index
)
=>
{
let
newText
=
""
;
...
...
@@ -20,7 +20,7 @@ export default class DamageItem extends React.Component{
return
(
<
div
className=
{
"damageProductItem"
}
>
<
span
onClick=
{
()
=>
{
deleteItem
(
inventoryId
)}
}
className=
{
"closeBtn"
}
>
×
</
span
>
<
span
onClick=
{
()
=>
{
deleteItem
(
inventory
Loss
Id
)}
}
className=
{
"closeBtn"
}
>
×
</
span
>
<
div
className=
{
"productBaseInfo clearfix"
}
>
<
img
className=
{
"productImg"
}
src=
{
skuBaseInfoVo
.
skuImagePath
}
alt=
""
/>
<
div
className=
{
"baseNumber"
}
>
...
...
client/components/ScanBarCodeComponent/ProductDetailComponent/ProductDetailItem.jsx
View file @
9b43094c
...
...
@@ -67,13 +67,8 @@ export default class ProductDetailItem extends React.Component{
handleSubmit
(){
let
{
inventorylossId
,
skuBaseInfoVo
,
handleSubmitProductInfo
,
data_currentProblemObj
,
changePages
}
=
this
.
props
;
let
data
=
{};
data
.
inventoryLossId
=
inventorylossId
;
data
.
lossPostion
=
this
.
state
.
currentPosition
;
data
.
packingStatus
=
this
.
state
.
currentPakageStatus
;
data
.
packingStatusImageIds
=
[];
handleSubmitProductInfo
(
data_currentProblemObj
);
changePages
(
CONFIG
.
showPage
[
3
])
}
render
(){
...
...
@@ -163,8 +158,8 @@ export default class ProductDetailItem extends React.Component{
<
div
className=
{
"btnContainer"
}
>
<
button
onClick=
{
this
.
handleSubmit
.
bind
(
this
)
}
className=
{
"submitEditBtn"
+
(
this
.
state
.
currentPosition
!=
undefined
&&
this
.
state
.
currentPakageStatus
!=
undefined
?
" selectBtn"
:
"
"
)
}
disabled=
{
this
.
state
.
currentPosition
==
undefined
||
this
.
state
.
currentPakageStatus
==
undefined
?
true
:
false
}
className=
{
"submitEditBtn"
+
(
this
.
state
.
currentPosition
==
undefined
||
this
.
state
.
currentPakageStatus
==
undefined
||
((
Number
(
this
.
state
.
currentPakageStatus
)
==
2
&&
imgFileList
.
length
<=
0
))?
" "
:
" selectBtn
"
)
}
disabled=
{
this
.
state
.
currentPosition
==
undefined
||
this
.
state
.
currentPakageStatus
==
undefined
||
(
Number
(
this
.
state
.
currentPakageStatus
)
==
2
&&
imgFileList
.
length
<=
0
)
?
true
:
false
}
>
提交
</
button
>
</
div
>
</
div
>
...
...
client/containers/OtherQuestionContainer/OtherQuestionContainer.jsx
View file @
9b43094c
...
...
@@ -3,7 +3,10 @@ import React from 'react';
import
SwiperComponent
from
'../../components/CommonComponent/SwiperComponent/SwiperComponent'
import
EditProblemItem
from
'../../components/OtherQuestionComponent/EditProblemComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
PopupComponent
from
'../../components/CommonComponent/PopupComponent/PopupComponent'
import
ButtonComponent
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
TextArea
from
"../TextAreaContainer/TextAreaContainer"
;
import
Qrcode
from
'../Qrcode/Qrcode'
require
(
'./index.css'
);
export
default
class
OtherQuestionContainer
extends
React
.
Component
{
constructor
(
props
){
...
...
@@ -11,13 +14,21 @@ export default class OtherQuestionContainer extends React.Component{
this
.
state
=
{
showTextArea
:
false
,
tmpText
:
""
,
currentProblemId
:
''
currentProblemId
:
''
,
showQr
:
false
,
qrUrl
:
""
,
taskTy
:
"OP"
,
showPop
:
false
,
popupInfo
:{},
}
}
componentWillMount
()
{
let
{
dispatch
,
initStart
,
state
}
=
this
.
props
;
let
{
initStart
,
headerInfo
,
userInfo
}
=
this
.
props
;
// 请求 初始数据接口
let
postData
=
{};
let
postData
=
{
employeeId
:
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
,
storeId
:
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
};
initStart
(
postData
);
}
...
...
@@ -26,8 +37,15 @@ export default class OtherQuestionContainer extends React.Component{
componentDidUpdate
()
{
}
componentWillReceiveProps
(
nextProps
){
let
{
state
}
=
nextProps
;
let
{
otherQuestion
}
=
state
;
/* let {state} = nextProps;
let {otherQuestion,refreshImg} = state;
let lastRefreshImg = this.props.state.refreshImg;
if(String(lastRefreshImg)!=String(refreshImg)){
//更新数据
let troubleId = ""
}
console.log(refreshImg);
console.log("============================willrecvie refreshImg")*/
}
componentWillUnmount
(){
...
...
@@ -75,38 +93,101 @@ export default class OtherQuestionContainer extends React.Component{
handleAddNewTroble
(){
let
postData
=
{};
let
{
addNewProblem
}
=
this
.
props
;
postData
.
employeeId
=
"dfdf
"
;
postData
.
employeeId
=
"dfdf
"
;
let
{
addNewProblem
,
headerInfo
}
=
this
.
props
;
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20
"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17
"
;
addNewProblem
();
addNewProblem
(
postData
);
}
/*
* 删除已经编辑的的问题
* */
handleDeleteProblem
(
troubleId
){
let
{
deleteProblem
}
=
this
.
props
;
let
{
deleteProblem
,
headerInfo
}
=
this
.
props
;
console
.
log
(
deleteProblem
);
let
postData
=
{};
postData
.
feedIds
=
[];
postData
.
feedIds
.
push
(
troubleId
);
postData
.
feedIds
=
String
(
troubleId
);
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
deleteProblem
(
postData
);
console
.
log
(
"删除编辑的问题"
);
}
handleSubmitProblemList
(){
let
{
submitProblemList
,
state
,
changePages
}
=
this
.
props
;
let
{
submitProblemList
,
state
,
headerInfo
,
changePages
}
=
this
.
props
;
let
that
=
this
;
let
problemList
=
state
.
otherQuestion
.
data_allProblemList
;
console
.
log
(
"=========================数量"
)
console
.
log
(
problemList
);
submitProblemList
(
problemList
)
changePages
(
CONFIG
.
showPage
[
8
])
//编辑成想要的格式
let
postData
=
{};
postData
.
problems
=
[];
for
(
let
key
in
problemList
){
let
currentObj
=
problemList
[
key
];
let
tempObj
=
{};
tempObj
.
id
=
currentObj
.
id
;
tempObj
.
problemType
=
currentObj
.
problemType
;
tempObj
.
detailProblemType
=
currentObj
.
detailProblemType
;
tempObj
.
remark
=
currentObj
.
remark
;
let
newImgIds
=
[]
if
(
currentObj
.
files
&&
currentObj
.
files
.
length
>
0
){
newImgIds
=
currentObj
.
files
.
map
((
item
,
index
)
=>
{
return
item
.
id
})
}
tempObj
.
imagesFileId
=
newImgIds
.
join
(
','
);
postData
.
problems
.
push
(
tempObj
);
}
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
//检查 postData.problems
let
problemsLength
=
postData
.
problems
.
length
;
let
needEdit
=
[];
postData
.
problems
.
map
((
item
,
index
)
=>
{
if
(
item
.
problemType
==
undefined
){
needEdit
.
push
(
item
.
id
)
}
if
(
index
+
1
==
postData
.
problems
.
length
&&
needEdit
.
length
==
0
){
submitProblemList
(
postData
)
}
if
(
index
+
1
==
postData
.
problems
.
length
&&
needEdit
.
length
>
0
){
console
.
log
(
"================及Nlaile========="
)
that
.
setState
({
showPop
:
true
,
popupInfo
:{
"popupText"
:
"提交前请输入相关信息,如果不想提交可以直接跳过(右上角)"
,
"showPopup"
:
true
,
"popupButtons"
:
[<
ButtonComponent
key=
{
"btn"
}
option=
{
this
.
handleShowPopo
.
bind
(
this
)
}
text=
{
"确定"
}
/>]
}
})
}
})
/*changePages(CONFIG.showPage[8])*/
}
/*处理提示框*/
;
handleShowPopo
(){
this
.
setState
({
showPop
:
false
})
}
/*
*添加照片
* */
handleAddImg
(){
handleAddImg
(
troubleId
){
let
{
state
}
=
this
.
props
;
let
{
storeInfo
}
=
state
;
let
tmpUrl
=
""
;
tmpUrl
=
`
${
ENV
.
uploadImg
}${
troubleId
}
/
${
this
.
state
.
taskTy
}
`
this
.
setState
({
"showQr"
:
true
,
"qrUrl"
:
tmpUrl
},()
=>
{
console
.
log
(
"=======================设置的二维码==========="
)
console
.
log
(
this
.
state
.
qrUrl
)
})
console
.
log
(
"添加照片"
)
}
...
...
@@ -114,41 +195,40 @@ export default class OtherQuestionContainer extends React.Component{
/*
*刷新当前图片
* */
handleRefreshProbelmImg
(){
console
.
log
(
"刷新当前问题备注图片"
)
handleRefreshProbelmImg
(
troubleId
,
troubleType
){
let
{
getRefreshImg
}
=
this
.
props
;
getRefreshImg
(
troubleId
,
troubleType
)
}
/*
* 删除图片
* */
handleDeleteImg
(){
console
.
log
(
"删除图片"
)
handleDeleteImg
(
errorId
,
taskType
,
fileId
){
let
{
deleteImg
}
=
this
.
props
;
deleteImg
(
errorId
,
taskType
,
fileId
)
}
/*
* 整体提交已经编辑的问题
* */
/*handleSubmitProblemList(){
console.log("=======提交已经编辑的问题==")
}*/
/*
* 直接跳过
* */
handleOverPass
(){
let
{
deleteProblem
,
state
}
=
this
.
props
;
let
problemKeyList
=
Object
.
keys
(
state
.
otherQuestion
.
data_allProblemList
);
let
{
deleteProblem
,
headerInfo
}
=
this
.
props
;
let
postData
=
{};
postData
.
feedIds
=
problemKeyList
;
postData
.
feedIds
=
""
;
postData
.
employeeId
=
headerInfo
.
employeeId
?
headerInfo
.
employeeId
:
"20"
;
postData
.
storeId
=
headerInfo
.
storeId
?
headerInfo
.
storeId
:
"17"
;
deleteProblem
(
postData
);
}
//二维码返回
handleQrBack
(){
this
.
setState
({
showQr
:
false
})
}
render
(){
//let 难道初始化的数据:
let
{
state
,
addNewProblem
,
editProblemItem
,
deleteProblem
}
=
this
.
props
;
let
{
otherQuestion
,
userInfo
,
storeInfo
}
=
state
;
let
{
state
,
addNewProblem
,
editProblemItem
,
deleteProblem
,
getRefreshImg
}
=
this
.
props
;
let
{
otherQuestion
,
refreshImg
,
userInfo
,
storeInfo
}
=
state
;
let
{
problems
}
=
otherQuestion
;
let
feeds
=
otherQuestion
.
feeds
;
let
problemList
=
otherQuestion
.
data_allProblemList
;
...
...
@@ -163,14 +243,17 @@ export default class OtherQuestionContainer extends React.Component{
let
currentItemUi
=
<
EditProblemItem
editProblemItem
=
{
editProblemItem
}
trouleId
=
{
troubleId
}
imgList
=
{
refreshImg
}
clickEdit
=
{
this
.
handleShowRemark
.
bind
(
this
,
troubleId
)}
problemInfo
=
{
problems
}
baseInfo
=
{
item
}
remarkText
=
{
currentRemark
}
getRefreshImg
=
{()=
>
(this.handleRefreshProbelmImg.bind(this,troubleId,this.state.taskTy))}
deleteProblem =
{
()
=>
(
this
.
handleDeleteProblem
.
bind
(
this
,
troubleId
))
}
addImg =
{
()
=>
(
this
.
handleAddImg
.
bind
(
this
))
}
reRreshImg =
{
()
=>
(
this
.
handleRefreshProbelmImg
.
bind
(
this
))
}
deleteImg =
{
()
=>
(
this
.
handleDeleteImg
.
bind
(
this
))
}
addImg =
{
()
=>
(
this
.
handleAddImg
.
bind
(
this
,
troubleId
))
}
deleteImg =
{
(
errorId
,
type
,
fileId
)
=>
(
this
.
handleDeleteImg
.
bind
(
this
,
errorId
,
type
,
fileId
))
}
taskType =
{
this
.
state
.
taskTy
}
key=
{
key
}
/
>
editProblemItemUI.push(currentItemUi);
}
...
...
@@ -183,36 +266,45 @@ export default class OtherQuestionContainer extends React.Component{
// slidesPerView: 2.6,
}
;
let swiperContainer = CONFIG.swiperContainers.editProblemSwiperContainer;
return (
this.state.showTextArea?(
<
TextArea
text=
{
this
.
state
.
tmpText
}
goBack=
{
this
.
handleEditGoBack
.
bind
(
this
)
}
saveText=
{
this
.
handleSaveRemarkText
.
bind
(
this
)
}
></
TextArea
>
):(
<
div
className=
{
"OtherQuestionContainer"
}
>
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
storeInfo=
{
storeInfo
}
/>
<
div
className=
{
"otherQuestionTitleContainer"
}
>
你是否有其他问题希望反馈(
<
i
>
*
</
i
>
必填项)
</
div
>
<
div
className=
{
"editOtherQuestionContainer clearfix"
}
>
<
SwiperComponent
swiperContainer=
{
swiperContainer
}
swiperOptions=
{
swiperOptions
}
swiperCount=
{
swiperCount
}
>
{
editProblemItemUI
}
</
SwiperComponent
>
</
div
>
<
div
className=
{
"opeationContainer clearfix"
}
>
<
button
className=
{
"addMoreBtn"
}
onClick=
{
this
.
handleAddNewTroble
.
bind
(
this
)
}
><
span
>
+
</
span
>
录入更多
</
button
>
<
button
className=
{
"noMoreBtn"
}
onClick=
{
this
.
handleSubmitProblemList
.
bind
(
this
)
}
>
没有更多
</
button
>
</
div
>
<
div
className=
{
"overPass"
}
onClick=
{
this
.
handleOverPass
.
bind
(
this
)
}
>
跳过
</
div
>
//控制Ui显示
let elementUI = '';
if(this.state.showTextArea)
{
elementUI
=
<
TextArea
text=
{
this
.
state
.
tmpText
}
goBack=
{
this
.
handleEditGoBack
.
bind
(
this
)
}
saveText=
{
this
.
handleSaveRemarkText
.
bind
(
this
)
}
></
TextArea
>
}
else if(this.state.showQr)
{
elementUI
=
<
Qrcode
goBack=
{
this
.
handleQrBack
.
bind
(
this
)
}
url=
{
this
.
state
.
taskTy
}
></
Qrcode
>
}
else
{
elementUI
=
<
div
className=
{
"OtherQuestionContainer"
}
>
{
this
.
state
.
showPop
?(
<
PopupComponent
popupInfo
=
{
this
.
state
.
popupInfo
}
></
PopupComponent
>
):
""
}
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
storeInfo=
{
storeInfo
}
/>
<
div
className=
{
"otherQuestionTitleContainer"
}
>
你是否有其他问题希望反馈(
<
i
>
*
</
i
>
必填项)
</
div
>
<
div
className=
{
"editOtherQuestionContainer clearfix"
}
>
<
SwiperComponent
swiperContainer=
{
swiperContainer
}
swiperOptions=
{
swiperOptions
}
swiperCount=
{
swiperCount
}
>
{
editProblemItemUI
}
</
SwiperComponent
>
</
div
>
<
div
className=
{
"opeationContainer clearfix"
}
>
<
button
className=
{
"addMoreBtn"
}
onClick=
{
this
.
handleAddNewTroble
.
bind
(
this
)
}
><
span
>
+
</
span
>
录入更多
</
button
>
<
button
className=
{
"noMoreBtn"
}
onClick=
{
this
.
handleSubmitProblemList
.
bind
(
this
)
}
>
没有更多
</
button
>
</
div
>
)
<
div
className=
{
"overPass"
}
onClick=
{
this
.
handleOverPass
.
bind
(
this
)
}
>
跳过
</
div
>
</
div
>
}
return (
<
div
>
{
elementUI
}
</
div
>
)
}
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
9b43094c
...
...
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import
{
getStoreInfo
}
from
"../../actions/getStore"
;
import
{
getTroubleList
,
updateTroubleList
}
from
"../../actions/getTroubles"
;
import
{
initGetOtherProblem
,
addNewProbem
,
deleteProblem
,
editProblemItem
,
submitProblemList
}
from
"../../actions/otherQuestion"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
}
from
"../../actions/ScanBarCode"
import
{
scanBarCodeGetProductInfo
,
submitProductInfo
,
saveEditProductInfo
,
submitProductSuccess
}
from
"../../actions/ScanBarCode"
import
{
getReportDamageList
,
deleteDamageItem
}
from
'../../actions/reportDamageList'
import
{
getRefreshImg
,
deleteImg
}
from
"../../actions/refreshImg"
import
{
uploadError
,
addErrorInfo
}
from
'../../actions/uploadError'
...
...
@@ -384,12 +384,16 @@ class PageContainer extends React.Component {
break
;
case
showPage
[
2
]:
pages
=
<
ScanBarCodeContainer
headerInfo
=
{
state
.
headerInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
getProductInfo
=
{(
postData
)=
>
dispatch(scanBarCodeGetProductInfo(postData))}
submitProductInfo =
{
(
postData
)
=>
dispatch
(
submitProductInfo
(
postData
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
saveEditProductInfo =
{
(
postData
)
=>
dispatch
(
saveEditProductInfo
(
postData
))
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
submitProductSuccess =
{
(
postData
)
=>
dispatch
(
submitProductSuccess
(
postData
))
}
state =
{
state
}
/
>
;
break;
...
...
@@ -398,6 +402,9 @@ class PageContainer extends React.Component {
getReportDamageList
=
{(
postData
)=
>
dispatch(getReportDamageList(postData))}
deleteDamageItem =
{
(
postData
)
=>
{
dispatch
(
deleteDamageItem
(
postData
))}
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
headerInfo =
{
state
.
headerInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
state =
{
state
}
/
>
;
break;
...
...
@@ -408,7 +415,12 @@ class PageContainer extends React.Component {
editProblemItem =
{
(
data
)
=>
dispatch
(
editProblemItem
(
data
))
}
deleteProblem =
{
(
data
)
=>
dispatch
(
deleteProblem
(
data
))
}
submitProblemList =
{
(
data
)
=>
dispatch
(
submitProblemList
(
data
))
}
getRefreshImg=
{
(
errorId
,
type
)
=>
dispatch
(
getRefreshImg
(
errorId
,
type
))
}
deleteImg=
{
(
errorId
,
type
,
fileId
)
=>
dispatch
(
deleteImg
(
errorId
,
type
,
fileId
))
}
changePages=
{
(
data
)
=>
this
.
changePages
(
data
)
}
headerInfo =
{
state
.
headerInfo
}
storeInfo=
{
state
.
storeInfo
}
userInfo=
{
state
.
userInfo
}
state =
{
state
}
/
>
;
break;
...
...
client/containers/ReportDamagesListContainer/ReportDamagesListContainer.jsx
View file @
9b43094c
...
...
@@ -11,15 +11,19 @@ export default class ReportDamagesListContainer extends React.Component{
super
(
props
)
}
componentWillMount
(){
let
{
getReportDamageList
}
=
this
.
props
;
let
{
getReportDamageList
,
state
}
=
this
.
props
;
let
{
userInfo
,
headerInfo
,
storeInfo
}
=
state
;
let
postData
=
{};
postData
.
taskId
=
headerInfo
.
taskId
?
headerInfo
.
taskId
:
Number
(
500
)
getReportDamageList
(
postData
)
}
hanldeDeleteDamageItem
(
data
){
let
postData
=
{};
postData
.
inventoryLossId
=
data
;
let
{
deleteDamageItem
}
=
this
.
props
;
deleteDamageItem
(
postData
)
let
{
deleteDamageItem
,
state
}
=
this
.
props
;
let
{
userInfo
,
headerInfo
,
storeInfo
}
=
state
;
let
taskId
=
headerInfo
.
taskId
?
headerInfo
.
taskId
:
Number
(
500
);
deleteDamageItem
(
postData
,
taskId
)
}
hanleAddMoreClick
(){
let
{
changePages
}
=
this
.
props
;
...
...
client/containers/ScanBarCodeContainer/ScanBarCodeContaienr.jsx
View file @
9b43094c
...
...
@@ -34,11 +34,15 @@ export default class ScanBarCodeContainer extends React.Component{
let
{
state
,
changePages
}
=
nextProps
;
let
{
scanBarCode
,
userInfo
,
storeInfo
,
refreshImg
}
=
state
;
let
productInfo
=
state
.
scanBarCode
;
let
{
inventorylossId
,
skuBaseInfoVo
,
packingList
,
positionList
,
data_currentProblemObj
}
=
productInfo
;
let
{
inventorylossId
,
skuBaseInfoVo
,
packingList
,
positionList
,
data_currentProblemObj
,
submit
}
=
productInfo
;
if
(
submit
){
changePages
(
CONFIG
.
showPage
[
3
])
}
let
productDetailUi
=
<
ProductDetailItem
skuBaseInfoVo
=
{
skuBaseInfoVo
}
packingList
=
{
packingList
}
positionList
=
{
positionList
}
inventorylossId
=
{
inventorylossId
}
data_currentProblemObj
=
{
data_currentProblemObj
}
handleAddImg
={
this
.
handleAddImg
.
bind
(
this
)}
handleDeleteImg
={
this
.
handleDeleteImg
.
bind
(
this
)}
...
...
@@ -47,7 +51,6 @@ export default class ScanBarCodeContainer extends React.Component{
handleSaveEditProductInfo
=
{
this
.
handleSaveEditProductInfo
.
bind
(
this
)}
refreshImg
=
{
refreshImg
}
changePages
=
{
changePages
}
/>
if
(
scanBarCode
.
skuBaseInfoVo
&&
scanBarCode
.
skuBaseInfoVo
.
skuId
&&
this
.
state
.
showProductInfo
){
this
.
setState
({
...
...
@@ -59,6 +62,9 @@ export default class ScanBarCodeContainer extends React.Component{
}
}
componentWillUnmount
()
{
console
.
log
(
"===============submitProductSuccess==============="
);
let
{
submitProductSuccess
}
=
this
.
props
;
submitProductSuccess
({
"submit"
:
false
})
}
// 输入条形码改变 onchange事件监听 条形码的值
handleSaveInputBarCode
(
event
){
...
...
@@ -119,7 +125,6 @@ export default class ScanBarCodeContainer extends React.Component{
})
}
handleSaveEditProductInfo
(
data
){
console
.
log
(
"=================储存==="
)
let
{
saveEditProductInfo
}
=
this
.
props
;
saveEditProductInfo
(
data
)
}
...
...
@@ -132,14 +137,16 @@ export default class ScanBarCodeContainer extends React.Component{
//上传图片
handleAddImg
(){
let
{
state
}
=
this
.
props
;
let
{
storeInfo
}
=
state
;
let
{
storeInfo
,
scanBarCode
}
=
state
;
console
.
log
(
scanBarCode
);
console
.
log
(
"+===================scanBarcode=============="
)
let
tmpUrl
=
""
;
tmpUrl
:
`
${
ENV
.
uploadImg
}
/
${
storeInfo
.
task
Id
}
/
${
this
.
state
.
taskTy
}
`
tmpUrl
=
`
${
ENV
.
uploadImg
}
/
${
scanBarCode
.
inventoryloss
Id
}
/
${
this
.
state
.
taskTy
}
`
this
.
setState
({
"showQr"
:
true
,
"
taskTy
"
:
tmpUrl
"
qrUrl
"
:
tmpUrl
},()
=>
{
console
.
log
(
t
mp
Url
)
console
.
log
(
t
his
.
state
.
qr
Url
)
})
console
.
log
(
"添加照片"
)
}
...
...
@@ -158,29 +165,27 @@ export default class ScanBarCodeContainer extends React.Component{
}
//点击编辑报损的商品的提交按钮
handleSubmitProductInfo
(
data
){
let
{
submitProductInfo
}
=
this
.
props
;
let
postaData
=
{};
postaData
.
taskId
=
"dfdf"
;
postaData
.
inventoryLossId
=
data
.
inventoryLossId
;
postaData
.
lossPostion
=
data
.
lossPostion
;
postaData
.
packingStatus
=
data
.
packingStatus
;
postaData
.
packingStatusImageIds
=
data
.
packingStatusImageIds
;
console
.
log
(
postaData
)
submitProductInfo
(
postaData
);
let
{
submitProductInfo
,
userInfo
,
storeInfo
,
headerInfo
}
=
this
.
props
;
//检查如果选择了 包装损坏还没有上传图片的话进行提示
let
pakageStatus
=
data
.
packingStatus
;
let
packingStatusImageIds
=
data
.
data_currentProblemObj
;
data
.
taskId
=
headerInfo
.
taskId
?
Number
(
headerInfo
.
taskId
):
Number
(
500
)
submitProductInfo
(
data
);
/* changePages(CONFIG.showPage[3])*/
//让弹窗消失
this
.
setState
({
//让弹窗消失
/*this.setState({
showProductInfo:false,
popupInfo:{
"showPopup":false,
}
})
})
*/
}
render
()
{
let
{
state
}
=
this
.
props
;
let
{
userInfo
,
storeInfo
}
=
state
;
let
productInfo
=
state
.
scanBarCode
;
let
{
inventorylossId
,
skuBaseInfoVo
,
packingList
,
positionList
}
=
productInfo
;
return
(
<
div
className=
{
"scanBarCodeContainer"
}
>
{
this
.
state
.
showQr
?(
...
...
client/reducers/otherQuestion.js
View file @
9b43094c
...
...
@@ -49,10 +49,14 @@ function addNewProblem(state,data) {
return
newInfo
;
}
function
deleteProblemItem
(
state
,
data
)
{
let
feedId
=
data
.
feeds
;
feedId
.
map
((
item
,
index
)
=>
{
delete
allFeeds
[
item
]
})
console
.
log
(
'==================data==========='
);
console
.
log
(
data
);
let
feedId
=
data
.
feedIds
;
if
(
feedId
){
delete
allFeeds
[
feedId
]
}
else
{
allFeeds
=
{}
}
state
.
data_allProblemList
=
allFeeds
;
let
newInfo
=
Object
.
assign
({},
state
,
data
);
return
newInfo
;
...
...
@@ -70,6 +74,8 @@ function submitProblemList(state,data) {
function
editProblem
(
state
,
data
)
{
console
.
log
(
data
);
let
problemId
=
data
.
troubelId
;
console
.
log
(
"=====================problemId"
);
console
.
log
(
problemId
)
let
type
=
data
.
type
;
let
currentProblemObj
=
allFeeds
[
problemId
];
if
(
type
==
"remark"
){
...
...
@@ -81,6 +87,9 @@ function editProblem(state,data) {
if
(
type
==
"detailProblemType"
){
currentProblemObj
.
detailProblemType
=
data
.
problemId
;
}
if
(
type
==
"imgFiles"
){
currentProblemObj
.
files
=
data
.
files
;
}
state
.
data_allProblemList
=
allFeeds
;
return
state
;
...
...
client/reducers/reportDamge.js
View file @
9b43094c
import
*
as
actionTypes
from
'../actiontype/reportDamage'
;
function
initDamgeListSuccess
(
state
,
data
)
{
console
.
log
(
data
);
console
.
log
(
"============newData"
);
let
newInfo
=
Object
.
assign
([],
state
,
data
);
console
.
log
(
"reportDamageList============="
)
console
.
log
(
state
);
let
newInfo
=
Object
.
assign
([],
data
);
return
newInfo
;
}
function
deleteDamgeItemSuccess
(
state
,
data
)
{
...
...
@@ -13,8 +13,6 @@ export default function(state={}, action) {
switch
(
action
.
type
)
{
case
actionTypes
.
INIT_GETDAMGELIST_SUCCESS
:
return
initDamgeListSuccess
(
state
,
action
.
data
)
case
actionTypes
.
DELET_DAMAGEITEM_SUCCESS
:
return
deleteDamgeItemSuccess
(
state
,
action
.
data
)
default
:
return
state
;
}
...
...
client/reducers/scanBarCode.js
View file @
9b43094c
import
*
as
actionTypes
from
'../actiontype/ScanBarCode'
;
let
currentProductInfo
=
{};
function
initSuccess
(
state
,
data
)
{
currentProductInfo
.
inventorylossId
=
data
.
inventorylossId
;
currentProductInfo
.
inventoryLossId
=
data
.
inventorylossId
;
currentProductInfo
.
packingStatusImageIds
=
[];
currentProductInfo
.
lossPostion
=
undefined
;
currentProductInfo
.
packingStatus
=
undefined
;
data
.
data_currentProblemObj
=
Object
.
assign
({},
currentProductInfo
);
let
newInfo
=
Object
.
assign
({},
state
,
data
);
return
newInfo
;
...
...
@@ -12,8 +15,6 @@ function submitSuccess(state,data) {
}
function
saveInfoSuccess
(
state
,
data
)
{
console
.
log
(
"====================reducer================"
)
console
.
log
(
data
);
if
(
data
.
type
==
"productPosition"
){
currentProductInfo
.
lossPostion
=
data
.
data
;
}
...
...
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