Переглянути джерело

优化和调整入职登记模块代码

user5 4 роки тому
батько
коміт
3df17c8f69

+ 7 - 1
src/main/webapp/webpage/include/head.jsp

@@ -151,7 +151,13 @@
         if(value.length==15){
             pattern = /^\d{8}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}/;
         }
-        if(!pattern.test(value))return false;
+        if(value.length == 0){
+            return true;
+        }
+        if(!pattern.test(value)){
+            return false;
+        }
+
         var year='';
         var months='';
         var days='';

+ 12 - 12
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

@@ -82,8 +82,8 @@
             /*$('#bankName').editableSelect({
                 effects: 'slide'
             });
-            $('#bankName').val("${workStaffBasicInfo.bankName}");
-            cacuAge('${workStaffBasicInfo.idCard}','1');*/
+            $('#bankName').val("${workStaffBasicInfo.bankName}");*/
+            cacuAge('${workStaffBasicInfo.idCard}','1');
 
             changeTryEndTime('${workStaffBasicInfo.status}');
 
@@ -370,9 +370,9 @@
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm12">
-                        <label class="layui-form-label"><span class="require-item">*</span>身份证号码:</label>
+                        <label class="layui-form-label">身份证号码:</label>
                         <div class="layui-input-block">
-                            <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" class="form-control idCard layui-input required"/>
+                            <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" class="form-control idCard layui-input"/>
                         </div>
                     </div>
                 </div>
@@ -393,9 +393,9 @@
                             </div>
                         </div>
                         <div class="layui-item layui-col-sm12">
-                            <label class="layui-form-label"><span class="require-item">*</span>年    龄:</label>
+                            <label class="layui-form-label">年    龄:</label>
                             <div class="layui-input-block">
-                                <form:input path="age" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                                <form:input path="age" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                             </div>
                         </div>
                     </div>
@@ -419,9 +419,9 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
-                    <label class="layui-form-label"><span class="require-item">*</span>出生日期:</label>
+                    <label class="layui-form-label">出生日期:</label>
                     <div class="layui-input-block">
-                        <input id="birthday" name="birthday" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon required"
+                        <input id="birthday" name="birthday" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
                                value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
@@ -680,8 +680,8 @@
                             <th width="10%">所学专业</th>
                             <th width="12%"><span class="require-item">*</span>学    历</th>
                             <th width="8%">学    位</th>
-                            <th width="8%"><span class="require-item">*</span>学历性质</th>
-                            <th width="11%"><span class="require-item">*</span>入学日期</th>
+                            <th width="8%">学历性质</th>
+                            <th width="11%">入学日期</th>
                             <th width="11%">毕业日期</th>
                             <th width="10%">学历证书</th>
                             <th width="10%">学位证书</th>
@@ -725,7 +725,7 @@
                                     </select>
                                 </td>
                                 <td style="text-align:center;">
-                                    <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
+                                    <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                            value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                 </td>
                                 <td style="text-align:center;">
@@ -783,7 +783,7 @@
                         </select>
                     </td>
                     <td style="text-align:center;">
-                        <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
+                        <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                     </td>
                     <td style="text-align:center;">

+ 7 - 7
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp

@@ -67,9 +67,9 @@
                             </div>
                         </div>
                         <div class="layui-item layui-col-sm12">
-                            <label class="layui-form-label"><span class="require-item">*</span>身份证号码:</label>
+                            <label class="layui-form-label">身份证号码:</label>
                             <div class="layui-input-block">
-                                <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" readonly="true" class="form-control idCard layui-input required"/>
+                                <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" readonly="true" class="form-control idCard layui-input"/>
                             </div>
                         </div>
                     </div>
@@ -89,9 +89,9 @@
                                 </div>
                             </div>
                             <div class="layui-item layui-col-sm12">
-                                <label class="layui-form-label"><span class="require-item">*</span>年    龄:</label>
+                                <label class="layui-form-label">年    龄:</label>
                                 <div class="layui-input-block">
-                                    <form:input path="age" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                                    <form:input path="age" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                                 </div>
                             </div>
                         </div>
@@ -115,7 +115,7 @@
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6 lw7">
-                        <label class="layui-form-label"><span class="require-item">*</span>出生日期:</label>
+                        <label class="layui-form-label">出生日期:</label>
                         <div class="layui-input-block">
                             <input name="birthday" value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
                         </div>
@@ -348,8 +348,8 @@
                                 <th width="12%">所学专业</th>
                                 <th width="12%"><span class="require-item">*</span>学    历</th>
                                 <th width="12%">学    位</th>
-                                <th width="12%"><span class="require-item">*</span>学历性质</th>
-                                <th width="10%"><span class="require-item">*</span>入学日期</th>
+                                <th width="12%">学历性质</th>
+                                <th width="10%">入学日期</th>
                                 <th width="10%">毕业日期</th>
                                 <th width="10%">学历证书</th>
                                 <th width="10%">学位证书</th>