Commit fb5e771c by Zhang Xin

新增一个工单任务,回收箱回收

parent 769e91d3
import fetch from 'isomorphic-fetch'
import {logout} from "./common";
import {logout,getTaskList} from "./common";
let domain = ENV.domain;
// let domain1='http://192.168.10.184:8080/maxbox/web/'
const willCloseDoor=(data)=>{
const willCloseDoor=(data,flag=false)=>{
let url=domain+`machine_pad/finish_task.action`
let {userInfo,taskInfo,storeInfo}=data;
let userId=userInfo.employeeId;
......@@ -21,6 +21,9 @@ const willCloseDoor=(data)=>{
body:JSON.stringify(bodyData)
}).then((response)=>response.json())
.then((json)=>{
if(flag){
dispatch(getTaskList(data))
}
// dispatch(closeDoorSuccess(data));
})
}
......
......@@ -126,14 +126,6 @@ const getTaskList = (data={})=>{
let childNum = 0;
let currentTaskType = json.data.flatCommonVo.currentTaskType;
let currentTaskNum = json.data.flatCommonVo.currentTaskNum;
if(currentTaskType === 'RE'){
//回收
if(taskInfo.currentTaskType !== "RE"){
childNum = json.data.skuFlatVo.whetherType ? 1 : 2
}else{
childNum = 2
}
}
dispatch(getTaskName(currentTaskType,childNum))
}else{
dispatch(addErrorInfo(json.meta.message))
......
......@@ -17,6 +17,7 @@ const showPage = {
131 : 'HomePage1', //二期首页
14 : 'Question', //二期问题反馈页面
141 : 'Question1', //二期问题反馈页面
15 : 'BoxRecoverySkus', //二期回收箱回收
};
const taskSchedule = { //任务进度序列号,后台给
1: showPage[5],
......
import React from 'react';
import Header from '../../components/CommonComponent/HeaderComponent/HeaderComponent';
import LeftContainer from '../LeftContainer/LeftContainer';
import RightContainer from '../RightContainer/RightContainer';
import RecovertyFirstPage from '../../components/RecoveryComponent/RecoveryFirstPage/RecoveryFirstPage'
require('./index.css');
const recoveryPageIndex = {
1 : "getFirstPage",
2 : "getSecondPage",
3 : "getScanPage"
}
export default class BoxRecoveryContainer extends React.Component{
constructor(props){
super(props);
this.state = {
btnBlock : true //展示回收箱页面
};
this.getFirstPage = this.getFirstPage.bind(this); //展示第一页
this.handleFinishBoxRecovery = this.handleFinishBoxRecovery.bind(this); //完成回收箱商品回收
}
componentWillMount() {
}
componentWillReceiveProps(nextProps){
}
handleFinishBoxRecovery(){
//完成回收箱物品回收
if(this.state.btnBlock){
this.setState({
btnBlock : false
},()=>{
let props = this.props;
props.willCloseDoor()
})
}
}
getFirstPage(props){
return (
<RecovertyFirstPage handleFinishBoxRecovery={()=>this.handleFinishBoxRecovery()} {...props}/>
)
}
render(){
let props = this.props;
let dom = this.getFirstPage(props);
return(
<div className={"recoveryContainer page"}>
<div style={{width:'100%',height:'100%'}}>
{
props.headerInfo && props.headerInfo.storeInfo ?
<Header headerInfo={props.headerInfo}/> : null
}
<LeftContainer leftInfo={props.headerInfo}/>
<RightContainer>
{dom}
</RightContainer>
</div>
</div>
)
}
}
/*
.recoveryPopInfo .icon {
margin: 50px 0 60px;
}
.recoveryPopInfo .icon.icon-wrong {
color: #ff0000;
}
.recoveryPopInfo .text {
line-height: 40px;
margin-bottom: 80px;
}
.recoveryPopInfo .btn {
position: relative;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
}
.recoveryPopInfo .btn > div:nth-child(2) {
margin-top: 5%;
}
*/
/*---------px rem 分割线-----------*/
.recoveryPopInfo .icon {
margin: 0.4166666666666667rem 0 0.5rem;
}
.recoveryPopInfo .icon.icon-wrong {
color: #ff0000;
}
.recoveryPopInfo .text {
line-height: 0.3333333333333333rem;
margin-bottom: 0.6666666666666666rem;
}
.recoveryPopInfo .btn {
position: relative;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
}
.recoveryPopInfo .btn > div:nth-child(2) {
margin-top: 5%;
}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLG9CQUFvQjtDQUN2Qjs7QUFFRDtJQUNJLGVBQW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cmVjdGlvbjogY29sdW1uO1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxufVxyXG5cclxuLnJlY292ZXJ5UG9wSW5mbyAuYnRuID4gZGl2Om50aC1jaGlsZCgyKSB7XHJcbiAgICBtYXJnaW4tdG9wOiA1JTtcclxufVxyXG5cclxuLyotLS0tLS0tLS1weCByZW0g5YiG5Ymy57q/LS0tLS0tLS0tLS0qL1xyXG5cclxuLnJlY292ZXJ5UG9wSW5mbyAuaWNvbiB7XHJcbiAgICBtYXJnaW46IDAuNDE2NjY2NjY2NjY2NjY2N3JlbSAwIDAuNXJlbTtcclxufVxyXG5cclxuLnJlY292ZXJ5UG9wSW5mbyAuaWNvbi5pY29uLXdyb25nIHtcclxuICAgIGNvbG9yOiAjZmYwMDAwO1xyXG59XHJcblxyXG4ucmVjb3ZlcnlQb3BJbmZvIC50ZXh0IHtcclxuICAgIGxpbmUtaGVpZ2h0OiAwLjMzMzMzMzMzMzMzMzMzMzNyZW07XHJcbiAgICBtYXJnaW4tYm90dG9tOiAwLjY2NjY2NjY2NjY2NjY2NjZyZW07XHJcbn1cclxuXHJcbi5yZWNvdmVyeVBvcEluZm8gLmJ0biB7XHJcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XHJcbiAgICBsZWZ0OiA1MCU7XHJcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoLTUwJSk7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbn1cclxuXHJcbi5yZWNvdmVyeVBvcEluZm8gLmJ0biA+IGRpdjpudGgtY2hpbGQoMikge1xyXG4gICAgbWFyZ2luLXRvcDogNSU7XHJcbn1cclxuIl19 */
\ No newline at end of file
......@@ -26,6 +26,7 @@ import HomePage from '../HomePageContainer/HomePageContainer'
import TakeStokeContainer from '../TakeStokeContainer/TakeStokeContainer'
import BreakageContainer from '../BreakageContainer/BreakageConatiner'
import RecoveryPage from '../RecoveryContainer/RecoveryContainer'
import BoxRecoveryPage from '../BoxRecoveryContainer/BoxRecoveryContainer'
import ReplenishContainer from '../ReplenishContainer/ReplenishContainer'
import QuestionContainer from '../QuestionContainer/QuestionContainer'
import {getBarCodeProductInfo,saveProductInfo} from '../../actions/barcodeCommon'
......@@ -144,15 +145,14 @@ class PageContainer extends React.Component {
this.getPageStyle();
let that = this;
let {dispatch} = this.props;
// dispatch(saveCommonInfo({ip:"192.168.10.128"}));
// dispatch(getStoreInfo(20));
// dispatch(saveCommonInfo({userInfo:{employeeId:14}}));
// dispatch(getUserinfo(14,20))
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:'A'}})))
on(CONFIG.socketType.GETSTOREINFO,this,function (data) {
dispatch(saveCommonInfo({ip:data.ip}));
dispatch(getStoreInfo(data.storeId));
// dispatch(saveCommonInfo({ip:"192.168.10.128"}));
// dispatch(getStoreInfo(13));
// dispatch(saveCommonInfo({userInfo:{employeeId:9}}));
// dispatch(getUserinfo(9,13))
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:'A'}})))
});
on(CONFIG.socketType.GETSOCKETMSG,this,function (data) {
that.getSocketMsg(data)
......@@ -296,6 +296,9 @@ class PageContainer extends React.Component {
case 'ER' :
this.changePages(CONFIG.showPage[12]);
break;
case 'REA' :
this.changePages(CONFIG.showPage[15]);
break;
}
}
......@@ -605,6 +608,9 @@ class PageContainer extends React.Component {
case 'ER' :
this.changePages(CONFIG.showPage[12]);
break;
case 'REA' :
this.changePages(CONFIG.showPage[15]);
break;
}
}else{
this.changePages(CONFIG.showPage[13]);
......@@ -701,7 +707,7 @@ class PageContainer extends React.Component {
showOpenDoorPage={()=>this.showOpenDoorPage.bind(this)()}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
willCloseDoor={()=>{dispatch(willCloseDoor(commonInfo))}}
willCloseDoor={()=>{dispatch(willCloseDoor(commonInfo,false))}}
/>;
break;
......@@ -720,7 +726,7 @@ class PageContainer extends React.Component {
changePages={(data)=>this.changePages(data)}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
willCloseDoor={()=>{dispatch(willCloseDoor(commonInfo))}}
willCloseDoor={()=>{dispatch(willCloseDoor(commonInfo,false))}}
closeDoor={true}
tempLogout={()=>this.tempLogout.bind(this)()}
changeIsSend ={this.changeIsSend.bind(this)}
......@@ -778,6 +784,14 @@ class PageContainer extends React.Component {
getBarCodeProductInfo={(barcode)=>{dispatch(getBarCodeProductInfo({barcode,commonInfo}))}}
/>;
break;
case showPage[15]:
pages = <BoxRecoveryPage
headerInfo = {commonInfo}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
willCloseDoor={()=>{dispatch(willCloseDoor(commonInfo,true))}}
/>;
break;
case showPage[11]:
pages = <ReplenishContainer
headerInfo = {commonInfo}
......
......@@ -2,13 +2,11 @@ import React from 'react';
import Header from '../../components/CommonComponent/HeaderComponent/HeaderComponent';
import LeftContainer from '../LeftContainer/LeftContainer';
import RightContainer from '../RightContainer/RightContainer';
import RecovertyFirstPage from '../../components/RecoveryComponent/RecoveryFirstPage/RecoveryFirstPage'
import RecoverySecondPage from '../../components/RecoveryComponent/RecoverySecondPage/RecoverySecondPage'
import RecoveryScanPage from '../../components/RecoveryComponent/RecoveryScanPage/RecoveryScanPage'
require('./index.css');
const recoveryPageIndex = {
1 : "getFirstPage",
2 : "getSecondPage",
3 : "getScanPage"
}
......@@ -17,9 +15,8 @@ export default class RecoveryContainer extends React.Component{
constructor(props){
super(props);
this.state = {
showPage : 1 //展示回收箱页面
showPage : 2 //展示回收箱页面
};
this.getFirstPage = this.getFirstPage.bind(this); //展示第一页
this.getSecondPage = this.getSecondPage.bind(this); //展示第二页
this.getPage = this.getPage.bind(this); //获取要展示的页面
this.handleFinishBoxRecovery = this.handleFinishBoxRecovery.bind(this); //完成回收箱商品回收
......@@ -27,16 +24,6 @@ export default class RecoveryContainer extends React.Component{
}
componentWillMount() {
let props = this.props;
let {headerInfo = {}} = props;
let {taskList = {}} = headerInfo;
if(taskList && !taskList.whetherType){
//没有回收箱物品
this.setState({
showPage : 2
})
}
}
componentWillReceiveProps(nextProps){
......@@ -54,18 +41,11 @@ export default class RecoveryContainer extends React.Component{
handleFinishBoxRecovery(){
//完成回收箱物品回收
let props = this.props;
props.getTaskName()
this.setState({
showPage : 2
})
}
getFirstPage(props){
return (
<RecovertyFirstPage handleFinishBoxRecovery={()=>this.handleFinishBoxRecovery()} {...props}/>
)
}
getSecondPage(props){
return (
<RecoverySecondPage {...props} beginScan={this.setPage}/>
......
......@@ -41,8 +41,8 @@ const NumChangeWord = (currentTaskType,childTaskNum)=>{
children:['']
},
{
title:'回收区货品回收',
children:['回收区货品回收','货道货品回收']
title:'货道货品回收',
children:['']
},
{
title:'补货',
......@@ -55,6 +55,10 @@ const NumChangeWord = (currentTaskType,childTaskNum)=>{
{
title:'故障处理任务',
children:['']
},
{
title:'回收区货品回收',
children:['']
}
]
let type = currentTaskType;
......@@ -107,23 +111,32 @@ const NumChangeWord = (currentTaskType,childTaskNum)=>{
}
break;
case 'PF' :
{
let name=5;
taskName = arr[name - 1].title;
if (child) {
taskName = arr[name - 1].children[child - 1]
{
let name=5;
taskName = arr[name - 1].title;
if (child) {
taskName = arr[name - 1].children[child - 1]
}
}
}
break;
case 'ER' :
{
let name=6;
taskName = arr[name - 1].title;
if (child) {
taskName = arr[name - 1].children[child - 1]
{
let name=6;
taskName = arr[name - 1].title;
if (child) {
taskName = arr[name - 1].children[child - 1]
}
}
}
break;
break;
case 'REA' :
{
let name=7;
taskName = arr[name - 1].title;
if (child) {
taskName = arr[name - 1].children[child - 1]
}
}
break;
}
return taskName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment