Bläddra i källkod

Merge branch 'plm' of ssh://192.168.10.210:10022/wugg/stock into plm

wugg 3 år sedan
förälder
incheckning
4d40f29d94
3 ändrade filer med 26 tillägg och 1 borttagningar
  1. 24 0
      app/admin/controller/Purchback.php
  2. 1 1
      app/admin/controller/Sale.php
  3. 1 0
      app/admin/route/app.php

+ 24 - 0
app/admin/controller/Purchback.php

@@ -176,4 +176,28 @@ public function backfe(){
     $datainfo=Db::name('purchease_back')->save($data);
     return $datainfo ? error_show(0,"更新成功") : error_show(1002,"更新失败");
 }
+public function info(){
+    $returnCode = isset($this->post['returnCode']) && $this->post['returnCode'] !==""? trim($this->post['returnCode']) :"";
+    if($returnCode==""){
+        return error_show(1002,"参数returnCode不能为空");
+    }
+    $info= Db::name("purchease_back")->where(['returnCode'=>$returnCode])->find();
+    if(empty($info)){
+        return error_show(1002,"未找到数据");
+    }
+    $goon = Db::name('good')->where(['good_code'=>$info['good_code']])->field("cat_id")->find();
+    if(empty($goon)){
+        return error_show(1002,"未找到商品数据");
+    }
+    $int= isset($goon['cat_id']) && $goon['cat_id'] !=0 ? made($goon['cat_id']):[];
+    $wsmcode = Db::name("purchease_order")->alias("k")->leftJoin("supplier c", "k.supplierNo=c.code")
+        ->where(["k.cgdNo" => $info['cgdNo']])->field("k.good_name,k.good_code,k.good_num,c.name,c.code")->find();
+    //$info['good'] = isset($wsmcode['good_name']) ? $wsmcode['good_name'] : "";
+    $info['goo_num'] = isset($wsmcode['good_num']) ? $wsmcode['good_num'] : "";
+    //$info['god'] = isset($wsmcode['good_code']) ? $wsmcode['good_code'] : "";
+    $info['wsm_supplier'] = isset($wsmcode['name']) ? $wsmcode['name'] : "";
+    $info['wsm_supplierNo'] = isset($wsmcode['code']) ? $wsmcode['code'] : "";
+    $info['can']=$int;
+    return app_show(0,"获取成功",$info);
+}
 }

+ 1 - 1
app/admin/controller/Sale.php

@@ -162,7 +162,7 @@ class Sale extends BaseController
     $where[] = ['is_del',"=",0];
     $orderCode=isset($this->post['orderCode']) && $this->post['orderCode'] !=="" ? trim($this->post['orderCode']):"";
     if($orderCode !==""){
-        $where[]=['orderCode',"=",$orderCode];
+        $where[]=['orderCode',"like","%$orderCode%"];
     }
     $apply_name=isset($this->post['apply_name']) && $this->post['apply_name'] !=="" ? trim($this->post['apply_name'])
         :"";

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

@@ -222,6 +222,7 @@ Route::rule('backcreate','admin/Purchback/create');
 Route::rule('backlist','admin/Purchback/list');
 Route::rule('backstatus','admin/Purchback/status');
 Route::rule('backfe','admin/Purchback/backfe');
+Route::rule('backinfo','admin/Purchback/info');
 
 Route::rule('aftercreate','admin/After/create');
 Route::rule('afterinfo','admin/After/info');