diff --git a/app/customer/controller/Index.php b/app/customer/controller/Index.php index cdcb0aa..2154e5b 100644 --- a/app/customer/controller/Index.php +++ b/app/customer/controller/Index.php @@ -350,6 +350,7 @@ class Index extends BaseController $contact = [ 'name' => $param['c_name'], 'mobile' => $param['c_mobile'], + 'sex' => $param['c_sex'], 'qq' => $param['c_qq'], 'wechat' => $param['c_wechat'], 'email' => $param['c_email'], diff --git a/app/customer/view/index/add.html b/app/customer/view/index/add.html index e045cb4..8c31047 100644 --- a/app/customer/view/index/add.html +++ b/app/customer/view/index/add.html @@ -45,9 +45,12 @@ 归属员工* - - - +
+ +
+
部门:{$userinfo.department}
+ + 归属部门 @@ -82,20 +85,25 @@ 联系电话* - + + 性别* + + + + + + 微 信 号 - - QQ号码 电子邮箱 - + @@ -137,7 +145,7 @@ $('[name="belong_uid"]').val(ids); $('[name="belong_name"]').val(names); $('[name="belong_did"]').val(dids); - $('[name="belong_department"]').val(departments); + $('#department_name').html(departments); } }); }); @@ -147,9 +155,13 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - parent.layui.tool.close(1000); + tool.sideClose(1000); } } + if(!data.field.c_sex){ + layer.msg('请选择首要联系的性别'); + return false; + } tool.post("/customer/index/add", data.field, callback); return false; }); diff --git a/app/customer/view/index/edit.html b/app/customer/view/index/edit.html index 252fb57..a8b4bfa 100644 --- a/app/customer/view/index/edit.html +++ b/app/customer/view/index/edit.html @@ -68,16 +68,15 @@ 归属员工* - - +
+ +
+
部门:{$detail.belong_department}
+ - - 归属部门 - - 共享员工 - + @@ -132,7 +131,7 @@ $('[name="belong_uid"]').val(ids); $('[name="belong_name"]').val(names); $('[name="belong_did"]').val(dids); - $('[name="belong_department"]').val(departments); + $('#department_name').html(departments); } }); }); @@ -142,7 +141,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - parent.layui.tool.close(1000); + tool.sideClose(1000); } } tool.post("/customer/index/add", data.field, callback);