Эх сурвалжийг харах

Merge branch 'version1.5' of ssh://192.168.10.210:10022/wugg/stock into version1.5

wugg 3 жил өмнө
parent
commit
7d4815c6ed

+ 3 - 0
app/admin/controller/Brand.php

@@ -102,6 +102,9 @@ class Brand extends BaseController
         if($info==""){
             return error_show(1003,"未找到数据");
         }
+        if($info['status']==1){
+            return error_show(1002,"状态是启用状态,无法编辑");
+        }
         $brand_name=isset( $this->post['brand_name']) && $this->post['brand_name'] !=="" ? trim($this->post['brand_name']):"";
         if($brand_name==""){
             return error_show(1002,"参数brand_name不能为空");

+ 3 - 0
app/admin/controller/Customar.php

@@ -184,6 +184,9 @@ class Customar extends BaseController
         if (empty($idinfo)) {
             return error_show(1004, "未找到数据");
         }
+        if($idinfo['status']==1){
+            return error_show(1002,"状态是启用状态,无法编辑");
+        }
 //        $companyNo = isset($this->post['companyNo']) && $this->post['companyNo'] !== "" ? $this->post['companyNo'] : "";
 //        if ($companyNo == "") {
 //            return error_show(1002, "参数companyNo不能为空");

+ 3 - 0
app/admin/controller/Customer.php

@@ -215,6 +215,9 @@ class Customer extends BaseController
         if($sid==false){
             return error_show(1004,"公司不存在");
         }
+        if($sid['status']==1){
+            return error_show(1002,"状态是启用状态,无法编辑");
+        }
         $pid = isset($this->post['pid']) && $this->post['pid'] !=="" ? intval($this->post['pid']):"";
         if($pid===""){
             return error_show(1004,"父级id不能为空");

+ 1 - 1
app/admin/controller/Result.php

@@ -51,7 +51,7 @@ class Result extends BaseController
         if ($desc == "") {
             return error_show(1002, "异常描述不能为空");
         }
-        $type = isset($this->post['type']) && $this->post['type'] !== "" ? intval($this->post['type']) : "1";
+        $type = isset($this->post['type']) && $this->post['type'] !== "" ? intval($this->post['type']) : "";
         //$result_code = isset($this->post['result_code']) && $this->post['result_code'] !=="" ? intval($this->post['result_code']):"";
         $count = Db::name('result_info')->count();
         $str = sprintf("%04d", $count);

+ 3 - 0
app/admin/controller/Specs.php

@@ -135,6 +135,9 @@ class Specs extends BaseController
         if($info==""){
             return error_show(1002,"未找到数据");
         }
+        if($info['status']==1){
+            return error_show(1002,"状态是启用状态,无法编辑");
+        }
         $spec_name = isset($this->post['spec_name']) && $this->post['spec_name'] !==""? trim($this->post['spec_name']):"";
         if($spec_name==""){
             return error_show(1002,"参数spec_name不能为空");

+ 3 - 0
app/admin/controller/Suppler.php

@@ -269,6 +269,9 @@ class Suppler extends BaseController
         if($info==""){
             return error_show(1002,"未找到数据");
         }
+        if($info['status']==1){
+            return error_show(1002,"状态是启用状态,无法编辑");
+        }
         $source= isset($this->post['source']) && $this->post['source']!==""? trim($this->post['source']) :"";
         if($source==""){
             return error_show(1002,"供应商来源不能为空");