wugg 7 ヶ月 前
コミット
77d37bdc9b

+ 0 - 51
app/admin/controller/Activity.php

@@ -257,8 +257,6 @@ class Activity extends Base
             $value['stock_total'] = Db::name("good_stock")
                 ->where(['spuCode'=>$value['spuCode'],"is_del"=>0])
                 ->sum("usable_stock");
-            $value['good_info_img']=$value['good_info_img'];
-            $value['good_img']=$value['good_img'];
             $value['orderCode']=$orderCoderArr[$value['spuCode']]??'';
             $spec = Db::name("good_spec")->where(["spuCode"=>$value['spuCode'],"is_del"=>0])->select()->toArray();
             $speclist=[];
@@ -282,55 +280,6 @@ class Activity extends Base
         return app_show(0,"获取成功",['list'=>$data,'count'=>$count]);
     }
 
-    public function SetZixunTax(){
-        $param =$this->request->param(["spuCode"=>"","out_tax_id"=>"","out_tax"=>""],"post","trim");
-        $valid = Validate::rule( [
-            'spuCode' => 'require',
-            'out_tax_id' => 'require|number|gt:0',
-            'out_tax' => 'require',
-        ]);
-        if(!$valid->check($param))$this->error($valid->getError());
-        $goodinfo = GoodZixun::where(["spuCode"=>$param['spuCode']])->findOrEmpty();
-        if($goodinfo->isEmpty()){
-           $this->error('商品不存在');
-        }
-        $catgery=TaxCategory::where(["id"=>$param['out_tax_id']])->findOrEmpty();
-        $goodTax = GoodTax::where(["spuCode"=>$param['spuCode']])->findOrEmpty();
-        if($goodTax->isEmpty())$this->error("商品进项税目未设置");
-        $order= \app\admin\model\Sale::where(["good_code"=>$param['spuCode']])->findOrEmpty();
-        Db::startTrans();
-        try{
-                $goodTax->out_tax_id=$param['out_tax_id'];
-                $goodTax->out_tax=$param['out_tax'];
-                $goodTax->status=2;
-               if($goodTax->save()){
-                 if(!$order->isEmpty()){
-                   $orderTax=OrderTax::where(['code'=>$order->orderCode,'spuCode'=>$param['spuCode']])->findOrEmpty();
-                     $Tax=[
-                            'code'=>$order->orderCode,
-                            'spuCode'=>$param['spuCode'],
-                            'tax_code'=>$catgery->merge_code,
-                            'tax_name'=>$catgery->cat_name,
-                            'tax_short_name'=>$catgery->short_name,
-                            'inv_tax'=>str_replace("%","",$param['out_tax']),
-                            'inv_good_name'=>$goodTax->inv_good_name,
-                        ];
-                   if($orderTax->isEmpty()){
-                     OrderTax::create($Tax);
-                   }else {
-                      $orderTax->save($Tax);
-                   }
-                   $order->save(['updatetime'=>date("Y-m-d H:i:s")]);
-                };
-                 Db::commit();
-               } else throw new \Exception("设置失败");
-        }catch (\Exception $e){
-            Db::rollback();
-            $this->error($e->getMessage());
-        }
-        return app_show(0,"设置成功");
-    }
-
     //创建活动
     public function create(){
         $activity_name = isset($this->post['activity_name'])&&$this->post['activity_name']!="" ? trim($this->post['activity_name']):"";

+ 4 - 1
app/admin/controller/Consult.php

@@ -1042,6 +1042,8 @@ class Consult extends Base
         $info['noble_weight'] = $info['good_weight'];
         $info['companyNo'] = $zx['companyNo'];
         $info['companyName'] = $zx['companyName'];
+        $info['order_createrid'] = $zx['createrid'];
+        $info['order_creater'] = $zx['creater'];
         $user= \app\admin\common\User::getIns();
         $supplier =$user->handle("getCodeAndName",["code"=>$info['supplierNo']]);
         $info['supplierName'] = isset($supplier['data'][$info['supplierNo']])?$supplier['data'][$info['supplierNo']]:"";
@@ -2024,7 +2026,8 @@ class Consult extends Base
         ->leftJoin('consult_info c','a.infoNo=c.infoNo')
         ->leftJoin('consult_order b','a.zxNo=b.zxNo')
         ->where($where)
-        ->field("a.*,b.companyNo,b.companyName,platform_code,c.num info_num,c.bargain_status,c.status info_status")
+        ->field("a.*,b.companyNo,b.companyName,platform_code,c.num info_num,c.bargain_status,c.status info_status,
+        b.creater order_creater,b.createrid order_createrid")
         ->order("a.id desc")
         ->page($page,$size)
         ->select()

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

@@ -423,7 +423,6 @@ Route::rule('goodproof', 'admin/Goodup/prooflist');
 Route::rule('activitylist', 'admin/Activity/list');
 Route::rule('activitylinst', 'admin/Activity/linst');
 Route::rule("zixunlist", 'admin/Activity/zilist');
-Route::rule("setzxtax", 'admin/Activity/SetZixunTax');
 Route::rule("actquery", 'admin/Activity/query');
 Route::rule("actstock", 'admin/Activity/editStock');