Commit 65b06dac by wujiabao

fix bug

parent 68b51221
...@@ -115,8 +115,9 @@ class BreakageProductDetail extends React.Component{ ...@@ -115,8 +115,9 @@ class BreakageProductDetail extends React.Component{
//改变显示的报损页面 //改变显示的报损页面
changePageDefault(){ changePageDefault(){
let {product}=this.props.breakageProductInfo; let {product}=this.props.breakageProductInfo;
let {statusColor,packStatus}=this.state; let {statusColor,packStatus,positionColor}=this.state;
let productDetail={skuId:product.skuId,skuStatus:packStatus[statusColor].code,skuPosition:0} let id=product.skuPositionList[positionColor]&&product.skuPositionList[positionColor].id?product.skuPositionList[positionColor].id : '';
let productDetail={skuId:product.skuId,skuStatus:packStatus[statusColor].code,skuPosition:id}
this.props.submitBreakageProduct(productDetail); this.props.submitBreakageProduct(productDetail);
this.props.changePopShow(true) this.props.changePopShow(true)
} }
......
...@@ -12,7 +12,7 @@ class TakeStokeContaniner extends React.Component { ...@@ -12,7 +12,7 @@ class TakeStokeContaniner extends React.Component {
this.state={ this.state={
showButton:true, showButton:true,
number:1, number:1,
initNum:'' initNum:'-'
} }
} }
...@@ -53,11 +53,11 @@ class TakeStokeContaniner extends React.Component { ...@@ -53,11 +53,11 @@ class TakeStokeContaniner extends React.Component {
<p className={'font30 clo333'}> <p className={'font30 clo333'}>
<span>货品数量:</span> <span>货品数量:</span>
<span className={'disNum'} onClick={this.productNum.bind(this,'dis')}></span> <span className={'disNum'} onClick={this.productNum.bind(this,'dis')}></span>
<span className={'baseNum font50 colff775c'}>{initNum}</span> <span className={'baseNum font50 colff775c'} style={{opacity:initNum==='-'?0:1}}>{initNum}</span>
<span className={'addNum'} onClick={this.productNum.bind(this,'add')}></span> <span className={'addNum'} onClick={this.productNum.bind(this,'add')}></span>
</p> </p>
</div> </div>
<Button text={'提交'} btnContainer={'backff775c font32 colfff'} style={{marginTop:UTILPATH.getRemByPx(80)}} option={this.checkProductNum.bind(this)} /> <Button text={'提交'} btnContainer={'font32 colfff'} style={{marginTop:UTILPATH.getRemByPx(80),background:initNum==='-'?'#ededed':'#ff7860'}} option={this.checkProductNum.bind(this)} />
</div>:<Button option={this.clickPutIn.bind(this)} text={'已放入'} btnContainer={'backff775c font32 colfff'} style={{marginTop:UTILPATH.getRemByPx(280)}} /> </div>:<Button option={this.clickPutIn.bind(this)} text={'已放入'} btnContainer={'backff775c font32 colfff'} style={{marginTop:UTILPATH.getRemByPx(280)}} />
} }
</div> </div>
...@@ -78,7 +78,7 @@ class TakeStokeContaniner extends React.Component { ...@@ -78,7 +78,7 @@ class TakeStokeContaniner extends React.Component {
productNum(str){ productNum(str){
let {initNum}=this.state; let {initNum}=this.state;
if(str==='add'){ if(str==='add'){
if(initNum===''){ if(initNum==='-'){
initNum=0; initNum=0;
}else{ }else{
initNum++; initNum++;
...@@ -98,7 +98,9 @@ class TakeStokeContaniner extends React.Component { ...@@ -98,7 +98,9 @@ class TakeStokeContaniner extends React.Component {
//核对产品数量 //核对产品数量
checkProductNum(){ checkProductNum(){
let {initNum}=this.state; let {initNum}=this.state;
if(!initNum===''){ console.log(initNum)
if(initNum!=='-'){
console.log(212)
let {workListId,skuPassId}=this.props.tokeTaskProduct; let {workListId,skuPassId}=this.props.tokeTaskProduct;
let tokeProductInfo={workListId,skuPassId,quantity:initNum} let tokeProductInfo={workListId,skuPassId,quantity:initNum}
this.props.checkProductQuantity(tokeProductInfo) this.props.checkProductQuantity(tokeProductInfo)
......
...@@ -131,7 +131,6 @@ ...@@ -131,7 +131,6 @@
padding-left: 4.5rem; padding-left: 4.5rem;
box-sizing: border-box; box-sizing: border-box;
} }
.TokeStokeContent .commonPage .productNum p span:nth-of-type(2), .commonPage .productNum p span:nth-of-type(4) { .TokeStokeContent .commonPage .productNum p span:nth-of-type(2), .commonPage .productNum p span:nth-of-type(4) {
width: 0.6666666666666666rem; width: 0.6666666666666666rem;
height: 0.6666666666666666rem; height: 0.6666666666666666rem;
...@@ -148,8 +147,15 @@ ...@@ -148,8 +147,15 @@
} }
.TokeStokeContent .commonPage .productNum p span:nth-of-type(3) { .TokeStokeContent .commonPage .productNum p span:nth-of-type(3) {
width: 0.6666666666666666rem;
height: 0.6666666666666666rem;
border: 2px solid #fff;
border-radius: 0.08333333333333333rem;
display: inline-block;
line-height: 0.6666666666666666rem;
text-align: center;
font-weight: 600; font-weight: 600;
padding: 0.16666666666666666rem 0.275rem;
} }
.TokeStokeContent .commonPage .buttonComponent { .TokeStokeContent .commonPage .buttonComponent {
......
...@@ -27,6 +27,7 @@ const checkStatus = (response)=>{ ...@@ -27,6 +27,7 @@ const checkStatus = (response)=>{
}; };
const parseJson = (response)=>{ const parseJson = (response)=>{
console.log("socket response ",response);
return response.json(); return response.json();
}; };
...@@ -78,6 +79,7 @@ const testIp = (ip) => { ...@@ -78,6 +79,7 @@ const testIp = (ip) => {
console.log("testIp : ",ip); console.log("testIp : ",ip);
let url = 'http://' + domainIp + ip + ':9999/getmyid'; let url = 'http://' + domainIp + ip + ':9999/getmyid';
console.log("testIp url : ",url);
fetch( url ,{ fetch( url ,{
// credentials : 'include', // credentials : 'include',
method : 'GET', method : 'GET',
...@@ -85,6 +87,7 @@ const testIp = (ip) => { ...@@ -85,6 +87,7 @@ const testIp = (ip) => {
}).then(checkStatus) }).then(checkStatus)
.then(parseJson) .then(parseJson)
.then((data) => { .then((data) => {
console.log("socket data ",data);
if(data.storeId){ if(data.storeId){
window.storeId = data.storeId; window.storeId = data.storeId;
window.localIp = domainIp + ip; window.localIp = domainIp + ip;
......
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