From 9d73589893b7260b84c017cb4807db0534e14c04 Mon Sep 17 00:00:00 2001 From: hdm Date: Sat, 19 Nov 2022 16:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A2=E6=88=B7=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=BD=92=E5=B1=9E=E5=91=98=E5=B7=A5=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=81=94=E7=B3=BB=E4=BA=BA=E6=80=A7?= =?UTF-8?q?=E5=88=AB=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/customer/controller/Index.php | 1 + app/customer/view/index/add.html | 30 +++++++++++++++++++++--------- app/customer/view/index/edit.html | 17 ++++++++--------- 3 files changed, 30 insertions(+), 18 deletions(-) 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);