wugg 1 年之前
父節點
當前提交
1b7183cc0a
共有 3 個文件被更改,包括 19 次插入41 次删除
  1. 10 33
      app/admin/controller/Consult.php
  2. 6 6
      app/admin/controller/Goodup.php
  3. 3 2
      app/admin/controller/Resign.php

+ 10 - 33
app/admin/controller/Consult.php

@@ -384,7 +384,7 @@ class Consult extends Base
 
         $zxinfo['can']= isset($zxinfo['cat_id']) && $zxinfo['cat_id'] !=0 ? made($zxinfo['cat_id'],[]):[];
         $zxinfo['khname']="";
-        $zxinfo['original_price']=sprintf("%.2f",$zxinfo['budget_price']* (1 -$budget/100));
+        $zxinfo['original_price']=sprintf("%.2f",$zxinfo['budget_price']* (1 -$budget));
         $zxinfo['khNo'] = $zxorder['khNo'];
         $zxinfo['brand_id']=$zxinfo['brand_id']==0 ?"":$zxinfo['brand_id'];
         $zxinfo['brand']="";
@@ -403,24 +403,10 @@ class Consult extends Base
         $zxinfo['unit_name']="";
         $zxinfo['metal_name']=isset($zxinfo['metal_id'])&& $zxinfo['metal_id']!=0?$this->noble[$zxinfo['metal_id']]:"";
         $zxinfo['specinfo']=json_decode($zxinfo['specinfo'],true);
-//<<<<<<< HEAD
-//		$zxinfo['khname']= '';
-//		$kccode=[];
-//        if($zxorder['khNo']!==""){
-////            $kh=Db::name("customer_info")->where(['companyNo'=>$zxorder['khNo']])->find();
-////            $zxinfo['khname']= isset($kh['companyName'])?$kh['companyName']:"";
-//=======
 
         $userCommon = \app\admin\common\User::getIns();
         $tmp = $userCommon->handle('getCodeAndName', ['code' => [$zxorder['companyNo'],$zxorder['khNo']]]);
 
-//        if($zxorder['khNo']!==""){
-//            $kh=Db::name("customer_info")->where(['companyNo'=>$zxorder['khNo']])->find();
-//            $zxinfo['khname']= $tmp['data'][$zxorder['khNo']]??'';//isset($kh['companyName'])?$kh['companyName']:"";
-//>>>>>>> master-new
-//            $zxinfo['khNo']= $zxorder['khNo'];
-//            $kccode[]=$zxorder['khNo'];
-//        }
         if($zxinfo['unit']!==""){
             $unit=Db::name("unit")->where(['id'=>$zxinfo['unit']])->find();
             $zxinfo['unit_name']= isset($unit['unit'])?$unit['unit']:"";
@@ -429,18 +415,6 @@ class Consult extends Base
             $unit=Db::name("brand")->where(['id'=>$zxinfo['brand_id']])->find();
             $zxinfo['brand']= isset($unit['brand_name'])?$unit['brand_name']:"";
         }
-//        $zxinfo['company']= '';
-//        if($zxorder['companyNo']!==""){
-//            $kh=Db::name("business")->where(['companyNo'=>$zxorder['companyNo']])->find();
-//            $zxinfo['company']= isset($kh['company'])?$kh['company']:"";
-//<<<<<<< HEAD
-//            $kccode[]=$zxorder['companyNo'];
-//        }
-//        if(!empty($kccode)){
-//            $userCommon = \app\admin\common\User::getIns();
-//            $tmp = $userCommon->handle('getCodeAndName', ['code' =>$kccode]);
-////=======
-////>>>>>>> master-new
             $zxinfo['company'] = $tmp['data'][$zxorder['companyNo']] ?? '';
             $zxinfo['khname'] = $tmp['data'][$zxorder['khNo']] ?? '';
 //        }
@@ -1752,10 +1726,10 @@ class Consult extends Base
         $info['good_img'] = isset($bidinfos['good_img'])?$bidinfos['good_img']:"";
         $info['brand_id'] = isset($bidinfos['brand_id'])?$bidinfos['brand_id']:"";
         $info['good_num'] = isset($consultinfos['num'])?$consultinfos['num']:"";
