Commit 535cfae8 by Zhang Xin

fix bug 2171 2170

parent 9b9606d3
......@@ -21,6 +21,7 @@ export default class ReplenishScanPage extends React.Component{
this.handleScanOver = this.handleScanOver.bind(this);
this.scanOver = this.scanOver.bind(this);
this.putInBox = this.putInBox.bind(this);
this.handleScanContinue = this.handleScanContinue.bind(this);
this.state = {
barcodeText : '',
barcodeErrorText : '',
......@@ -144,11 +145,17 @@ export default class ReplenishScanPage extends React.Component{
</div>
}
handleScanContinue(){
let {emptyErrorInfo,hidePopup} = this.props;
emptyErrorInfo();
hidePopup()
}
handleScanOver(){
console.log("扫描结束");
//货道商品不符
let {showPopup,hidePopup} = this.props;
let btnDom1 = <Button btnContainer={"replenishHandleScanOverBtn1 font32"} key={"replenishHandleScanOverBtn1"} text={"继续扫描"} option={hidePopup}/>
let btnDom1 = <Button btnContainer={"replenishHandleScanOverBtn1 font32"} key={"replenishHandleScanOverBtn1"} text={"继续扫描"} option={this.handleScanContinue}/>
let btnDom2 = <Button btnContainer={"replenishHandleScanOverBtn2 backff775c colfff font32"} key={"replenishHandleScanOverBtn2"} text={"确认扫描完毕"} option={this.scanOver}/>
let popDom =
<PopModel popupTitle={"补货结束确认"} classContainer={"replenishPopInfo"}>
......@@ -166,12 +173,12 @@ export default class ReplenishScanPage extends React.Component{
//确认扫描完毕
scanOver(){
console.log("确认扫描完毕 ",this.state.btnClock)
let props = this.props;
if(!this.state.btnClock){
this.setState({
btnClock : true
},()=>{
props.emptyErrorInfo();
props.hidePopup()
props.finishReplenish(2);
})
......@@ -270,7 +277,6 @@ export default class ReplenishScanPage extends React.Component{
//货道已满解决办法
let {showPopup,hidePopup,headerInfo} = this.props;
let {taskInfo={}} = headerInfo;
console.log("不在本区补货范围 ",taskInfo);
let btnDom = <Button btnContainer={"replenishContainerQrcode font32 backff775c colfff"} key={"replenishContainerWrongQrcode"} text={"关闭"} option={this.hidePop}/>
let popDom =
<PopModel popupTitle={"扫描货品异常"} classContainer={"replenishPopInfo"}>
......@@ -340,6 +346,7 @@ export default class ReplenishScanPage extends React.Component{
this.setState({
barcodeText : ''
},()=>{
this.props.emptyErrorInfo();
this.props.hidePopup()
})
}
......
......@@ -39,9 +39,14 @@ export default class ReplenishSkuPage extends React.Component{
}
handleScanQrcode(){
//扫描下一个
if(!this.state.btnClock){
this.setState({
btnClock : true
},()=>{
this.props.finishBoxRecovery();
this.continueScan()
})
}
}
shouldComponentUpdate(nextProps,nextState){
......@@ -336,7 +341,6 @@ export default class ReplenishSkuPage extends React.Component{
}
render(){
console.log("rerender")
let props = this.props;
return this[questionType[this.state.pageType]]()
}
......
......@@ -9,6 +9,8 @@ export default class ChooseTaskContainer extends React.Component{
this.state = {
};
this.closeDoor = this.closeDoor.bind(this);
this.logout = this.logout.bind(this)
this.showLogoutPopup = this.showLogoutPopup.bind(this)
}
componentWillMount(){
......@@ -19,6 +21,29 @@ export default class ChooseTaskContainer extends React.Component{
}
logout(){
this.props.tempLogout()
}
showLogoutPopup(){
let {showPopup,hidePopup} = this.props;
let btnDom1 = <Button btnContainer={"headerLogoutBtn backff775c colfff font32 font32 "} key={"headerLogoutBtn1"} text={"确定退出?"} option={this.logout}/>
let btnDom2 = <Button btnContainer={"headerLogoutBtn btne5 font32"} key={"headerLogoutBtn2"} text={"取消"} option={hidePopup}/>
let popDom =
<PopModel popupTitle={"是否退出登录"} classContainer={"headerLogout"}>
<div className={"icon iconfont icon-exclamation font150 colf5a623"} />
<div className={"text font40 col000"} style={{lineHeight:'1.6'}}>
<p>此步临时添加,可用作测试退出登录</p>
<p>重新扫码开门,不必重启服务</p>
</div>
<div className={"btn"}>
{btnDom1}
{btnDom2}
</div>
</PopModel>;
showPopup({popupChild:popDom});
}
closeDoor(){
console.log("closeDoor");
this.props.hidePopup();
......@@ -34,6 +59,7 @@ export default class ChooseTaskContainer extends React.Component{
<HeaderComponent
showHeader={CONFIG.headerStatus[1]}
headerInfo={headerInfo}
showLogoutPopup={this.showLogoutPopup}
/>
<div className={"chooseTaskContainer"}>
<div className={"chooseTaskText font32"}>
......@@ -44,7 +70,7 @@ export default class ChooseTaskContainer extends React.Component{
<Button text={"申报新故障"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
<Button text={"设备检查"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
<Button text={"设备测试"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
<Button text={"确认退出,并离店"} style={{'marginTop':UTILPATH.getRemByPx(87)}} option={this.closeDoor}/>
<Button text={"确认退出,并离店"} style={{'marginTop':UTILPATH.getRemByPx(87)}} option={this.showLogoutPopup}/>
</div>
</div>
</div>
......
......@@ -189,7 +189,7 @@ class PageContainer extends React.Component {
// remove(CONFIG.socketType.GETSTOREINFO,this)
// remove(CONFIG.socketType.GETSOCKETMSG,this)
this.setState({
showPage : showPage[7],
showPage : showPage[initPage],
showClock : false,
popupInfo : defaultPopupInfo,
successCloseDoor : true
......@@ -601,7 +601,9 @@ class PageContainer extends React.Component {
pages = <ChooseTaskContainer headerInfo={commonInfo}
changePages={(data)=>this.changePages(data)}
showOpenDoorPage={()=>this.showOpenDoorPage.bind(this)()}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
tempLogout={()=>this.tempLogout.bind(this)()}
/>;
break;
/*以下是二期页面 start*/
......
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