Bläddra i källkod

高教修改的时候如果是不能提交状态加上提示

sugangqiang 1 år sedan
förälder
incheckning
8b1a05ed33
1 ändrade filer med 76 tillägg och 0 borttagningar
  1. 76 0
      public/static/modular/gate/talentInfo/talentInfo_gj_select.js

+ 76 - 0
public/static/modular/gate/talentInfo/talentInfo_gj_select.js

@@ -185,6 +185,82 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
     ]
 };
 
+/**
+ * 校验是否可以修改/提交审核
+ */
+TalentInfoInfoDlg.validateIsEdit = function () {
+    var checkState = $("#checkState").val();
+    if (checkState != 0 && checkState != 8) {
+        if (checkState == 16 || checkState == -1 || checkState == -2 || checkState == 7) {
+            Feng.error("您的申报审核不通过,无法再修改");
+            return false;
+        } else if (checkState == 28) {
+            Feng.error("申报已完成");
+            return false;
+        } else if (checkState == 14) {
+            Feng.error("您的申报已审核通过,无法再修改");
+            return false;
+        } else if (checkState == 22 || checkState == 25 || checkState == 27) {
+            Feng.error("该申报已终止");
+            return false;
+        } else {
+            Feng.error("您的申报正在审核中,请耐心等待");
+            return false;
+        }
+    }
+    return true;
+}
+
+/**
+ * 提交添加
+ */
+TalentInfoInfoDlg.addSubmit = function () {
+    var id = $('#id').val();
+    if (id != null && id != '') {
+        if (!TalentInfoInfoDlg.validateIsEdit())
+            return;
+    }
+    $("select").each(function () {
+        $(this).removeAttr("disabled");
+    });
+    if (locked) {
+        return;
+    }
+    locked = true;
+    $("#talentInfoForm")[0].submit();
+
+}
+
+/**
+ * 提交审核
+ */
+TalentInfoInfoDlg.submitToCheck = function () {
+    var id = $("#id").val();
+    if (id == null || id == "") {
+        Feng.info("请先填写基础信息并上传附件");
+        return;
+    }
+    if (!TalentInfoInfoDlg.validateIsEdit())
+        return;
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/submitToCheck", function (data) {
+            if (data.code == 200) {
+                Feng.success(data.msg);
+                // $("#checkState").val(data.obj);
+                window.parent.TalentInfo.table.refresh();
+                TalentInfoInfoDlg.close();
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("提交审核失败!" + data.responseJSON.message + "!");
+        });
+        ajax.set("id", id);
+        ajax.start();
+    }
+    Feng.confirm("请确认基础信息已核对无误,相应附件已上传,一旦提交,无法修改", operation);
+}
+
 TalentInfoInfoDlg.downloadFile = function (id,type){
     window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type="+type;
 }