Explorar el Código

Merge branch 'dev_zxc' into test

zhangxc hace 5 años
padre
commit
809d290b87
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  1. 11 1
      src/js/qcList.js

+ 11 - 1
src/js/qcList.js

@@ -67,6 +67,16 @@ getTabData(1)
 $(".filter").on("click", function(e){
     behosDateStart = $("#datepicker").val().trim()
     behosDateEnd = $("#datepicker2").val().trim()
+    const start = new Date(behosDateStart).getTime()
+    const end = new Date(behosDateEnd).getTime()
+    if(start > end){
+        removeDialog()
+        dialog('开始时间不能大于结束时间~')
+        setTimeout(function(){
+            removeDialog()
+        },2000)
+        return
+    }
     if(behosDateStart){
         behosDateStart = behosDateStart.replace(/\//g,'-') + ' 00:00:00'
     }
@@ -76,7 +86,7 @@ $(".filter").on("click", function(e){
     name = nameTemp
     behospitalCode = behospitalCodeTemp
     level = levelTemp
-    getTabData(1)
+    // getTabData(1)
 })
 function renderTab(data){
     let str = ``