Commit 31a78ff8 by Zhang Xin

补货当前货品éƒ不对报异常

parent be6899dd
...@@ -88,7 +88,10 @@ const getTaskList = (data={})=>{ ...@@ -88,7 +88,10 @@ const getTaskList = (data={})=>{
let data =Object.assign({}); let data =Object.assign({});
console.log("拉取工单 ",json) console.log("拉取工单 ",json)
if(json.meta.success && json.data){ if(json.meta.success && json.data){
data.taskInfo = Object.assign({},json.data.flatCommonVo) data.taskInfo = Object.assign({},json.data.flatCommonVo);
// if(json.data.flatCommonVo.currentTaskType !== 'ADDR'){
// data.taskList = Object.assign({},json.data.skuFlatVo);
// }
data.taskList = Object.assign({},json.data.skuFlatVo); data.taskList = Object.assign({},json.data.skuFlatVo);
let childNum = 0; let childNum = 0;
let currentTaskType = json.data.flatCommonVo.currentTaskType; let currentTaskType = json.data.flatCommonVo.currentTaskType;
......
...@@ -29,8 +29,14 @@ const uploadErrorOld = (info)=>{ ...@@ -29,8 +29,14 @@ const uploadErrorOld = (info)=>{
}).catch(e=>{console.error(e)}); }).catch(e=>{console.error(e)});
}) })
}; };
/**
const uploadError = (info,exceptionType)=>{ *
* @param info
* @param exceptionType
* @param getTask 判断是否获取工单
* @returns {Function}
*/
const uploadError = (info,exceptionType,getTask=true)=>{
let {taskInfo={},userInfo={},storeInfo={},taskList={}} = info; let {taskInfo={},userInfo={},storeInfo={},taskList={}} = info;
let bodyData = { let bodyData = {
storeId : storeInfo.id || 0, storeId : storeInfo.id || 0,
...@@ -51,8 +57,10 @@ const uploadError = (info,exceptionType)=>{ ...@@ -51,8 +57,10 @@ const uploadError = (info,exceptionType)=>{
}).then((response)=>response.json()) }).then((response)=>response.json())
.then(json=>{ .then(json=>{
if(getTask){
dispatch(getTaskList(info)); dispatch(getTaskList(info));
dispatch(saveProductInfo({})) dispatch(saveProductInfo({}))
}
}).catch(e=>{console.error(e)}); }).catch(e=>{console.error(e)});
}) })
} }
......
...@@ -20,6 +20,7 @@ export default class ReplenishScanPage extends React.Component{ ...@@ -20,6 +20,7 @@ export default class ReplenishScanPage extends React.Component{
this.showErrorInfo = this.showErrorInfo.bind(this); this.showErrorInfo = this.showErrorInfo.bind(this);
this.handleScanOver = this.handleScanOver.bind(this); this.handleScanOver = this.handleScanOver.bind(this);
this.scanOver = this.scanOver.bind(this); this.scanOver = this.scanOver.bind(this);
this.putInBox = this.putInBox.bind(this);
this.state = { this.state = {
barcodeText : '', barcodeText : '',
barcodeErrorText : '', barcodeErrorText : '',
...@@ -187,7 +188,7 @@ export default class ReplenishScanPage extends React.Component{ ...@@ -187,7 +188,7 @@ export default class ReplenishScanPage extends React.Component{
//货道已满解决办法 //货道已满解决办法
let {showPopup,hidePopup,headerInfo} = this.props; let {showPopup,hidePopup,headerInfo} = this.props;
let {taskList={}} = headerInfo; let {taskList={}} = headerInfo;
let btnDom = <Button btnContainer={"replenishScanPageErrorSkuBtn font32 backff775c colfff"} key={"replenishScanPageErrorSkuBtn"} text={"确认扫描完毕"} option={this.hidePop}/> let btnDom = <Button btnContainer={"replenishScanPageErrorSkuBtn font32 backff775c colfff"} key={"replenishScanPageErrorSkuBtn"} text={"确认扫描完毕"} option={()=>this.putInBox(CONFIG.taskErrorType.LOWSKU)}/>
let popDom = let popDom =
<PopModel popupTitle={"扫描货品异常"} classContainer={"replenishPopInfo replenishScanPageErrorSku"}> <PopModel popupTitle={"扫描货品异常"} classContainer={"replenishPopInfo replenishScanPageErrorSku"}>
<div className={"icon iconfont icon-exclamation colf5a623 font150"} /> <div className={"icon iconfont icon-exclamation colf5a623 font150"} />
...@@ -202,6 +203,13 @@ export default class ReplenishScanPage extends React.Component{ ...@@ -202,6 +203,13 @@ export default class ReplenishScanPage extends React.Component{
showPopup({popupChild:popDom}); showPopup({popupChild:popDom});
} }
putInBox(type){
//已放回
let {uploadError} = this.props;
uploadError(type);
this.hidePop();
}
//忘记样子 //忘记样子
forgetSku(){ forgetSku(){
let {showPopup,hidePopup} = this.props; let {showPopup,hidePopup} = this.props;
......
...@@ -33,41 +33,6 @@ export default class ReplenishContainer extends React.Component{ ...@@ -33,41 +33,6 @@ export default class ReplenishContainer extends React.Component{
componentWillReceiveProps(nextProps){ componentWillReceiveProps(nextProps){
console.log("componentWillReceiveProps ",nextProps); console.log("componentWillReceiveProps ",nextProps);
//如果有错误信息,弹出错误信息
//如果有条形码信息,展示条形码信息
// if(!nextProps.replenishInfo.errorInfo || !nextProps.replenishInfo.errorInfo.errorMessage){
//
// }else{
//
// }
//
//
//
//
//
// if(nextProps.barcodeInfo && nextProps.barcodeInfo.product && nextProps.barcodeInfo.product.skuId && nextProps.replenishInfo && (!nextProps.replenishInfo.errorInfo || !nextProps.replenishInfo.errorInfo.errorMessage)){
// //有条形码信息且 没有错误信息 进入条形码扫描成功页面
// console.log("in ",this.state.pageType,typeof this.state.pageType);
// if(this.state.pageType !== 2){
// console.log("2222222");
// nextProps.hidePopup();
// this.setState({
// pageType : 2,
// showScanQrcode : false
// })
// }
// }else if(nextProps.replenishInfo && nextProps.replenishInfo.errorInfo && nextProps.replenishInfo.errorInfo.errorMessage){
// //有错误信息,再对应页面弹出错误信息弹窗,要区分错误信息
// }else if(!nextProps.barcodeInfo || !nextProps.barcodeInfo.product || !nextProps.barcodeInfo.product.skuId){
// if(this.state.pageType !== 3){
// nextProps.hidePopup();
// this.setState({
// pageType : 3,
// showScanQrcode : false
// })
// }
// }
} }
getPage(type){ getPage(type){
......
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