ソースを参照

操作类型判断

1178232204@qq.com 3 年 前
コミット
3ea5fca8b1
1 ファイル変更17 行追加16 行削除
  1. 17 16
      src/js/appealUserPage.js

+ 17 - 16
src/js/appealUserPage.js

@@ -167,7 +167,7 @@ $(function () {
           mItems.parents(".list-1").addClass("slide-up");
           mItems.parents("ul").show()
           //  //显示对应内容
-         
+
           //initModuleData();
           global_activeTab = $(".sub-menu .page.active").attr("code");
           getQcCasesEntry();
@@ -380,7 +380,7 @@ $(function () {
       const i = $(".flaw-item[code=" + global_activeTab + "]").index($(this).parents(".flaw-item"));
       const code = $(this).attr("code");
       showModal('0', code, i);  //申诉
-      
+
       //审核人下拉渲染
       $("#delModal .checker-drop-box ul").html("");
       $("#flawDropTmpl").tmpl({ info: global_checkers }).appendTo("#delModal .checker-drop-box ul");
@@ -510,18 +510,20 @@ $(function () {
       const flawsList = formatFlawKeys(global_flawData);
       const info = JSON.parse(JSON.stringify(flawsList[global_activeTab])) && JSON.parse(JSON.stringify(flawsList[global_activeTab][i]))
       let defectContent
-      if (info.appealOperationType == 1) {
-        if (info.exampleStatus == 2) {
+      if (info.isDeleted == 'Y') {
+        info.appealOperationType = 3
+      } else {
+        if (info.appealOperationType == 1) {
+          if (info.exampleStatus == 2) {
+            info.appealOperationType = 0
+          } else {
+            info.appealOperationType = 1
+          }
+        } else if (info.appealOperationType == 3) {
           info.appealOperationType = 0
-        } else {
-          info.appealOperationType = 1
         }
-      } else if (info.appealOperationType == 3) {
-        info.appealOperationType = 0
-      } else if (info.isDeleted == 'Y') {
-        info.appealOperationType = 3
       }
-      if(info.pageKeyList[0]){
+      if (info.pageKeyList[0]) {
         defectContent = $("#anchor" + info.pageKeyList[0] + " p").html()
       }
       $("#delModal .title").text("申诉");
@@ -529,8 +531,8 @@ $(function () {
       $("#editTmpl").tmpl(info).appendTo("#delModal .modal-body");
       $("#flawDropTmpl").tmpl({ info: global_checkers }).appendTo("#delModal .modal-body ul");
       $("#qcInfo").off("input");
-      
-      
+
+
       //申诉说明输入验证
       const num = 500;
       $("#qcInfo").on("input", function () {
@@ -569,7 +571,6 @@ $(function () {
           $(".edit-box .warning").show();
           return;
         }
-        
         const obj = {
           appealExplain: $("#delModal #qcInfo").val(),
           appealOperationType: info.appealOperationType ? info.appealOperationType : 0,
@@ -584,7 +585,7 @@ $(function () {
           isReject: info.isReject,
           qcresultDetaiValue: info.score,
           qcresultDetailMsg: info.msg,
-          defectContent:defectContent
+          defectContent: defectContent
         };
         appealItem(obj);
       });
@@ -673,7 +674,7 @@ $(function () {
         }
         //必填验证
         if (type === '1') {     //新增已有时
-          
+
           if (!$(".flaw-drop-input").attr("code")) {
             $(".add-box .warning .red").text("请选择质控条目~");
             $(".add-box .warning").show();