panlumeng 3 tahun lalu
induk
melakukan
6972775efe

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

@@ -151,7 +151,7 @@ class Purch extends \app\BaseController
             $var[]=$value;
         }
         //$var = Db::name('purchease_in')->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->select();
-        $dom = Db::name("purchease_diff")->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->select();
+        $dom = Db::name("purchease_diff")->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->find();
         $goon = Db::name('good')->where(['good_code'=>$data['good_code']])->field("cat_id")->find();
         if(empty($goon)){
             return error_show(1002,"未找到商品数据");

+ 19 - 0
app/admin/controller/Purchin.php

@@ -205,6 +205,24 @@ class Purchin extends BaseController
         if(empty($info)){
             return error_show(1004,"未找到数据");
         }
+        $dom = Db::name("purchease_order")->where(['cgdNo'=>$info['cgdNo'],'is_del'=>0])->find();
+        $goon = Db::name('good')->where(['good_code'=>$dom['good_code']])->field("cat_id")->find();
+        if(empty($goon)){
+            return error_show(1002,"未找到商品数据");
+        }
+            $cat= isset($goon['cat_id']) && $goon['cat_id'] !=0 ? made($goon['cat_id']):[];
+            $info['cgder']=$dom['cgder'];
+        $info['good_code']=$dom['good_code'];
+        $info['good_name']=$dom['good_name'];
+        $info['good_type_code']=$dom['good_type_code'];
+        $info['good_num']=$dom['good_num'];
+        $info['good_price']=$dom['good_price'];
+        $info['total_fee']=$dom['total_fee'];
+        $info['diff_fee']=$dom['diff_fee'];
+        $info['diff_weight']=$dom['diff_weight'];
+        $info['gold_price']=$dom['gold_price'];
+//        $info['cant']=$cat;
+
         $wsmcode = Db::name("warehouse_info")->alias("a")->leftJoin("supplier b","a.supplierNo=b.code")
             ->leftJoin("warehouse_addr c","a.wsm_code=c.wsm_code and c.is_del=0")
             ->where(["a.wsm_code"=>$info['wsm_code']])->field("a.name as wsm_name,b.name,b.code,c.wsm_name as wsm_contactor,c.wsm_mobile,c.wsm_addr,c.addr_code")->find();
@@ -224,6 +242,7 @@ class Purchin extends BaseController
         $return['return_addr']=isset($return['return_addr'])&&$return['return_addr']!="" ?$return['return_addr']:$info['wsm_addr'];
         $return['return_mobile']=isset($return['return_mobile'])&&$return['return_mobile']!="" ?$return['return_mobile']:$info['wsm_mobile'];
         $info['return']= $return;
+        $info['can']=$cat;
         return app_show(0,'获取成功',$info);
     }
 

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

@@ -377,7 +377,7 @@ class Sale extends BaseController
             return error_show(1002, "未找到销售订单数据");
         }
         $info = Db::name('sale_diff')->where(['orderCode' => $einfo['orderCode']])->select();
-        $de = Db::name('order_out')->where(['orderCode' => $einfo['orderCode']])->select();
+        //$de = Db::name('order_out')->where(['orderCode' => $einfo['orderCode']])->select();
         $dm = Db::name('order_return')->where(['orderCode' => $einfo['orderCode']])->select();
         $dk = Db::name('order_back')->where(['orderCode' => $einfo['orderCode']])->select();
         $sa = Db::name('sale_return')->where(['orderCode' => $einfo['orderCode']])->select();
@@ -463,10 +463,10 @@ class Sale extends BaseController
         $einfo['info'] = $data;
         $einfo['companyName'] = isset($in['companyName']) ? $in['companyName'] : "";
         $einfo['addrs'] = $addrs;
-        $einfo['bum'] = $ins;
+        $einfo['orderout'] = $ins;
         $einfo['can'] = $int;
         $einfo['salediff'] = $info;
-        $einfo['orderout'] = $de;
+        //$einfo['orderout'] = $de;
         $einfo['orderreturn'] = $dm;
         $einfo['orderback'] = $dk;
         $einfo['salereturn'] = $sa;