luolei 5 vuotta sitten
vanhempi
commit
22d7e4c039
3 muutettua tiedostoa jossa 50 lisäystä ja 30 poistoa
  1. 22 0
      src/css/common.less
  2. 1 1
      src/css/reset.less
  3. 27 29
      src/js/qcScore.js

+ 22 - 0
src/css/common.less

@@ -0,0 +1,22 @@
+// .partDetailControl {
+//     .monthYear {
+//       border: 0 none;
+//       border-radius: 0;
+//       .mon {
+//         border: 1px solid #777;
+//         float: left;
+//         border-radius: 4px 0 0 4px;
+//         box-sizing: border-box;
+//         border-right: 0;
+//         color: #777;
+//       }
+//       .year {
+//         border-radius: 0 4px 4px 0;
+//       }
+//     }
+//   }
+
+.partTitle p a {
+    color: #8592B9;
+    opacity: 1;
+}

+ 1 - 1
src/css/reset.less

@@ -508,4 +508,4 @@ input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
     margin-top: 5px;
   }
 }
-// @import './common.less';
+@import './common.less';

+ 27 - 29
src/js/qcScore.js

@@ -381,52 +381,50 @@ function formatFlawKeys(data){
   const id=$("#subMenu [code="+global_activeTab+"]").attr("mode");
     const param = {
       'behospitalCode':global_id,
-      'entryName':name,
+      'entryName':name||"",
       'modeId':id
     };
     post(api.findQcCasesEntry,param).then(function(res){
       if(res.data.code==='0'){
         const data = res.data.data;
+        $("#flawDropTmpl").tmpl({info:data}).appendTo("#delModal .modal-body ul");
         if(name){
           global_flaws=data;
           $("#delModal .modal-body ul").html("");
-          $("#flawDropTmpl").tmpl({info:data}).appendTo("#delModal .modal-body ul");
-          addFlawEvent();
         }else{
           global_flaws=data;
+          if($("#delModal").css("display") == "block"){
+            return
+          }
           showModal('2',data);
-          addFlawEvent();
         }
       }
     });
   }
 //增加条目弹窗元素事件
-  function addFlawEvent(){
-    $(".add-box .flaw-drop-input").off("click").on("click",function(){
-      $(".add-box .drop-box").addClass("show");
-    });
-    $(".add-box .flaw-drop-input").off("blur").on("blur",function(){
-      setTimeout(function(){
-        $(".add-box .drop-box").removeClass("show");
-      },300)
-
-    });
-    $(".add-box .flaw-drop-input").off("input").on("input",function(){
-      $(this).attr("code","");
-      getQcCasesEntry($(this).val().trim());
-    });
-    $(".add-box .drop-box li").off("click").on("click",function(){
-      const n = $(this).attr("idx");
-      const flaw=global_flaws[n];
-      const {score,msg,entryName,casesEntryId}=flaw;
-      global_selectedFlaw=flaw;
-      $(".flaw-drop-input").val(entryName).attr({"code":casesEntryId,"title":entryName});
-      $("#addQcMsg").val(msg).attr("title",msg);
-      $("#addQcScore").val(score);
-      $(".add-box .warning").hide();
+  $("body").on("click",".add-box .flaw-drop-input",function(){
+    $(".add-box .drop-box").addClass("show");
+  });
+  $("body").on("blur",".add-box .flaw-drop-input",function(){
+    setTimeout(function(){
       $(".add-box .drop-box").removeClass("show");
-    });
-  }
+    },300)
+  });
+  $("body").on("input",".add-box .flaw-drop-input",function(){
+    $(this).attr("code","");
+    getQcCasesEntry($(this).val().trim());
+  });
+  $("body").on("click",".add-box .drop-box li",function(){
+    const n = $(this).attr("idx");
+    const flaw=global_flaws[n];
+    const {score,msg,entryName,casesEntryId}=flaw;
+    global_selectedFlaw=flaw;
+    $(".flaw-drop-input").val(entryName).attr({"code":casesEntryId,"title":entryName});
+    $("#addQcMsg").val(msg).attr("title",msg);
+    $("#addQcScore").val(score);
+    $(".add-box .warning").hide();
+    $(".add-box .drop-box").removeClass("show");
+  });
 
 //更新缺陷列表
   function updateFlaws(info){