Преглед на файлове

审核端考勤修改可按所选类型修改天数或者月份

sugangqiang преди 10 месеца
родител
ревизия
489005b79f

+ 0 - 9
app/admin/view/talent_allowance/info.html

@@ -616,15 +616,6 @@
                                 <button type="button" class="btn btn-success btn-sm" onclick="TalentAllowanceInfoDlg.unCheckAll('jjmonths')">反选</button>
                             </div>
                         </div>
-                        <div class="panel-heading" style="font-weight: bold">考勤天数<span style="color: red">(仅限一次性交通补贴可在此处填写考勤总天数)</span></div>
-                        <div class="panel-body">
-                            <input class="form-control" type="number" min="0" max="365" id="days" name="days">
-                        </div>
-                        <div class="panel-heading" style="font-weight: bold">证明材料<span style="color: red">(必须为pdf或图片格式)</span></div>
-                        <div class="panel-body">
-                            <input type="file" style="display: none" id="fileUrl" name="fileUrl" onchange="TalentAllowanceInfoDlg.fileChange(this)">
-                            <input class="form-control" placeholder="请上传证明材料" id="fileInput" onclick="$('#fileUrl').click()">
-                        </div>
                         <div class="panel-heading" style="font-weight: bold">备注<span style="color: red">(可不填)</span></div>
                         <div class="panel-body">
                             <textarea class="form-control" id="jjDescription" name="description"></textarea>

+ 0 - 9
app/admin/view/talent_allowance/public_check.html

@@ -624,15 +624,6 @@
                                 <button type="button" class="btn btn-success btn-sm" onclick="TalentAllowanceInfoDlg.unCheckAll('jjmonths')">反选</button>
                             </div>
                         </div>
-                        <div class="panel-heading" style="font-weight: bold">考勤天数<span style="color: red">(若已明确为一次性交通补贴可在此处填写考勤总天数)</span></div>
-                        <div class="panel-body">
-                            <input class="form-control" type="number" min="0" max="365" id="days" name="days">
-                        </div>
-                        <div class="panel-heading" style="font-weight: bold">证明材料<span style="color: red">(必须为pdf或图片格式)</span></div>
-                        <div class="panel-body">
-                            <input type="file" style="display: none" id="fileUrl" name="fileUrl">
-                            <input class="form-control" placeholder="请上传证明材料" onclick="$('#fileUrl').click()">
-                        </div>
                         <div class="panel-heading" style="font-weight: bold">备注<span style="color: red">(可不填)</span></div>
                         <div class="panel-body">
                             <textarea class="form-control" id="jjDescription" name="description"></textarea>

+ 13 - 13
public/static/modular/gate/talentAllowance/check/talentAllowanceInfo_info.js

@@ -373,19 +373,19 @@ TalentAllowanceInfoDlg.editJJAttendance = function () {
     }
     $("#attendanceMonths").val(months);
     $("#jjAttendanceForm")[0].submit();
