luolei 5 年之前
父节点
当前提交
6eb4e0e440
共有 4 个文件被更改,包括 61 次插入28 次删除
  1. 6 13
      src/html/dayDetail.html
  2. 3 3
      src/html/payDetail.html
  3. 26 8
      src/js/dayDetail.js
  4. 26 4
      src/js/payDetail.js

+ 6 - 13
src/html/dayDetail.html

@@ -28,7 +28,7 @@
                     <span>科室名称:</span>
                     <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入科室名称">
                 </span>
-                <span class="filterItem typeFilter deptListWrap">
+                <!-- <span class="filterItem typeFilter deptListWrap">
                     <span>时间类型:</span>
                     <span class="selectDept" data-id="1">本月平均住院天数</span>
                     <ul class="deptList filterDropList">
@@ -36,28 +36,21 @@
                         <li class="deptItem ellipsis" title="上月平均住院天数" data-id="2" data-name="上月平均住院天数">上月平均住院天数</li>
                         <li class="deptItem ellipsis" title="去年本月平均住院天数" data-id="3" data-name="去年本月平均住院天数">去年本月平均住院天数</li>
                     </ul>
-                </span>
-                <span class="filterItem dayFilter">
+                </span> -->
+                <!-- <span class="filterItem dayFilter">
                     <span>时间类型:</span>
                     <span class="selectLevel" data-id="1">本年平均住院天数</span>
                     <ul class="levelList filterDropList">
                         <Li class="levelItem" data-name="本年平均住院天数" data-status="1" data-id="1">本年平均住院天数</Li>
                         <Li class="levelItem" data-name="去年平均住院天数" data-status="2" data-id="2">去年平均住院天数</Li>
                     </ul>
-                </span>
+                </span> -->
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>
             <div>
-                <table>
-                    <thead>
-                    <th class="moduleName" style="width: 65px;">序号</th>
-                    <th class="beHospitalId textCenter">科室名称</th>
-                    <th class="patientNo textCenter" >平均住院天数(天)</th>
-                    </thead>
-                    <tbody>
-
-                    </tbody>
+                <table class="tableDay">
+                    
                 </table>
             </div>
             <div class="pagination"></div>

+ 3 - 3
src/html/payDetail.html

@@ -28,7 +28,7 @@
                     <span>科室名称:</span>
                     <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入科室名称">
                 </span>
-                <span class="filterItem typeFilter deptListWrap">
+                <!-- <span class="filterItem typeFilter deptListWrap">
                     <span>时间类型:</span>
                     <span class="selectDept" data-id="1">本月平均住院花费</span>
                     <ul class="deptList filterDropList">
@@ -44,12 +44,12 @@
                         <Li class="levelItem" data-name="本年平均住院花费" data-status="1" data-id="1">本年平均住院花费</Li>
                         <Li class="levelItem" data-name="去年平均住院花费" data-status="2" data-id="2">去年平均住院花费</Li>
                     </ul>
-                </span>
+                </span> -->
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>
             <div>
-                <table>
+                <table class="tableDay">
                     <thead>
                         <th class="moduleName" style="width: 65px;">序号</th>
                         <th class="beHospitalId textCenter">科室名称</th>

+ 26 - 8
src/js/dayDetail.js

@@ -50,8 +50,6 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        $(".dayDetail .deptListWrap").css("display","block")
-        $(".dayDetail .dayFilter").css("display","none")
         statisticsType = 1
         getTabData(1)
     })
@@ -63,8 +61,6 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        $(".dayDetail .deptListWrap").css("display","none")
-        $(".dayDetail .dayFilter").css("display","block")
         statisticsType = 2
         getTabData(1)
     })
