Explorar o código

Merge branch 'dev_zxc' into test

zhangxc %!s(int64=5) %!d(string=hai) anos
pai
achega
809d290b87
Modificáronse 1 ficheiros con 11 adicións e 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 = ``