瀏覽代碼

添加时间限制

luolei 4 年之前
父節點
當前提交
19d81ab671
共有 8 個文件被更改,包括 224 次插入51 次删除
  1. 0 1
      src/js/modal.js
  2. 1 2
      src/js/qcList.js
  3. 40 9
      src/js/qcListCopy.js
  4. 39 9
      src/js/qcListCopyUnqualified.js
  5. 32 6
      src/js/qcListDept.js
  6. 34 9
      src/js/qcListDocteam.js
  7. 31 6
      src/js/qcListOutHospital.js
  8. 47 9
      src/js/uccDetail.js

+ 0 - 1
src/js/modal.js

@@ -79,7 +79,6 @@ const jQuery = require('jquery');
             left:$(".modaltip").width()/2+'px',
             top:$(".modaltip").height()/2+'px'
         })
-        console.log(ops)
         if(ops.isFather){
             //console.log('bbbbbbb')
            ops.fatherWrapper.append(box)

+ 1 - 2
src/js/qcList.js

@@ -942,7 +942,6 @@ function bindColOrder(){
         }else{
             const downItem =  pageSetCopy[index]
             const downItemBack =  pageSetCopy[index + 1]
-            console.log('downItem',downItem,'downItemBack',downItemBack)
             pageSetCopy.splice(index,2,downItemBack,downItem)
             scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
             renderColSet(pageSetCopy)
@@ -1139,7 +1138,7 @@ $(document).on("click", function(){
 })
 
 
-        
+
 let radioCheck = 1;
 $((function($){
     $('.export').click(function(){

+ 40 - 9
src/js/qcListCopy.js

@@ -1084,7 +1084,6 @@ function bindColOrder(){
         }else{
             const downItem =  pageSetCopy[index]
             const downItemBack =  pageSetCopy[index + 1]
-            console.log('downItem',downItem,'downItemBack',downItemBack)
             pageSetCopy.splice(index,2,downItemBack,downItem)
             scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
             renderColSet(pageSetCopy)
@@ -1286,10 +1285,6 @@ $(function($){
             $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
-        if((behosDateEndTime - behosDateStartTime)/24/60/60/1000 > exportTime){
-            $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-            return
-        }
         // 判断是否是 住院超过31日病人数   
         let beHosGT31Days = null
         if (fromDays && fromDays === "1") {
@@ -1338,11 +1333,47 @@ $(function($){
         if (from == 6) {
             param = { ...param, improveType }
         }
+        
+        if(exportTime==90){
+            if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > exportTime){
+                $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return
+            }else{
+                expJson(exportURL,param).then(res =>{
+                    downloadExportedData(res.data, $(".partTitle").text()+".xls")
+                })
+            }
+        }else{
+            $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            closeRadio()
+            radioSelect()
+            bindSaveColPort(param)
+        }
+    })
+});
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
         expJson(exportURL,param).then(res =>{
+            $(".divModal",parent.document).html("")
             downloadExportedData(res.data, $(".partTitle").text()+".xls")
         })
-        // expJson(api.qcResultShortPageExport,param).then(res =>{
-        //     downloadExportedData(res.data, $(".partTitle").text()+".xls")
-        // })
     })
-});
+}

+ 39 - 9
src/js/qcListCopyUnqualified.js

@@ -1012,7 +1012,6 @@ function bindColOrder(){
         }else{
             const downItem =  pageSetCopy[index]
             const downItemBack =  pageSetCopy[index + 1]
-            console.log('downItem',downItem,'downItemBack',downItemBack)
             pageSetCopy.splice(index,2,downItemBack,downItem)
             scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
             renderColSet(pageSetCopy)
@@ -1214,10 +1213,6 @@ $(function($){
             $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
-        if((behosDateEndTime - behosDateStartTime)/24/60/60/1000 > exportTime){
-            $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-            return
-        }
         // 判断是否是 住院超过31日病人数   
         let beHosGT31Days = null
         if (fromDays && fromDays === "1") {
@@ -1267,11 +1262,46 @@ $(function($){
         if (from == 6) {
             param = { ...param, improveType }
         }
+        if(exportTime==90){
+            if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > exportTime){
+                $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return
+            }else{
+                expJson(api.badLevelPagePageExport,param).then(res =>{
+                    downloadExportedData(res.data, $(".partTitle").text() + ".xls")
+                })
+            }
+        }else{
+            $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            closeRadio()
+            radioSelect()
+            bindSaveColPort(param)
+        }
+    })
+});
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
         expJson(api.badLevelPagePageExport,param).then(res =>{
+            $(".divModal",parent.document).html("")
             downloadExportedData(res.data, $(".partTitle").text() + ".xls")
         })
-        // expJson(api.qcResultShortPageExport,param).then(res =>{
-        //     downloadExportedData(res.data, $(".partTitle").text()+".xls")
-        // })
     })
-});
+}

