Commit 7671d734 by Zhang Xin

fix menue bug

parent a48cef5d
......@@ -38,7 +38,7 @@ const uploadErrorOld = (info)=>{
*/
const uploadError = (info,exceptionType,getTask=true)=>{
let {taskInfo={},userInfo={},storeInfo={},taskList={}} = info;
let bodyData = {
let bodyData = Object.assign({},{
storeId : storeInfo.id || 0,
id : taskList.workListId || 0,
userId : userInfo.employeeId || 0,
......@@ -46,7 +46,8 @@ const uploadError = (info,exceptionType,getTask=true)=>{
exceptionType : exceptionType,
taskType : taskInfo.currentTaskType || '',
area : taskInfo.area || ''
};
});
console.log("exception_skupass_sku ",bodyData)
return (dispatch =>{
fetch(domain + 'machine_pad/exception_skupass_sku.action',{
credentials : 'include',
......
......@@ -42,6 +42,8 @@ export default class ReplenishScanPage extends React.Component{
this.setState({
btnClock : false
})
console.log("willUmmount");
this.props.emptyBarcodeInfo()
}
componentWillReceiveProps(nextProps){
......
......@@ -13,13 +13,13 @@ export default class LeftContainer extends React.Component{
render(){
let {leftInfo={},menuType=''} = this.props;
let {taskInfo={}} = leftInfo;
let menuInfo = taskInfo;
let menuInfo = JSON.parse(JSON.stringify(taskInfo));
if(menuType){
menuInfo = CONFIG.normalMenuList.find(t=>t.type === menuType);
menuInfo.currentTaskNum = ("常规-"+menuInfo.text);
menuInfo.taskName = "解答您工作中遇到的各种问题"
}else{
menuInfo.currentTaskNum = ("任务"+menuInfo.currentTaskNum);
menuInfo.currentTaskNum = ("任务"+taskInfo.currentTaskNum);
}
return(
<div className={"leftContainer"}>
......
......@@ -27,7 +27,7 @@ import TakeStokeContainer from '../TakeStokeContainer/TakeStokeContainer'
import BreakageContainer from '../BreakageContainer/BreakageConatiner'
import RecoveryPage from '../RecoveryContainer/RecoveryContainer'
import ReplenishContainer from '../ReplenishContainer/ReplenishContainer'
import {getBarCodeProductInfo} from '../../actions/barcodeCommon'
import {getBarCodeProductInfo,saveProductInfo} from '../../actions/barcodeCommon'
import {getTaskList} from '../../actions/common'
import {submitBreakageProduct,hasNoSku} from '../../actions/breakaegContainer'
import {checkProductQuantity} from '../../actions/TokeStokeContainer'
......@@ -143,6 +143,10 @@ class PageContainer extends React.Component {
dispatch(saveCommonInfo({ip:data.ip}));
dispatch(getStoreInfo(data.storeId));
// dispatch(saveCommonInfo({userInfo:{employeeId:9}}));
// dispatch(getUserinfo(9,13))
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:'A'}})))
// dispatch(saveCommonInfo({userInfo:{employeeId:20}}));
// dispatch(getUserinfo(20,data.storeId));
});
......@@ -211,12 +215,13 @@ class PageContainer extends React.Component {
componentDidUpdate() {
}
componentWillReceiveProps(nextProps){
console.log("componentWillReceiveProps")
let {state,dispatch} = nextProps;
let nextCommonInfo = state.commonInfo;
let nextUserInfo = nextCommonInfo.userInfo || {};
if(nextUserInfo && nextUserInfo.taskType && nextUserInfo.id) {
let commonInfo = this.props.state.commonInfo;
let {userInfo={}} = commonInfo;
let {userInfo={},taskInfo={}} = commonInfo;
if(!userInfo || !userInfo.taskType || !userInfo.id || (
userInfo.id !== nextUserInfo.id || (userInfo.employeeId !== nextUserInfo.employeeId)
) || (
......@@ -229,7 +234,14 @@ class PageContainer extends React.Component {
//补货人员,根据type判断显示页面
let nextTaskInfo = nextCommonInfo.taskInfo || {};
if(nextUserInfo.taskType === "SECOND" && nextTaskInfo && nextTaskInfo.currentTaskType){
let lastCurrentType = taskInfo.currentTaskType;
if(nextUserInfo.taskType === "SECOND" && nextTaskInfo && nextTaskInfo.currentTaskType &&
nextTaskInfo.currentTaskType !== lastCurrentType
){
console.log("SECOND")
switch (nextTaskInfo.currentTaskType) {
case 'LR' :
this.changePages(CONFIG.showPage[5]);
......@@ -722,6 +734,7 @@ class PageContainer extends React.Component {
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
barcodeInfo={state.barcodeCommon}
emptyBarcodeInfo={()=>dispatch(saveProductInfo({}))}
replenishInfo={state.replenishInfo}
getBarCodeProductInfo={(barcode)=>{dispatch(getBarCodeProductInfo({barcode,commonInfo}))}}
finishBoxRecovery={()=>dispatch(finishBoxRecovery(commonInfo))}
......
......@@ -29,7 +29,7 @@ function renderPage(store) {
let store = activateVendor();
// UTILPATH.socket.init(129,17);
UTILPATH.socket.testIp(14);
// UTILPATH.socket.getIp();
// UTILPATH.socket.testIp(90);
UTILPATH.socket.getIp();
renderPage(store);
\ No newline at end of file
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