wugg 3 years ago
parent
commit
338750b1f6
2 changed files with 52 additions and 3 deletions
  1. 45 2
      app/admin/controller/Consult.php
  2. 7 1
      app/admin/controller/Goodup.php

+ 45 - 2
app/admin/controller/Consult.php

@@ -591,8 +591,6 @@ class Consult extends BaseController
         $info['cat_info'] = made($info['cat_id'],[]);
         $supplier = Db::name("supplier")->where(["code"=>$info['supplierNo']])->find();
         $info['supplierName'] = isset($supplier['name'])?$supplier['name']:"";
-        $supplier = Db::name("supplier")->where(["code"=>$info['supplierNo']])->find();
-        $info['supplierName'] = isset($supplier['name'])?$supplier['name']:"";
         if($info['brand_id']!=0){
             $brand=Db::name("brand")->where(["id"=>$info['brand_id']])->find();
             $info["brand_name"]=isset($brand['brand_name'])?$brand['brand_name']:"";
@@ -676,4 +674,49 @@ class Consult extends BaseController
             return error_show(1004,$e->getMessage());
         }
     }
+
+    public function bidlist(){
+        $page = isset($this->post['page']) && $this->post['page'] !== "" ? intval($this->post['page']) :"1";
+        $size = isset($this->post['size']) && $this->post['size'] !== "" ? intval($this->post['size']) :"10";
+        $where=[['is_del',"=",0]];
+        $zxNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
+        if ($zxNo !== "") {
+            $where[] = ['zxNo','=',$zxNo];
+        }
+        $infoNo = isset($this->post['infoNo']) && $this->post['infoNo'] !== "" ? trim($this->post['infoNo']) : "";
+        if ($infoNo !== "") {
+            $where[] = ['infoNo','=',$infoNo];
+        }
+        $bidNo = isset($this->post['bidNo']) && $this->post['bidNo'] !== "" ? trim($this->post['bidNo']) : "";
+        if ($bidNo !== "") {
+            $where[] = ['bidNo','=',$bidNo];
+        }
+        $projectNo = isset($this->post['projectNo']) && $this->post['projectNo'] !== "" ? trim($this->post['projectNo']) : "";
+        if ($projectNo !== "") {
+            $zxlist = Db::name("consult_order")->where(["projectNo"=>$projectNo,"is_del"=>0,"is_project"=>1])->column
+            ("zxNo");
+            $where[] = ['zxNo','in',$zxlist];
+        }
+        $count = Db::name('consult_bids')->where($where)->count();
+        $total = ceil($count / $size);
+        $page = $page >= $total ? $total : $page;
+        $list =Db::name('consult_bids')->where($where)->page($page,$size)->select();
+        $data=[];
+        foreach ($list as $value){
+            $value['can']= isset($value['cat_id']) && $value['cat_id'] !=0 ? made($value['cat_id']):[];
+            $unit =Db::name("unit")->where(["id"=>$value['unit_id']])->find();
+            $value['unit'] = isset($unit['unit'])?$unit['unit']:'';
+            $supplier = Db::name("supplier")->where(["code"=>$value['supplierNo']])->find();
+            $value['supplierName'] = isset($supplier['name'])?$supplier['name']:"";
+            if($value['brand_id']!=0){
+                $brand=Db::name("brand")->where(["id"=>$value['brand_id']])->find();
+                $value["brand_name"]=isset($brand['brand_name'])?$brand['brand_name']:"";
+            }else{
+                $value["brand_name"]="";
+                $value["brand_id"]="";
+            }
+            $data[]=$value;
+        }
+        return app_show(0,"获取成功",['count'=>$count,'list'=>$data]);
+    }
 }

+ 7 - 1
app/admin/controller/Goodup.php

@@ -907,7 +907,13 @@ class Goodup extends BaseController
             }
             $platform['online_time']=$online_time;
         }
-
+        if($exam_status==6){
+            $good_code= isset($this->post['plat_code'])&&$this->post['plat_code']!==""?trim($this->post['plat_code']):"";
+            if($good_code===""){
+                return error_show(1004,"参数plat_code不能为空");
+            }
+            $platform['plat_code']=$good_code;
+        }
         $exam_remark = isset($this->post['exam_remark'])&&$this->post['exam_remark']!==""?trim($this->post['exam_remark']):"";
         $platform['exam_status']=$exam_status;
         $platform['updatetime']=date("Y-m-d H:i:s");