+ 32 - 6
src/js/qcListDept.js

@@ -1128,6 +1128,9 @@ $(document).on("click", function(){
     $(".qcSelectCheck .arrow").attr("src",iconDown)
 })
 
+
+
+let radioCheck = 1;
 $((function($){
     $('.export').click(function(){
         const behosDateStartTime = new Date(behosDateStart).getTime()
@@ -1136,10 +1139,6 @@ $((function($){
             $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
-        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > exportTimeLimit.normalTime){
-            $.alerModal({"message":`最多只能导出${exportTimeLimit.normalTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-            return
-        }
         const param = {
             "behospitalCode": behospitalCode,
             "deptId": deptId.trim(),
@@ -1164,9 +1163,36 @@ $((function($){
             "mrTimeStart": fpCheckDateStart.replace(/\//g,'-'), //首页核查起始时间
             "mrTimeEnd": fpCheckDateEnd.replace(/\//g,'-'), //首页核查截止时间
         }
+        $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        closeRadio()
+        radioSelect()
+        bindSaveColPort(param)
+      
+    })
+})($));
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
         expJson(api.exportQcListDept,param).then(res =>{
+            $(".divModal",parent.document).html("")
             downloadExportedData(res.data, behosDateStart.slice(0,10).replace(/-/g,"")+"-"+behosDateEnd.slice(0,10).replace(/-/g,"")+"抽查住院病历质量情况.xls")
         })
-      
     })
-})($));
+}

+ 34 - 9
src/js/qcListDocteam.js

@@ -1044,6 +1044,9 @@ $(document).on("click", function(){
     $(".qcSelectCheck .arrow").attr("src",iconDown)
 
 })
+
+
+let radioCheck = 1;
 $((function($){
   $('.export').click(function(){
     const behosDateStartTime = new Date(behosDateStart).getTime()
@@ -1052,10 +1055,6 @@ $((function($){
         $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
         return
     }
-    if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > exportTimeLimit.normalTime){
-      $.alerModal({"message":`最多只能导出${exportTimeLimit.normalTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-      return
-    }
     const param = {
       "behospitalCode": behospitalCode,
       "deptId": deptId,
@@ -1080,9 +1079,35 @@ $((function($){
       "mrTimeStart": fpCheckDateStart.replace(/\//g,'-'), //首页核查起始时间
       "mrTimeEnd": fpCheckDateEnd.replace(/\//g,'-'), //首页核查截止时间
     }
-    expJson(api.exportQcDocteam,param).then(res =>{
-      downloadExportedData(res.data, behosDateStart.slice(0,10).replace(/-/g,"")+"-"+behosDateEnd.slice(0,10).replace(/-/g,"")+"抽查住院病历质量情况.xls")
-    })
-
+    $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+    closeRadio()
+    radioSelect()
+    bindSaveColPort(param)
   })
-})($));
+})($));
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
+        expJson(api.exportQcDocteam,param).then(res =>{
+            $(".divModal",parent.document).html("")
+            downloadExportedData(res.data, behosDateStart.slice(0,10).replace(/-/g,"")+"-"+behosDateEnd.slice(0,10).replace(/-/g,"")+"抽查住院病历质量情况.xls")
+        })
+    })
+}

+ 31 - 6
src/js/qcListOutHospital.js

@@ -1057,7 +1057,6 @@ function bindColOrder(){
         }else{
             const downItem =  pageSetCopy[index]
             const downItemBack =  pageSetCopy[index + 1]
-            console.log('downItem',downItem,'downItemBack',downItemBack)
             pageSetCopy.splice(index,2,downItemBack,downItem)
             scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
             renderColSet(pageSetCopy)
@@ -1253,6 +1252,9 @@ $(document).on("click", function(){
     $(".fpSelectCheck .arrow").attr("src",iconDown)
     $(".qcSelectCheck .arrow").attr("src",iconDown)
 })
+
+
+let radioCheck = 1;
 $(function($){
     $('.export').click(function(){
         const start = new Date(behosDateStart).getTime()
@@ -1261,10 +1263,6 @@ $(function($){
             $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
-        if((end - start)/24/60/60/1000 > exportTimeLimit.normalTime){
-            $.alerModal({"message":`最多只能导出${exportTimeLimit.normalTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-            return
-        }
         const param = {
             behospitalCode: behospitalCode,
             patName: name, //病人姓名
@@ -1289,8 +1287,35 @@ $(function($){
             mrTimeEnd: fpCheckDateEnd.replace(/\//g,'-'), //首页核查截止时间
             leaveHosType: leaveHosType  == "全部" ? "":leaveHosType, //出院人数类型
         }
+        $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        closeRadio()
+        radioSelect()
+        bindSaveColPort(param)
+    })
+});
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
         expJson(api.leaveHosMrPageExport,param).then(res =>{
+            $(".divModal",parent.document).html("")
             downloadExportedData(res.data, $(".partTitle").text()+".xls")
         })
     })
-});
+}

+ 47 - 9
src/js/uccDetail.js

@@ -1005,7 +1005,6 @@ function bindColOrder(){
         }else{
             const downItem =  pageSetCopy[index]
             const downItemBack =  pageSetCopy[index + 1]
-            console.log('downItem',downItem,'downItemBack',downItemBack)
             pageSetCopy.splice(index,2,downItemBack,downItem)
             scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
             renderColSet(pageSetCopy)
@@ -1200,6 +1199,11 @@ $(document).on("click", function(){
     $(".fpSelectCheck .arrow").attr("src",iconDown)
     $(".qcSelectCheck .arrow").attr("src",iconDown)
 })
+
+
+
+
+let radioCheck = 1;
 $(function($){
     $('.export').click(function(){
         const start = new Date(behosDateStart).getTime()
@@ -1209,10 +1213,6 @@ $(function($){
             $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
-        if((end - start)/24/60/60/1000 > exportTime){
-            $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
-            return
-        }
         let param = {
             behospitalCode: behospitalCode,            
             patName: name, //病人姓名
@@ -1244,11 +1244,49 @@ $(function($){
         if (isInspection) {
             param = { ...param, casesEntryName: ''}
         }
-        // expJson(api.unModifyMRPageExport,param).then(res =>{
-        //     downloadExportedData(res.data, $(".partTitle").text()+".xls")
-        // })
+        if(exportTime==90){
+            if((end - start)/24/60/60/1000 > exportTime){
+                $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return
+            }else{
+                expJson(!isInspection ? api.unModifyMRPageExport : api.medicalCheckInnerExport , param).then(res => {
+                    downloadExportedData(res.data, $(".partTitle").text() + ".xls")
+                })
+            }
+        }else{
+            $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            closeRadio()
+            radioSelect()
+            bindSaveColPort(param)
+        }
+    })
+});
+function closeRadio(){
+    $(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document ).off("click").on("click",function(){
+        $(".divModal",parent.document).html("")
+    })
+}
+function radioSelect(){
+    $(".selectDate", parent.document).click(function(){
+        $(this).find("input").prop("checked",true)
+        $(this).siblings().find("input").prop("checked",false)
+    })
+}
+function bindSaveColPort(param){
+    $(".savePort", parent.document ).off("click").on("click", function(){
+        radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
+        let time = radioCheck==2?exportTimeLimit.defectTime:exportTimeLimit.normalTime
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > time){
+            $.alerModal({"message":`最多只能导出${time}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        param.radioCheck = radioCheck||1
+        if (isInspection) {
+            param = { ...param, casesEntryName: ''}
+        }
         expJson(!isInspection ? api.unModifyMRPageExport : api.medicalCheckInnerExport , param).then(res => {
+            $(".divModal",parent.document).html("")
             downloadExportedData(res.data, $(".partTitle").text() + ".xls")
         })
     })
-});
+}