|
@@ -31,10 +31,11 @@ class Customar extends BaseController
|
|
|
if (!empty($rename)) {
|
|
|
return error_show(1002, "公司名称已存在");
|
|
|
}
|
|
|
- $parent = isset($this->post['parent']) && $this->post['parent'] !== "" ? intval($this->post['parent'] ) : "0";
|
|
|
+ $parent = isset($this->post['parent']) && $this->post['parent'] !== "" ? intval($this->post['parent'] ) : "";
|
|
|
// if ($parent === "") {
|
|
|
// return error_show(1002, "参数parent不能为空");
|
|
|
// }
|
|
|
+ //$itemid = isset($this->post['itemid']) && $this->post['itemid'] !== "" ? intval($this->post['itemid'] ) : "";
|
|
|
$customer_member = isset($this->post['customer_member']) && $this->post['customer_member'] !== "" ? $this->post['customer_member'] : "";
|
|
|
if ($customer_member == "") {
|
|
|
return error_show(1002, "参数customer_member不能为空");
|
|
@@ -55,7 +56,7 @@ class Customar extends BaseController
|
|
|
"companyNo" => $companyNo,
|
|
|
"companyName" => $companyName,
|
|
|
"parent" => $parent,
|
|
|
- "itemid" => "",
|
|
|
+ "itemid" => $parent,
|
|
|
"area" => "",
|
|
|
"comdepart" => "",
|
|
|
"commobile" => "",
|
|
@@ -282,7 +283,7 @@ class Customar extends BaseController
|
|
|
if ($id == "") {
|
|
|
return error_show(1002, "参数id不能为空");
|
|
|
}
|
|
|
- $idinfo = Db::name('customer_info')->where(['id' => $id, 'is_del' => 0])->field("companyNo,companyName,parent")->find();
|
|
|
+ $idinfo = Db::name('customer_info')->where(['id' => $id, 'is_del' => 0])->field("companyNo,companyName,itemid as parent")->find();
|
|
|
if ($idinfo == "") {
|
|
|
return error_show(1002, "未找到数据");
|
|
|
}
|