瀏覽代碼

Merge branch 'version1.5' of wugg/phpstock into master-online

wugg 3 年之前
父節點
當前提交
b7cdc03cdc
共有 2 個文件被更改,包括 34 次插入2 次删除
  1. 33 2
      app/admin/controller/Sale.php
  2. 1 0
      app/admin/route/app.php

+ 33 - 2
app/admin/controller/Sale.php

@@ -720,7 +720,7 @@ class Sale extends Base
                         "spuCode"=>$zxinfo['spuCode'],
                         "good_name"=>$zxinfo['good_name'],
                         "brand_id"=>$zxinfo['brand_id'],
-                        "good_unit"=>$zxinfo['good_name'],
+                        "good_unit"=>$zxinfo['unit_id'],
                         "cat_id"=>$zxinfo['cat_id'],
                         "good_type"=>0,
                         "moq"=>1,
@@ -732,7 +732,15 @@ class Sale extends Base
                         "good_remark"=>"",
                         "good_img"=>$zxinfo['good_img'],
                         "good_thumb_img"=>"",
-                        "good_info_img"=>"",
+                        "specinfo"=>$zxinfo['specinfo'],
+                        "work_day"=>$zxinfo['work_day'],
+                        "noble_metal"=>$zxinfo['metal_id'],
+                        "is_gold_price"=>$zxinfo['is_gold_price'],
+                        "config"=>$zxinfo['config'],
+                        "other_config"=>$zxinfo['other_config'],
+                        "weight"=>$zxinfo['weight'],
+                        "is_diff"=>$zxinfo['is_diff'],
+                        "supply_area"=>$zxinfo['supply_area'],
                         "status"=>1,
                         "is_del"=>0,
                         "createrid"=>$rm,
@@ -2910,4 +2918,27 @@ class Sale extends Base
             return error_show(1003,"更新失败");
         }
     }
+
+    public  function goodzxinfo(){
+        $orderCode= isset($this->post['spuCode'])&&$this->post['spuCode']!=''?trim($this->post['spuCode']):"";
+        if($orderCode==""){
+            return error_show(1003,"参数spuCode不能为空");
+        }
+        $order= Db::name("good_zixun")->where(["spuCode"=>$orderCode,"is_del"=>0])->find();
+        if(empty($order)){
+            return error_show(1003,"订单数据未找到");
+        }
+        $unit =Db::name("unit")->where(["id"=>$order['good_unit']])->find();
+        if($order['brand_id']!=0){
+            $brand=Db::name("brand")->where(["id"=>$order['brand_id']])->find();
+            $order["brand_name"]=isset($brand['brand_name'])?$brand['brand_name']:"";
+        }else{
+            $order["brand_name"]="";
+            $order["brand_id"]="";
+        }
+        $order['unit'] = isset($unit['unit'])?$unit['unit']:'';
+        $order['cat_info'] = made($order['cat_id'],[]);
+        $order['noble_name']=isset($order['noble_metal'])&&$order['noble_metal']!=0?$this->noble[$order['noble_metal']] :"";
+        return app_show(0,"获取成功",$order);
+    }
 }

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

@@ -107,6 +107,7 @@ Route::rule('xsaleout','admin/Sale/saleout');
 Route::rule('saleoutinfo','admin/Sale/outinfo');
 Route::rule('saleaddr','admin/Sale/addAddr');
 Route::rule('salegetprice','admin/Sale/getPrice');
+Route::rule('goodzxinfo','admin/Sale/goodzxinfo');
 
 Route::rule('checkflist','admin/Check/flist');
 Route::rule('checklist','admin/Check/list');