wugg 3 years ago
parent
commit
376239e499
2 changed files with 7 additions and 6 deletions
  1. 6 6
      app/admin/controller/Purchin.php
  2. 1 0
      app/admin/route/app.php

+ 6 - 6
app/admin/controller/Purchin.php

@@ -136,6 +136,8 @@ class Purchin extends BaseController
         $data['wsm_addr'].=isset($wsmcode['wsm_addr']) ? $wsmcode['wsm_addr']:"";
         $check = Db::name("purchease_info")->where(['wsm_in_code'=>$incode,"is_del"=>0])->select();
         $info['checkinfo']= $check;
+        $return = Db::name("purchease_return")->where(['wsm_in_code'=>$incode,"is_del"=>0])->find();
+        $info['return']= $return;
         return app_show(0,'获取成功',$info);
     }
 
@@ -309,7 +311,7 @@ class Purchin extends BaseController
                     }else{
                         $order = ["order_code"=>$good['good_type_code'],"status"=>1,"action_remark"=>'', "action_type"=>"edit"];
                     }
-                    $good['usable_stock']+=$info['send_num'];
+                    $good['usable_stock']+=$info['wsm_num'];
                     $good['total_stock']=$good['usable_stock']+$good['wait_out_stock'];
                     $good['updatetime'] = date("Y-m-d H:i:s");
                     $upd=  Db::name("good_stock")->save($good);
@@ -369,8 +371,6 @@ class Purchin extends BaseController
             return error_show(1004,"参数mobile 不为空");
         }
         $error_remark = isset($this->post['error_remark']) &&$this->post['error_remark']!=="" ? trim($this->post['error_remark']):"" ;
-        $post_code = isset($this->post['post_code']) &&$this->post['post_code']!=="" ? trim($this->post['post_code']):"" ;
-        $post_company = isset($this->post['post_company']) &&$this->post['post_company']!=="" ? trim($this->post['post_company']):"" ;
         $remark = isset($this->post['remark']) &&$this->post['remark']!=="" ? trim($this->post['remark']):"" ;
         $result = GetUserInfo($this->post['token']);
         if((!empty($result) && $result['code']!=0) ||empty($result) ){
@@ -380,7 +380,7 @@ class Purchin extends BaseController
         Db::startTrans();
        try{
 
-        $info['status'] = 3;
+        $info['status'] =3;
         $info['updatetime'] = date("Y-m-d H:i:s");
         $up= Db::name("purchease_in")->save($info);
         if($up){
@@ -393,8 +393,8 @@ class Purchin extends BaseController
                 "return_addr"=>$addr,
                 "return_mobile"=>$mobile,
                 "error_remark"=>$error_remark,
-                "post_code"=>$post_code,
-                "post_company"=>$post_company,
+                "post_code"=>"",
+                "post_company"=>"",
                 "remark"=>$remark ,
                 "apply_id"=>$userinfo['id'],
                 "apply_name"=>$userinfo['nickname'],

+ 1 - 0
app/admin/route/app.php

@@ -187,6 +187,7 @@ Route::rule("orderininfo","admin/Purchin/info");
 Route::rule("orderincheck","admin/Purchin/check");
 Route::rule("orderinstatus","admin/Purchin/status");
 Route::rule("orderinreturn","admin/Purchin/ReturnAdd");
+Route::rule("returnsend","admin/Purchin/ReturnSend");