ソースを参照

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

wugg 3 年 前
コミット
21b6bd9f36
1 ファイル変更4 行追加3 行削除
  1. 4 3
      app/admin/controller/Customar.php

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

@@ -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, "未找到数据");
         }