|
@@ -222,7 +222,7 @@ class Customar extends BaseController
|
|
|
$datainfo = Db::name('customer_info')->save($data);
|
|
|
|
|
|
if ($datainfo) {
|
|
|
-
|
|
|
+
|
|
|
|
|
|
foreach ($customer_member as $value) {
|
|
|
|
|
@@ -236,7 +236,8 @@ class Customar extends BaseController
|
|
|
|
|
|
$item['commobile'] =isset($value['mobile']) ? $value['mobile'] : "";
|
|
|
$item['comtel'] = "";
|
|
|
- $item['id'] = isset($value['id']) ? $value['id'] : "";
|
|
|
+
|
|
|
+ isset($value['id'])&&$value['id']!=="" ? $item['id'] = $value['id']:'';
|
|
|
$item['contactor'] = isset($value['contactor']) ? $value['contactor'] : "";
|
|
|
$item['position'] = isset($value['position']) ? $value['position'] : "";
|
|
|
$item['wxaccount'] = isset($value['wxaccount']) ? $value['wxaccount'] : "";
|
|
@@ -247,14 +248,14 @@ class Customar extends BaseController
|
|
|
$item['status'] = $value['status'];
|
|
|
$item['createrid'] = $createrid;
|
|
|
$item['creater'] = $creater;
|
|
|
- $item['companyNo'] = $companyNo;
|
|
|
+ $item['companyNo'] = isset($value['companyNo']) ? $value['companyNo'] : "";
|
|
|
$item['is_del'] = 0;
|
|
|
-
|
|
|
+ $item['addtime']=date("Y-m-d H:i:s");
|
|
|
$item['updatetime'] = date("Y-m-d H:i:s");
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
$vp = Db::name('customer_member')->save($item);
|
|
|
-
|
|
|
+
|
|
|
if ($vp == false) {
|
|
|
Db::rollback();
|
|
|
return error_show(1003, "更新失败");
|