wugg 8 ヶ月 前
コミット
171d7c30b4
2 ファイル変更11 行追加8 行削除
  1. 6 0
      app/admin/controller/Activity.php
  2. 5 8
      app/admin/controller/Goodup.php

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

@@ -191,15 +191,21 @@ class Activity extends Base
         if($relaComNo!="") $where[]=['a.supplierNo|a.companyNo','=', $relaComNo];
 		$orderSource= isset($this->post['order_source']) && $this->post['order_source']!='' ? $this->post['order_source']:[];
         if(!empty($orderSource)) $where[]=['a.order_source','in', $orderSource];
+        $tax_status= isset($this->post['tax_status']) && $this->post['tax_status']!=='' ? $this->post['tax_status']:'';
+        if($tax_status!==''){
+            $where[]=['b.status',$tax_status==0?null:'=',$tax_status];
+        }
 
         $count = Db::name('good_zixun')
             ->alias("a")
+            ->leftJoin("good_tax b","a.spuCode=b.spuCode")
             ->where($where)
             ->count();
         $total = ceil($count / $size);
         $page = $page >= $total ? $total : $page;
         $list = Db::name('good_zixun')
             ->alias("a")
+             ->leftJoin('good_tax b','a.spuCode=b.spuCode')
             ->where($where)
             ->page($page,$size)
             ->order("a.addtime desc")

+ 5 - 8
app/admin/controller/Goodup.php

@@ -941,9 +941,6 @@ class Goodup extends Base
             return error_show(1004,"参数is_auth不能为空");
         }
         $auth_img = isset($this->post['auth_img'])&&$this->post['auth_img']!=""? trim($this->post['auth_img']):"";
-//        if($auth_img==''){
-//            return error_show(1004,"商品不能为空");
-//        }
         $after_sales = isset($this->post['after_sales'])&&$this->post['after_sales']!=""? trim($this->post['after_sales']):"";
         if($after_sales==""){
             return error_show(1004,"参数after_sales不能为空");
@@ -1026,11 +1023,11 @@ class Goodup extends Base
         $open_type= isset($this->post['open_type'])&&$this->post['open_type']!==''? intval($this->post['open_type']):'';
         $inv_good_name = isset($this->post['inv_good_name'])&&$this->post['inv_good_name']!==''? trim($this->post['inv_good_name']):'';
         if($open_type=='') return error_show(1004,'开票商品类型不能为空');
-            if($open_type==1){
-                if($tax_id=='') return error_show(1004,'商品税目id不能为空');
-                if($inv_good_name=='') return error_show(1004,'开票商品名称不能为空');
-            }
-		 if($isCombind==1){
+        if($open_type==1){
+            if($tax_id=='') return error_show(1004,'商品税目id不能为空');
+            if($inv_good_name=='') return error_show(1004,'开票商品名称不能为空');
+        }
+        if($isCombind==1){
 			if(empty($combindList)) return error_show(1004,'组合商品子商品信息不能为空');
 			$dchild=[];
 			$valid = Validate::rule(['childCode|子商品成本编号'=>'require','child_name|子商品名称'=>'require','child_num|组合比例'=>'require|number|gt:0']);