Browse Source

业务企业、供应商管理和企业客户组织管理优化详情参数

wufeng 2 years ago
parent
commit
a13f609e31

+ 4 - 4
app/admin/controller/Business.php

@@ -326,11 +326,11 @@ class Business extends Base
         return  $update? error_show(0,"{$msg}成功"):error_show(1004,"{$msg}失败");
     }
     public function info(){
-        $id =isset($this->post['id']) && $this->post['id'] !==""? intval($this->post['id']) :"";
-        if($id==""){
-            return error_show(1004,"参数id不能为空");
+        $companyNo =isset($this->post['companyNo']) && $this->post['companyNo'] !==""? trim($this->post['companyNo']) :"";
+        if($companyNo==""){
+            return error_show(1004,"参数companyNo不能为空");
         }
-        $tod=Db::name('business')->where(['id'=>$id,'is_del'=>0])->find();
+        $tod=Db::name('business')->where(['companyNo'=>$companyNo,'is_del'=>0])->find();
         if($tod==""){
             return error_show(1002,"未找到数据");
         }

+ 4 - 4
app/admin/controller/Customar.php

@@ -295,12 +295,12 @@ class Customar extends BaseController
 
     public function info()
     {
-        $id = isset($this->post['id']) && $this->post['id'] !== "" ? intval($this->post['id']) : "";
-        if ($id == "") {
-            return error_show(1002, "参数id不能为空");
+        $companyNo = isset($this->post['companyNo']) && $this->post['companyNo'] !== "" ? trim($this->post['companyNo']) : "";
+        if ($companyNo == "") {
+            return error_show(1002, "参数companyNo不能为空");
         }
         //>field("companyNo,companyName,itemid as parent,id")-
-        $idinfo = Db::name('customer_info')->where(['id' => $id, 'is_del' => 0])->find();
+        $idinfo = Db::name('customer_info')->where(['companyNo' => $companyNo, 'is_del' => 0])->find();
         if ($idinfo == "") {
             return error_show(1002, "未找到数据");
         }

+ 4 - 4
app/admin/controller/Suppler.php

@@ -484,11 +484,11 @@ class Suppler extends BaseController
         }
     }
     public function info(){
-        $id = isset($this->post['id'])&& $this->post['id'] !=="" ? intval($this->post['id']) :"";
-        if($id ==""){
-            return error_show(1002,"参数id不能为空");
+        $code = isset($this->post['code'])&& $this->post['code'] !=="" ? trim($this->post['code']) :"";
+        if($code ==""){
+            return error_show(1002,"参数code不能为空");
         }
-        $info = Db::name('supplier')->where(['id'=>$id,'is_del'=>0])->find();
+        $info = Db::name('supplier')->where(['code'=>$code,'is_del'=>0])->find();
         if($info==""){
             return error_show(1002,"未找到数据");
         }