@@ -87,7 +83,7 @@ function getTabData(activePage){
         size: 15,
         name: behospitalCode||"",
         type: statisticsType||2, //1-本月,2-本年
-        dateType: level||1,//(3-上月,4-去年本月,5-去年(必填))
+        dateType: "",//(3-上月,4-去年本月,5-去年(必填))
     }
     post(api.getAverageDayNumPage,param).then(res =>{
         if(res.data.code == '0'){
@@ -120,18 +116,40 @@ $(".filter").on("click", function(e){
     getTabData(1)
 })
 function renderTab(data,hisId,activePage){
-    let str = ``
+    let str = '',tmp = ''
+    
     for(let i = 0; i < data.length; i++){
         const item = data[i]
         str += `
             <tr  data-index=${i}>
                 <td  class="textCenter">${(activePage-1)*15 + i+1}</td>
                 <td>${item.name || "-"}</td>
-                <td >${item.averageValue || "-"}</td>
+                <td >${item.totleValue}</td>
+                <td >${item.lastAverageValue}</td>
+                <td style="display:${statisticsType==1?'table':'none'}">${item.lastYearAverageValue}</td>
             </tr>
         `
     }
-    $('tbody').html(str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>')
+    let sts = `
+        ${statisticsType==1?`<thead class="monType">
+            <th class="moduleName" style="width: 65px;">序号</th>
+            <th class="beHospitalId textCenter">科室名称</th>
+            <th class="patientNo textCenter" >上月平均住院天数(天)</th>
+            <th class="patientNo textCenter" >本月平均住院天数(天)</th>
+            <th class="patientNo textCenter" >去年本月平均住院天数(天)</th>
+        </thead>`:`
+        <thead class="yearType">
+            <th class="moduleName" style="width: 65px;">序号</th>
+            <th class="beHospitalId textCenter">科室名称</th>
+            <th class="patientNo textCenter" >本年平均住院天数(天)</th>
+            <th class="patientNo textCenter" >去年平均住院天数(天)</th>
+        </thead>
+        `}
+        <tbody>
+            ${str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>'}
+        </tbody>
+    `
+    $('.tableDay').html(sts)
     bindScoreDetail(hisId)
 }
 

+ 26 - 4
src/js/payDetail.js

@@ -87,7 +87,7 @@ function getTabData(activePage){
         size: 15,
         name: behospitalCode||"",
         type: statisticsType||2, //1-本月,2-本年
-        dateType: level||"",//(3-上月,4-去年本月,5-去年(必填))
+        dateType: "",//(3-上月,4-去年本月,5-去年(必填))
     }
     post(api.getAverageFeePage,param).then(res =>{
         if(res.data.code == '0'){
@@ -120,18 +120,40 @@ $(".filter").on("click", function(e){
     getTabData(1)
 })
 function renderTab(data,hisId,activePage){
-    let str = ``
+    let str = '',tmp = ''
+    
     for(let i = 0; i < data.length; i++){
         const item = data[i]
         str += `
             <tr  data-index=${i}>
                 <td  class="textCenter">${(activePage-1)*15 + i+1}</td>
                 <td>${item.name || "-"}</td>
-                <td >${item.averageValue || "-"}</td>
+                <td >${item.totleValue}</td>
+                <td >${item.lastAverageValue}</td>
+                <td style="display:${statisticsType==1?'table':'none'}">${item.lastYearAverageValue}</td>
             </tr>
         `
     }
-    $('tbody').html(str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>')
+    let sts = `
+        ${statisticsType==1?`<thead class="monType">
+            <th class="moduleName" style="width: 65px;">序号</th>
+            <th class="beHospitalId textCenter">科室名称</th>
+            <th class="patientNo textCenter" >上月平均住院天数(天)</th>
+            <th class="patientNo textCenter" >本月平均住院天数(天)</th>
+            <th class="patientNo textCenter" >去年本月平均住院天数(天)</th>
+        </thead>`:`
+        <thead class="yearType">
+            <th class="moduleName" style="width: 65px;">序号</th>
+            <th class="beHospitalId textCenter">科室名称</th>
+            <th class="patientNo textCenter" >本年平均住院天数(天)</th>
+            <th class="patientNo textCenter" >去年平均住院天数(天)</th>
+        </thead>
+        `}
+        <tbody>
+            ${str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>'}
+        </tbody>
+    `
+    $('.tableDay').html(sts)
     bindScoreDetail(hisId)
 }