-        $info['before_rate'] =round($info['before_rate']*100,2);
-        $info['sale_price'] =round($bidinfos['origin_price'],2);
-        $info['cost_before_price'] =round($bidinfos['origin_cost_fee'],2);
-        $info['after_rate'] = round($info['after_rate']*100,2);
+//        $info['before_rate'] =round($info['before_rate']*100,2);
+//        $info['sale_price'] =round($bidinfos['origin_price'],2);
+//        $info['cost_before_price'] =round($bidinfos['origin_cost_fee'],2);
+//        $info['after_rate'] = round($info['after_rate']*100,2);
         $info['exam_info'] = isset($info['exam_info'])&&$info['exam_info']!=""?json_decode($info['exam_info'],true):"";
         if($bidinfos['brand_id']!=0){
             $info['brand_id'] = $bidinfos['brand_id'];
@@ -1787,7 +1761,10 @@ class Consult extends Base
             //业务主管利率
             $info['rate_status'] =1;
         }
-
+	    $info['before_rate'] =round($info['before_rate']*100,2);
+	    $info['sale_price'] =round($bidinfos['origin_price'],2);
+	    $info['cost_before_price'] =round($bidinfos['origin_cost_fee'],2);
+	    $info['after_rate'] = round($info['after_rate']*100,2);
         $god=[
             "metal_id"=>$bidinfos['metal_id'],
             "weight"=>$bidinfos["good_weight"],
@@ -2379,7 +2356,7 @@ class Consult extends Base
 //                  ->where(["id"=>$value['cat_id']])
 //                  ->find();
 //              $budget = isset($cat['order_rate']) ? $cat['order_rate']:0;
-            $budget = get_budget((int)$value['cat_id'], $value['companyNo'], (int)$value['platform_code']);
+            $budget = get_budget((int)$value['cat_id'], $value['companyNo'], (int)$value['platform_id']);
                $value['original_price']=sprintf("%.2f",$value['budget_price']* (1 -$budget));
 
 //            $brand = Db::name("brand")->where(['id'=>$value['brand_id']])->find();

+ 6 - 6
app/admin/controller/Goodup.php

@@ -1102,8 +1102,8 @@ class Goodup extends Base
 		                    'proof_type'=>$proof_type,
 		                    'proof_url'=>$proof_url,
 		                    'is_del'=>0,
-		                    "creater"=>$this->uid,
-		                    "createrid"=>$this->uname,
+		                    "creater"=>$this->uname,
+		                    "createrid"=>$this->uid,
 		                    "addtime"=>date("Y-m-d H:i:s"),
 		                    "updatetime"=>date("Y-m-d H:i:s")
 		                    ];
@@ -1848,8 +1848,8 @@ class Goodup extends Base
 		                    'proof_type'=>$post['proof_type'],
 		                    'proof_url'=>$post['proof_url'],
 		                    'is_del'=>0,
-		                    "creater"=>$this->uid,
-		                    "createrid"=>$this->uname,
+		                    "creater"=>$this->uname,
+		                    "createrid"=>$this->uid,
 		                    "addtime"=>date("Y-m-d H:i:s"),
 		                    "updatetime"=>date("Y-m-d H:i:s")
 		                    ];
@@ -2522,8 +2522,8 @@ class Goodup extends Base
 		                    'proof_type'=>$proof_type,
 		                    'proof_url'=>$proof_url,
 		                    'is_del'=>0,
-		                    "creater"=>$this->uid,
-		                    "createrid"=>$this->uname,
+		                    "creater"=>$this->uname,
+		                    "createrid"=>$this->uid,
 		                    "addtime"=>date("Y-m-d H:i:s"),
 		                    "updatetime"=>date("Y-m-d H:i:s")
 		                    ];

+ 3 - 2
app/admin/controller/Resign.php

@@ -100,13 +100,14 @@ class Resign extends Base
             $hand = resign_hand_user($this->uid, 0);
             if (!empty($role[DataGroupModel::$type_全部])) {
                 $arr = array_unique(array_merge($hand, $role[DataGroupModel::$type_全部]));
-
+                $condition[]= ["p.apply_id","in",$arr];
+        	    $condition[]= ["p.cgderid","in",$hand];
                 $supplierNos = Db::connect('mysql_sys')
                     ->name('supplier')
                     ->where(['is_del' => 0, 'personid' => $arr])
                     ->column('code');
 
-                $where[] = ['p.supplierNo', 'in', $supplierNos];
+                $condition[] = ['p.supplierNo', 'in', $supplierNos];
             }
         }
         $company_name = isset($this->post['company_name']) && $this->post['company_name'] !== "" ? trim($this->post['company_name']) : "";