From 11945837730110ebb05327dd4052ab388abdb497 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 16 八月 2023 09:37:02 +0800
Subject: [PATCH] 入职申请单:民族根据输入值进行推荐

---
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user  |    8 ++--
 WebTM/views/人事管理/入职申请/HR_EmpEngageRequestBill.html |   83 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 4 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 90f2235..7130507 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -18,10 +18,10 @@
       <publishTime>01/28/2016 14:22:24</publishTime>
     </File>
     <File Include="bin/WebTM.dll">
-      <publishTime>08/14/2023 10:13:49</publishTime>
+      <publishTime>08/16/2023 08:20:14</publishTime>
     </File>
     <File Include="bin/WebTM.pdb">
-      <publishTime>08/14/2023 10:13:49</publishTime>
+      <publishTime>08/16/2023 08:20:14</publishTime>
     </File>
     <File Include="HtmlPage1.html">
       <publishTime>04/11/2023 16:34:42</publishTime>
@@ -1734,7 +1734,7 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/浜轰簨绠$悊/鍏ヨ亴鐢宠/HR_EmpEngageRequestBill.html">
-      <publishTime>07/25/2023 15:30:37</publishTime>
+      <publishTime>08/16/2023 09:35:01</publishTime>
     </File>
     <File Include="views/浜轰簨绠$悊/鍏ヨ亴鐢宠/HR_EmpEngageRequestBillList.html">
       <publishTime>07/21/2023 08:25:45</publishTime>
@@ -4704,7 +4704,7 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>08/14/2023 10:13:56</publishTime>
+      <publishTime>08/16/2023 08:20:25</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git "a/WebTM/views/\344\272\272\344\272\213\347\256\241\347\220\206/\345\205\245\350\201\214\347\224\263\350\257\267/HR_EmpEngageRequestBill.html" "b/WebTM/views/\344\272\272\344\272\213\347\256\241\347\220\206/\345\205\245\350\201\214\347\224\263\350\257\267/HR_EmpEngageRequestBill.html"
index 8276c7a..e489644 100644
--- "a/WebTM/views/\344\272\272\344\272\213\347\256\241\347\220\206/\345\205\245\350\201\214\347\224\263\350\257\267/HR_EmpEngageRequestBill.html"
+++ "b/WebTM/views/\344\272\272\344\272\213\347\256\241\347\220\206/\345\205\245\350\201\214\347\224\263\350\257\267/HR_EmpEngageRequestBill.html"
@@ -45,6 +45,29 @@
             width: 25%;
         }
     </style>
+    <style>
+        .search-res {
+            position: absolute;
+            top: 100%;
+            left: 0;
+            width: 175px;
+            border: 1px solid #b6b6b6;
+            border-top: none;
+            background-color:white;
+            z-index:5;
+        }
+
+            .search-res li {
+                list-style-type: none;
+                line-height: 20px;
+                padding: 2px 5px;
+            }
+
+        .ac {
+            display: none;
+        }
+    </style>
+
 
 </head>
 <body>
@@ -140,6 +163,7 @@
                                             <label class="layui-form-label" style="width: 85px;">姘�  鏃�</label>
                                             <div class="layui-input-block" style="margin-left: 120px; width: 180px;">
                                                 <input type="text" class="layui-input" lay-verify="HNation" name="HNation" id="HNation">
+                                                <ul class="search-res ac" id="HNationDisplay"></ul>
                                             </div>
                                         </div>
                                         <div class="layui-inline" style="width:500px;">
@@ -600,6 +624,24 @@
                     }
                 });
                 //#endregion
