|
@@ -205,11 +205,11 @@ class Customar extends BaseController
|
|
if ($parent == "") {
|
|
if ($parent == "") {
|
|
return error_show(1002, "参数parent不能为空");
|
|
return error_show(1002, "参数parent不能为空");
|
|
}
|
|
}
|
|
-// $rename = Db::name('customer_org1')->where(['is_del' =>0,'id'=>$parent])->find();
|
|
|
|
-// $item = Db::name('customer_info')->where(['itemid'=>$rename['id'],'companyName'=>$companyName,'is_del'=>0])->find();
|
|
|
|
-// if ($item!=false) {
|
|
|
|
-// return error_show(1002, "公司名称已存在");
|
|
|
|
-// }
|
|
|
|
|
|
+ $rename = Db::name('customer_org1')->where(['is_del' =>0,'id'=>$parent])->find();
|
|
|
|
+ $item = Db::name('customer_info')->where(['itemid'=>$rename['id'],'companyName'=>$companyName,'is_del'=>0])->where([['id','<>',$id]])->find();
|
|
|
|
+ if ($item!=false) {
|
|
|
|
+ return error_show(1002, "公司名称已存在");
|
|
|
|
+ }
|
|
$customer_member = isset($this->post['customer_member']) && $this->post['customer_member'] !== "" ? $this->post['customer_member'] : "";
|
|
$customer_member = isset($this->post['customer_member']) && $this->post['customer_member'] !== "" ? $this->post['customer_member'] : "";
|
|
if ($customer_member == "") {
|
|
if ($customer_member == "") {
|
|
return error_show(1002, "参数customer_member不能为空");
|
|
return error_show(1002, "参数customer_member不能为空");
|