-    // var ajax = new $ax(Feng.ctxPath + "/talentAllowanceInfo/editProject", function(data){
-    //     if(data.code==200){
-    //         Feng.success(data.msg);
-    //         $("#"+enterpriseId).bootstrapTable("refresh", {});
-    //         $("#jjAttendanceModal").modal("hide");
-    //     }else{
-    //         Feng.info(data.msg);
-    //     }
-    // },function(data){
-    //     Feng.error("提交失败!" + data.responseJSON.message + "!");
-    // });
-    // ajax.set({"id":id,"months":months,"days":days,"description":description,"process":$("#process").val()});
-    // ajax.start();
+    var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
+        if (data.code == 200) {
+            Feng.success(data.msg);
+            $("#" + enterpriseId).bootstrapTable("refresh", {});
+            $("#jjAttendanceModal").modal("hide");
+        } else {
+            Feng.info(data.msg);
+        }
+    }, function (data) {
+        Feng.error("提交失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set({"id": id, "months": months, "days": days, "description": description, "process": $("#process").val()});
+    ajax.start();
 }
 
 TalentAllowanceInfoDlg.editAttendanceProject = function () {

+ 16 - 15
public/static/modular/talentAllowance/talentAllowanceInfo_info.js

@@ -188,7 +188,8 @@ TalentAllowanceInfoDlg.showEditProjectModal = function (project, id, enterpriseI
                     $("#contractCheckModal").modal("show");
                     break;
                 case "4":
-                    if (type == 1) {
+                    var allowanceType = $("#allowanceType").val();
+                    if (allowanceType == 1) {
                         $('#jjAttendanceModal').on('show.bs.modal', function () {
                             $("#jjAttendanceForm")[0].reset();
                             $("#jjmonths input").each(function () {
@@ -372,20 +373,20 @@ TalentAllowanceInfoDlg.editJJAttendance = function () {
         return;
     }
     $("#attendanceMonths").val(months);
-    $("#jjAttendanceForm")[0].submit();
-    // var ajax = new $ax(Feng.ctxPath + "/talentAllowanceInfo/editProject", function(data){
-    //     if(data.code==200){
-    //         Feng.success(data.msg);
-    //         $("#"+enterpriseId).bootstrapTable("refresh", {});
-    //         $("#jjAttendanceModal").modal("hide");
-    //     }else{
-    //         Feng.info(data.msg);
-    //     }
-    // },function(data){
-    //     Feng.error("提交失败!" + data.responseJSON.message + "!");
-    // });
-    // ajax.set({"id":id,"months":months,"days":days,"description":description,"process":$("#process").val()});
-    // ajax.start();
+    //$("#jjAttendanceForm")[0].submit();
+    var ajax = new $ax(Feng.ctxPath + "/admin/talentAllowance/editProject", function (data) {
+        if (data.code == 200) {
+            Feng.success(data.msg);
+            $("#" + enterpriseId).bootstrapTable("refresh", {});
+            $("#jjAttendanceModal").modal("hide");
+        } else {
+            Feng.info(data.msg);
+        }
+    }, function (data) {
+        Feng.error("提交失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set({"id": id, "months": months, "days": days, "description": description, "process": $("#process").val()});
+    ajax.start();
 }
 
 TalentAllowanceInfoDlg.editAttendanceProject = function () {

+ 3 - 1
public/static/modular/talentAllowance/talentAllowanceInfo_info_supple.js

@@ -94,7 +94,9 @@ TalentAllowanceInfoDlg.initProjectColumns = function (enterpriseId) {
                         var kv = dayArr[d].split("=");
                         if (kv[0] && kv[1]) {
                             totalDays += parseInt(kv[1]);
-                            tmp.push(kv[0] + "月(" + kv[1] + "天)");
+                            if (parseInt(kv[1]) > 0) {
+                                tmp.push(kv[0] + "月(" + kv[1] + "天)");
+                            }
                         }
                     }
                     tmp.push("共计" + totalDays + "天");

+ 3 - 2
public/static/modular/talentAllowance/talentAllowanceInfo_public_check.js

@@ -221,7 +221,8 @@ TalentAllowanceInfoDlg.showEditProjectModal = function (project, id, enterpriseI
             $("#contractCheckModal").modal("show");
             break;
         case "4":
-            if (type == 2) {
+            var allowanceType = $("#allowanceType").val();
+            if (allowanceType == 2) {
                 $("#attendanceModalLabel").html("考勤");
                 $("#heading").html("请填写每月考勤天数<span style=\"color: red\">(不填写或填写0则代表无考勤记录)</span>");
                 $("#attendanceForm")[0].reset();
@@ -239,7 +240,7 @@ TalentAllowanceInfoDlg.showEditProjectModal = function (project, id, enterpriseI
                     }
                 }
                 $("#attendanceModal").modal("show");
-            } else if (type == 1) {
+            } else if (allowanceType == 1) {
                 $('#jjAttendanceModal').on('show.bs.modal', function () {
                     $("#jjmonths input").each(function () {
                         $(this).iCheck("uncheck");

+ 3 - 1
public/static/modular/talentAllowance/talentAllowanceInfo_select.js

@@ -176,7 +176,9 @@ TalentAllowanceInfoDlg.initProjectColumns = function () {
                         var kv = dayArr[d].split("=");
                         if (kv[0] && kv[1]) {
                             totalDays += parseInt(kv[1]);
-                            tmp.push(kv[0] + "月(" + kv[1] + "天)");
+                            if (parseInt(kv[1]) > 0) {
+                                tmp.push(kv[0] + "月(" + kv[1] + "天)");
+                            }
                         }
                     }
                     tmp.push("共计" + totalDays + "天");