wugg 2 years ago
parent
commit
40ba2a18cd
1 changed files with 21 additions and 1 deletions
  1. 21 1
      app/admin/controller/Consult.php

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

@@ -1300,7 +1300,7 @@ class Consult extends Base
                 "sale_price"=>$info['sale_price'],
                 "cost_before_price"=>$info['sale_cost_fee'],
                 "cost_after_price"=>$cost_price,
-                "before_rate"=>round(($info['sale_price']-$info['total_fee'])/$info['sale_price'],2),
+                "before_rate"=>round(($info['origin_price']-$info['total_fee'])/$info['origin_price'],2),
                 "after_rate"=>round(($bargain_price-$info['total_fee'])/$bargain_price,2),
                 "after_price"=>$bargain_price,
                 "exam_info"=>"",
@@ -1921,10 +1921,21 @@ class Consult extends Base
         if ($zxNo !== "") {
             $where[] = ['zxNo','=',$zxNo];
         }
+        $bargainNo = isset($this->post['bargainNo']) && $this->post['bargainNo'] !== "" ? trim($this->post['bargainNo']) : "";
+        if ($bargainNo !== "") {
+            $where[] = ['bargainNo','=',$bargainNo];
+        }
+
+        $status = isset($this->post['status']) && $this->post['status'] !== "" ? intval($this->post['status']) : "";
+        if ($status!== "") {
+            $where[] = ['status','=',$status];
+        }
+
         $infoNo = isset($this->post['infoNo']) && $this->post['infoNo'] !== "" ? trim($this->post['infoNo']) : "";
         if ($infoNo !== "") {
             $where[] = ['infoNo','=',$infoNo];
         }
+
         $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
@@ -1936,6 +1947,15 @@ class Consult extends Base
             $bidinfo = Db::name("consult_info")->where([["pgNo","=",$pgNo],["is_del","=",0]])->column("infoNo");
             $where[] = ['infoNo','in',$bidinfo];
         }
+        $start= isset($this->post['start']) && $this->post['start'] !== "" ? $this->post['start'] : "";
+        $end= isset($this->post['end']) && $this->post['end'] !== "" ? $this->post['end'] : "";
+        if($start!=""){
+            $where[]=["addtime",">=",date("Y-m-d H:i:s",$start)];
+        }
+        if($end!=""){
+            $where[]=["addtime","<=",date("Y-m-d H:i:s",$end)];
+        }
+
         $role=$this->checkRole();
         if(!empty($role['write'])){
             $where[]=["createrid","in",$role['write']];