Browse Source

Merge branch 'version1.3.6.3' into test

luolei 5 years ago
parent
commit
1f278fc110
2 changed files with 47 additions and 32 deletions
  1. 1 1
      src/css/qcListCopy.less
  2. 46 31
      src/js/qcListCopy.js

+ 1 - 1
src/css/qcListCopy.less

@@ -38,7 +38,7 @@ h2{
         padding: 0 10px;
         height:32px;
         border-radius:4px;
-        border: 1px solid #E2E5EF;
+        border: 1px solid #8d8e92;
         box-sizing: border-box;
         cursor: default;
     }

+ 46 - 31
src/js/qcListCopy.js

@@ -30,11 +30,13 @@ let startDateParam = getUrlArgObjectNew("startDateParam",srcUrl)||""
 let endDateParam = getUrlArgObjectNew("endDateParam",srcUrl)||""
 let from = getUrlArgObjectNew("from",srcUrl)||""
 let defectName = getUrlArgObjectNew("defectName",srcUrl)||"";
+let casesId = getUrlArgObjectNew("casesEntryId",srcUrl)||"";
+let isSingleReject = getUrlArgObjectNew("isSingleReject",srcUrl)||""
 
 $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,
-  nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
+  nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", deptName="", deptNameTemp="",doctorNum="",doctorNameTemp="",doctorNumTemp="",
   data_desc=["leave_hospital_date"],data_asc=[];
 if(chengdu){
     levelTemp = chengdu
@@ -53,8 +55,8 @@ if(docName){
     $('.doctorInp').val(docName)
 }
 if(deptIdPram&&deptNamePram){
-    deptIdTemp = deptIdPram
-    deptId = deptIdPram
+    deptIdTemp = deptIdPram = deptIdPram
+    deptName = deptNameTemp = deptNamePram
     if(deptNamePram.length > 10){
         $('.selectDept').html(deptNamePram.substring(0,8)+'...')
     }else{
@@ -65,6 +67,7 @@ if(deptIdPram&&deptNamePram){
     $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 }
 if(from==2){
+    $(".export").css('display','none')
     $(".partTitle .titlePic ").html(`<a class="consoleD" href="deptConsole.html">控制台(科室) / </a><a class="consoleP" href="singleVeto.html?from=1">条目缺陷占比 / </a>缺陷详情`)
 }else if(from==3){
   $(".partTitle .titlePic ").html(`<a href="keyItemFlawControl.html">关键条目缺陷占比 / </a>缺陷详情`)
@@ -101,24 +104,25 @@ $("#filterToggler").click(function(){
     return false;
 }
 function getTabData(activePage){
-    // const param = {
-    //     current:activePage,
-    //     behospitalCode: behospitalCode,
-    //     name: name, //条目名
-    //     level:level,//病历等级
-    //     deptId: deptId,
-    //     asc:data_asc,     //升序
-    //     desc:data_desc,       //降序
-    //     doctorName: doctorName,
-    //     doctorCode: doctorNum,
-    //     leaveHosDateStart: behosDateStart, //出院日期--开始时间
-    //     leaveHosDateEnd: behosDateEnd, //出院日期--结束时间
-    //     size: 15,
-    //     statisticsType:statisticsType
-    // }
-    const param = {"current":1,"behospitalCode":"","patName":"","level":"","behDeptName":"","ascs":[],"descs":["leaveHospitalDate"],"startDate":"2020-01-01 00:00:00","endDate":"2020-07-01 23:59:59","casesEntryName":"整份病历无主治医师查房记录","casesEntryId":"","size":15,"isReject":"0"}
-
-    return post(from==2?api.qcResultDefectListDept:api.qcResultDefectList,param).then(res =>{
+    const param = {
+        current:activePage,
+        behospitalCode: behospitalCode,
+        patName: name, //病人姓名
+        level:level,//病历等级
+        behDeptName: deptName,
+        ascs:data_asc,     //升序
+        descs:data_desc,       //降序
+        startDate: behosDateStart, //出院日期--开始时间
+        endDate: behosDateEnd, //出院日期--结束时间
+        casesEntryName: casesEntryName,
+        casesEntryId:casesId,
+        size: 15,
+        isReject: isSingleReject,
+        doctorName: doctorName,
+        doctorId: doctorNum,
+    }
+
+    return post(from==2?api.qcResultShortByDeptPage:api.qcResultDefectList,param).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data;
             tabList = data.records;
@@ -161,6 +165,7 @@ $(".filter").on("click", function(e){
     behospitalCode = behospitalCodeTemp
     level = levelTemp==="全部"?"":levelTemp
     deptId = deptIdTemp
+    deptName = deptNameTemp
     doctorName = doctorNameTemp
     doctorNum = doctorNumTemp
     getTabData(1)
@@ -175,6 +180,8 @@ $(".abnormalClear").on("click", function(e){
     behospitalCodeTemp=""; 
     levelTemp="";  
     deptId=""; 
+    deptName=""; 
+    deptNameTemp=""; 
     deptIdTemp="";  
     doctorName=""; 
     doctorNum=""; 
@@ -457,6 +464,7 @@ function bindDeptSelect(){
         const deptItemName = $(this).attr("data-name")
         const deptItemId = $(this).attr("data-id")
         deptIdTemp =deptItemId
+        deptNameTemp = deptItemName
         if(deptItemName.length > 10){
             $('.selectDept').html(deptItemName.substring(0,8)+'...')
         }else{
@@ -875,19 +883,26 @@ $(document).on("click", function(){
 })
 $(function($){
     $('.export').click(function(){
-        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > 7){
-            $.alerModal({"message":"最多只能导出7天",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        const start = new Date(behosDateStart).getTime()
+        const end = new Date(behosDateEnd).getTime()
+        if(start > end){
+            $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
             return
         }
         const param = {
-            "behospitalCode": behospitalCode,
-            "deptId": deptId,
-            "doctorCode":doctorNum,
-            "doctorName": doctorName,
-            "leaveHosDateEnd": behosDateEnd,
-            "leaveHosDateStart": behosDateStart,
-            "level": level,
-            "name": name
+            behospitalCode: behospitalCode,
+            patName: name, //病人姓名
+            level:level,//病历等级
+            behDeptName: deptName,
+            // ascs:data_asc,     //升序
+            // descs:data_desc,       //降序
+            startDate: behosDateStart, //出院日期--开始时间
+            endDate: behosDateEnd, //出院日期--结束时间
+            casesEntryName: casesEntryName,
+            casesEntryId:casesId,
+            isReject: isSingleReject,
+            doctorName: doctorName,
+            doctorId: doctorNum,
         }
         expJson(api.qcResultShortPageExport,param).then(res =>{
             downloadExportedData(res.data, $(".partTitle").text()+".xls")