+
+                //#region 鍒濆姘戞棌鏂囨湰妗嗙洃鍚�
+                //姘戞棌鏂囨湰妗嗙劍鐐硅幏鍙栫洃鍚�
+                $("#HNation").on('input focus', function (data) {
+                    ul = document.getElementById("HNationDisplay");
+                    ul.classList.remove('ac');
+                });
+                //姘戞棌鏂囨湰妗嗙劍鐐瑰け鐒︾洃鍚�
+                $("#HNation").on('input blur', function (data) {
+                    ul = document.getElementById("HNationDisplay");
+                    //ul.classList.add('ac');
+                });
+                //姘戞棌鏂囨湰妗嗗�肩洃鍚�
+                $("#HNation").on('input proprytychange', function (data) {
+                    var value = data.currentTarget.value;
+                    recommendHNationByInput(value);
+                });
+                //#endregion
             });
             //#endregion 
 
@@ -867,6 +909,47 @@
                 return true;
             }
             //#endregion
+
+            //#region 姘戞棌鏂囨湰妗嗗�肩洃鍚簨浠�--鏍规嵁杈撳叆鎺ㄨ崘
+            function recommendHNationByInput(value) {
+                var nationList = [
+                    "姹夋棌", "澹棌", "婊℃棌", "鍥炴棌", "鑻楁棌", "缁村惥灏旀棌", "鍦熷鏃�", "褰濇棌", "钂欏彜鏃�", "钘忔棌", "甯冧緷鏃�", "渚楁棌", "鐟舵棌", "鐧芥棌", "鏈濋矞鏃�", "鍝堝凹鏃�"
+                    , "鍝堣惃鍏嬫棌", "榛庢棌", "鍌f棌", "鐣叉棌", "鍌堝兂鏃�", "浠′浆鏃�", "涓滀埂鏃�", "楂樺北鏃�", "鎷夌鏃�", "姘存棌", "浣ゆ棌", "绾宠タ鏃�", "缇屾棌", "鍦熸棌", "浠浆鏃�"
+                    , "閿′集鏃�", "鏌皵鍏嬪瓬鏃�", "杈炬枴灏旀棌", "鏅鏃�", "姣涘崡鏃�", "鎾掓媺鏃�", "甯冩湕鏃�", "濉斿悏鍏嬫棌", "闃挎槍鏃�", "鏅背鏃�", "閯傛俯鍏嬫棌", "鎬掓棌", "浜棌"
+                    , "鍩鸿鏃�", "寰锋槀鏃�", "淇濆畨鏃�", "淇勭綏鏂棌", "瑁曞浐鏃�", "涔屽瓬鍒厠鏃�", "闂ㄥ反鏃�", "閯備鸡鏄ユ棌", "鐙緳鏃�", "濉斿灏旀棌", "璧摬鏃�", "鐝炲反鏃�"
+                ];
+                //鑾峰彇鎺ㄨ崘鏁版嵁
+                var result = [];
+                for (var i = 0; i < nationList.length; i++) {
+                    if (nationList[i].indexOf(value) != -1 && value!= "") {
+                        result.push(nationList[i]);
+                    }
+                }
+                //鎷兼帴鐣岄潰鎺ㄨ崘鏄剧ずul
+                var Organization = "";
+                for (var i = 0; i < result.length; i++) {
+                    Organization += "<li>" + result[i] + "</li>";
+                }
+                $("#HNationDisplay").empty();
+                $("#HNationDisplay").append(Organization);
+
+                //姘戞棌鎺ㄨ崘鍒楄〃鐐瑰嚮鐩戝惉
+                var list = document.getElementById('HNationDisplay');
+                var items = list.getElementsByTagName('li');
+                for (var i = 0; i < items.length; i++) {
+                    items[i].addEventListener('click', setNationValueByClick);
+                }
+                return result;
+            }
+            //#endregion 
+
+            //#region 姘戞棌鏂囨湰妗嗙偣鍑荤洃鍚簨浠�--鐐瑰嚮鍚庤祴鍊�
+            function setNationValueByClick(event) {
+                var HNation = event.currentTarget.innerText;
+                $("#HNation").val(HNation);
+                ul.classList.add('ac');
+            }
+            //#endregion
             //#endregion
             //#endregion
 

--
Gitblit v1.9.1