Commit 7671d734 by Zhang Xin

fix menue bug

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