Commit 416456ee authored by 陈卓's avatar 陈卓

修改在途

parent 1d76e1a2
...@@ -52,12 +52,36 @@ class DstributorOnTheWayQuery extends React.Component { ...@@ -52,12 +52,36 @@ class DstributorOnTheWayQuery extends React.Component {
localStorage.setItem("partid",value); localStorage.setItem("partid",value);
} }
query(){ query(){
if(!this.state.id && !this.state.boxnum){ if(!this.state.id && !this.state.boxnum&& !this.state.ordernum){
Toast.info("请输入注册号或者箱号") Toast.info("请输入注册号或者箱号或订单号")
this.setState({ this.setState({
data:[] data:[]
}) })
}else{ }else{
if(this.state.ordernum){
//根据箱号查询
var ordernum=this.state.ordernum
let code=this.state.userInfo.code || ""//站点
Toast.loading('Loading...', 0, () => {
},true);
pdaApi.getqueryinfo({ordernum,code}).then(res=>{
Toast.hide();
console.log('在途查询--箱号',res);
if(res.code==1&&res.result.length!=0){
this.setState({
data:res.result,
onthewayinfoshow:true,
onthewayinfoshowtype:1
})
}else{
Toast.info('没有查询到在途信息')
this.setState({
data:[]
})
}
})
return
}
if(this.state.boxnum){ if(this.state.boxnum){
//根据箱号查询 //根据箱号查询
var box_number=this.state.boxnum var box_number=this.state.boxnum
...@@ -213,9 +237,16 @@ class DstributorOnTheWayQuery extends React.Component { ...@@ -213,9 +237,16 @@ class DstributorOnTheWayQuery extends React.Component {
icon={clear}/> icon={clear}/>
</SingleItem> </SingleItem>
<SingleItem <SingleItem
outerStyle={{marginTop:'0.5rem'}}
name="订单号" name="订单号"
> >
<SingleInput name="ordernum" onChange={this.handleInputChange} value={this.state.ordernum}/> <SingleInput
name="ordernum"
onChange={this.handleInputChange}
value={this.state.ordernum}
onIconClick={()=>{this.clear('ordernum')}}
iconStyle={{marginTop:'.2rem'}}
icon={clear}/>
</SingleItem> </SingleItem>
<SingleItem <SingleItem
name="箱号" name="箱号"
...@@ -329,6 +360,12 @@ class DstributorOnTheWayQuery extends React.Component { ...@@ -329,6 +360,12 @@ class DstributorOnTheWayQuery extends React.Component {
id:'' id:''
}) })
localStorage.removeItem("id"); localStorage.removeItem("id");
}
else if(type=="ordernum"){
this.setState({
ordernum:''
})
localStorage.removeItem("ordernum");
}else{ }else{
this.setState({ this.setState({
boxnum:'' boxnum:''
......
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