Commit 1f23c97d by wujiabao

测试

parent eac263a1
import React from 'react'
import Button from '../../../components/CommonComponent/ButtonComponent/ButtonComponent'
import WeChatUtil from '../../../util/WeChatUtil'
require('./index.css')
class BreakageProductDetail extends React.Component{
constructor(props){
......
......@@ -7,6 +7,7 @@ import BreakageProductDetail from '../../components/BreakageComponent/BreakagePr
import BreakageCode from '../../components/BreakageComponent/BreakageCode/BreakageCode'
import SanCodeComponent from '../../components/BreakageComponent/SanCodeComponent/SanCodeComponent'
import PopModel from '../../components/CommonComponent/PopupComponent/PopupChildComponent'
import WeChatUtil from '../../util/WeChatUtil'
import Button from '../../components/CommonComponent/ButtonComponent/ButtonComponent'
require('./index.css')
class BreakageContainer extends React.Component {
......@@ -27,6 +28,7 @@ class BreakageContainer extends React.Component {
render(){
let props=this.props;
let {isShow,popShow,pop1Show,pop2Show}=this.state;
isShow=WeChatUtil.getUrlParam().isShow?WeChatUtil.getUrlParam().isShow:isShow;
return (
<div className={"BreakageContainer"}>
{
......@@ -134,6 +136,7 @@ class BreakageContainer extends React.Component {
let pages=null;
let props=this.props;
let {showPage}=this.state;
showPage=WeChatUtil.getUrlParam().children?Number(WeChatUtil.getUrlParam().children):showPage;
switch(showPage){
case 1 :
pages=<DefaultComponent pullTaskList={props.pullTaskList}
......
......@@ -42,15 +42,15 @@ import AllClassify from '../AllClassifyContainer/AllClassifyContainer'
import {willCloseDoor,closeDoorSuccess} from '../../actions/chooseTaskContainer'
import {sendMsg} from '../../util/socket'
import PopModel from '../../components/CommonComponent/PopupComponent/PopupChildComponent'
import MachineInfo from '../MachineInfo/MachineInfo'
import WeChatUtil from '../../util/WeChatUtil'
import DevPage from '../DevPage/DevPage'
/*二期引用 end*/
/**引用测试数据*/
import testTakeStoreData from '../../../testData/takeStore.json'
import testBreakData from '../../../testData/breakData.json'
import {on,remove} from '../../util/event';
require('./index.css');
const showPage = CONFIG.showPage;
const headerStatus = CONFIG.headerStatus;
......@@ -161,7 +161,9 @@ class PageContainer extends React.Component {
this.getPageStyle();
let that = this;
let {dispatch} = this.props;
if(WeChatUtil.getUrlParam().type){
this.switchPages(WeChatUtil.getUrlParam().type)
}
/**
* 测试数据
* @type {number}
......@@ -358,6 +360,41 @@ class PageContainer extends React.Component {
}
componentDidUpdate() {
}
//判断要显示的页面的函数
switchPages (type) {
switch (type) {
case 'LR' :
this.changePages(CONFIG.showPage[5]);
break;
case 'CK' :
case 'CR' :
this.changePages(CONFIG.showPage[6]);
break;
case 'RE' :
this.changePages(CONFIG.showPage[10]);
break;
case 'ADDR' :
this.changePages(CONFIG.showPage[11]);
break;
case 'PF' :
this.changePages(CONFIG.showPage[14]);
break;
case 'ER' :
this.changePages(CONFIG.showPage[12]);
break;
case 'REA' :
this.changePages(CONFIG.showPage[15]);
break;
case 'FINISH' :
this.changePages(CONFIG.showPage[131]);
break;
default:
this.changePages(CONFIG.showPage[13]);
break;
}
}
componentWillReceiveProps(nextProps){
let {state,dispatch} = nextProps;
let nextCommonInfo = state.commonInfo;
......@@ -389,39 +426,10 @@ class PageContainer extends React.Component {
if(nextUserInfo.taskType === "SECOND" && nextTaskInfo && nextTaskInfo.currentTaskType &&
nextTaskInfo.currentTaskType !== lastCurrentType && lastCurrentType !== 'FINISH'
){
switch (nextTaskInfo.currentTaskType) {
case 'LR' :
this.changePages(CONFIG.showPage[5]);
break;
case 'CK' :
case 'CR' :
this.changePages(CONFIG.showPage[6]);
break;
case 'RE' :
this.changePages(CONFIG.showPage[10]);
break;
case 'ADDR' :
this.changePages(CONFIG.showPage[11]);
break;
case 'PF' :
this.changePages(CONFIG.showPage[14]);
break;
case 'ER' :
this.changePages(CONFIG.showPage[12]);
break;
case 'REA' :
this.changePages(CONFIG.showPage[15]);
break;
case 'FINISH' :
this.changePages(CONFIG.showPage[131]);
break;
default:
this.changePages(CONFIG.showPage[13]);
break;
}
this.switchPages(nextTaskInfo.currentTaskType)
}
}else if(!nextUserInfo.employeeId && this.state.showPage !== showPage[initPage]){
}else if(!nextUserInfo.employeeId && this.state.showPage !== showPage[initPage]&& !WeChatUtil.getUrlParam().type){
this.setState({
showPage : showPage[initPage]
})
......@@ -1050,7 +1058,7 @@ class PageContainer extends React.Component {
pages = <TakeStokeContainer headerInfo = {commonInfo}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
tokeTaskProduct={commonInfo.taskList}
tokeTaskProduct={WeChatUtil.getUrlParam().type&&WeChatUtil.getUrlParam().type==='CK'?testTakeStoreData.data.skuFlatVo:commonInfo.taskList}
checkProductQuantity={(tokeProductInfo)=>{dispatch(checkProductQuantity({commonInfo,tokeProductInfo}))}}
TokeStokeState={state.TokeStokeContainer}
getTaskList={()=>{dispatch(getTaskList(commonInfo))}}
......@@ -1062,7 +1070,7 @@ class PageContainer extends React.Component {
pullTaskList={()=>{dispatch(hasNoSku(commonInfo))}}
headerInfo={commonInfo}
getBarCodeProductInfo={(barcode)=>{dispatch(getBarCodeProductInfo({barcode,commonInfo}))}}
breakageProductInfo={state.barcodeCommon}
breakageProductInfo={WeChatUtil.getUrlParam().type&&WeChatUtil.getUrlParam().type==='LR'?testBreakData.data:state.barcodeCommon}
breakageContainer ={state.breakageContainer}
submitBreakageProduct={(productDetail)=>{dispatch(submitBreakageProduct({commonInfo,productDetail}))}}
area={area}
......
......@@ -5,7 +5,7 @@ import RightContainer from '../RightContainer/RightContainer';
import ReplenishHomePage from '../../components/ReplenishComponent/ReplenishHomePage/ReplenishHomePage'
import ReplenishSkuPage from '../../components/ReplenishComponent/ReplenishSkuPage/ReplenishSkuPage'
import ReplenishScanPage from '../../components/ReplenishComponent/ReplenishScanPage/ReplenishScanPage'
import WeChatUtil from '../../util/WeChatUtil'
require('./index.css');
const replenishPageIndex = {
......@@ -74,6 +74,8 @@ export default class ReplenishContainer extends React.Component{
render(){
let props = this.props;
let {pageType}=this.state;
pageType = WeChatUtil.getUrlParam().pageType?WeChatUtil.getUrlParam().pageType:pageType;
return (
<div className={"replenishContainer page"}>
{
......@@ -87,7 +89,7 @@ export default class ReplenishContainer extends React.Component{
<LeftContainer leftInfo={props.headerInfo}/>
<RightContainer>
{this.getPage(this.state.pageType)(props)}
{this.getPage(pageType)(props)}
</RightContainer>
</div>
}
......
......@@ -20,6 +20,7 @@ class TakeStokeContaniner extends React.Component {
let {showButton,number,initNum}=this.state;
let props = this.props;
let tokeTaskProduct=props.tokeTaskProduct;
console.log(tokeTaskProduct)
return (
<div className={'TokeStokeContainer'}>
<HeaderComponent headerStatus={headerStatus[1]} headerInfo={props.headerInfo}/>
......
......@@ -2,6 +2,6 @@
* Created by ruibing on 16/11/2.
*/
module.exports = {
domain: 'https://www.mjitech.com/web/',
domain: 'https://test.mjitech.com/web/',
uploadImg : 'https://preprod.mjitech.com/static/uploadTrouble'
}
\ 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