|
@@ -426,4 +426,42 @@ class Version extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function outOrder(){
|
|
|
+ $outOrdr = isset($this->post['outOrder'])&&!empty($this->post['outOrder'])? $this->post['outOrder'] :"";
|
|
|
+ if($outOrdr==""){
|
|
|
+ return error_show(1004,"参数 outOrder 不能为空");
|
|
|
+ }
|
|
|
+ $outinfo =Db::name("order_out")->where(["outOrder"=>$outOrdr,"is_del"=>0])
|
|
|
+ ->field("orderCode,outCode,apply_id,apply_name,addrid,post_name,post_code,sendtime,send_num,remark,addtime,updatetime")->find();
|
|
|
+ if($outinfo==false){
|
|
|
+ return error_show(1004,"未找到发货单信息");
|
|
|
+ }
|
|
|
+ $addrinfo =Db::name("order_addr")->where(["id"=>$outinfo['addrid']])->field("addr,addr_code,contactor,mobile,receipt_quantity")
|
|
|
+ ->find();
|
|
|
+ if($addrinfo==false){
|
|
|
+ return error_show(1004,"未找到发货单地址信息");
|
|
|
+ }
|
|
|
+ $orderinfo =Db::name("sale")->where(["orderCode"=>$outinfo["orderCode"],"is_del"=>0])
|
|
|
+ ->field("good_code,good_name,addtime")->find();
|
|
|
+ if($orderinfo==false){
|
|
|
+ return error_show(1004,"未找到订单信息");
|
|
|
+ }
|
|
|
+ $postdata=[];
|
|
|
+ if($outinfo['post_code']!=''){
|
|
|
+ $postCode = explode(",",$outinfo['post_code']);
|
|
|
+ $postinfo =Db::name("express_data")->where(["post_code"=>$postCode[0]])->find();
|
|
|
+ if($postinfo['status']>0){
|
|
|
+ $postdata=json_decode($postinfo['post_data'],true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $outinfo['addr'] = $addrinfo['addr'];
|
|
|
+ $outinfo['contactor'] = $addrinfo['contactor'];
|
|
|
+ $outinfo['mobile'] = $addrinfo['mobile'];
|
|
|
+ $outinfo['receipt_num'] = $addrinfo['receipt_quantity'];
|
|
|
+ $outinfo['good_name'] = $orderinfo['good_name'];
|
|
|
+ $outinfo['good_code'] = $orderinfo['good_code'];
|
|
|
+ $outinfo['order_time'] = $orderinfo['addtime'];
|
|
|
+ $outinfo['post_data'] = $postdata;
|
|
|
+ return app_show(0,"获取成功",$outinfo);
|
|
|
+ }
|
|
|
}
|