Browse Source

添加日期

luolei 5 years ago
parent
commit
2cf53a6c8d

+ 1 - 1
src/css/common.less

@@ -64,7 +64,7 @@ th[code]{
         position: absolute;
         width: 15px;
         top: 10px !important;
-        right: 20px;
+        right: 10px;
     }
     .divide {
         margin: 0 10px;

+ 1 - 1
src/css/quexianDetail.less

@@ -90,7 +90,7 @@
         letter-spacing: 1px;
     }
     .main-body{
-        margin: 20px 40px;
+        // margin: 20px 40px;
         padding-bottom: 0px !important;
     }
     table{

+ 1 - 1
src/css/quexianDetailHome.less

@@ -90,7 +90,7 @@
         letter-spacing: 1px;
     }
     .main-body{
-        margin: 20px 40px;
+        // margin: 20px 40px;
         padding-bottom: 0px !important;
     }
     table{

+ 6 - 0
src/html/deptScoreDetail.html

@@ -34,6 +34,12 @@
                         
                     </ul>
                 </span>
+                <span class="filterItem typeFilter clearfix dataSelectLight">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span>
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>

+ 6 - 0
src/html/mukuai.html

@@ -37,6 +37,12 @@
                         
                     </ul>
                 </span>
+                <span class="filterItem typeFilter clearfix dataSelectLight">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span>
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>

+ 7 - 1
src/html/quexianDetail.html

@@ -22,7 +22,7 @@
           </div>
         </div>
         <div class="partTitleT"></div>
-        <div class="grayLine"></div>
+        <!-- <div class="grayLine"></div> -->
         <div class="main-body">
             <div class="filterBox">
                 <span class="filterItem typeFilter deptListWrap">
@@ -45,6 +45,12 @@
                         <li class="deptItem ellipsis" title="丙级病历" data-id="丙" data-name="丙级病历">丙级病历</li>
                     </ul>
                 </span>
+                <span class="filterItem typeFilter clearfix dataSelectLight">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span>
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>

+ 7 - 1
src/html/quexianDetailHome.html

@@ -22,7 +22,7 @@
           </div>
         </div>
         <div class="partTitleT"></div>
-        <div class="grayLine"></div>
+        <!-- <div class="grayLine"></div> -->
         <div class="main-body">
             <div class="filterBox">
                 <span class="filterItem">
@@ -31,6 +31,12 @@
                         <input class="moduleItemInp" type="text" placeholder="请输入缺陷名称">
                     </span>
                 </span>
+                <span class="filterItem typeFilter clearfix dataSelectLight">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" placeholder="请选择时间" id="datepicker2"  autocomplete="off" /></span>
+                </span>
                 <span class="filter">查询</span>
                 <span class="filterclear abnormalClear">重置</span>
             </div>

+ 31 - 16
src/js/deptScoreDetail.js

@@ -2,13 +2,11 @@ const $ = require('jquery');
 require("../css/deptScoreDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,focusMenuItem,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,focusMenuItem,emptyBox,setDatePicker,getPickerDate} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
 const iconUnCheck = require("./../images/icon_unchecked.png")
-const  iconCalenBlue= require("./../images/icon_calen_blue.png")
-const  iconCalenGrey= require("./../images/icon_calen_grey.png")
 const iconDown= require("./../images/arrow_down.png")
 const iconUp = require("./../images/arrow_up.png")
 const loadingImg = require("./../images/loading.gif")
@@ -35,6 +33,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
     }else{
         $(".monthYear .year").css({
             backgroundColor:'#00A1FF',
@@ -43,6 +42,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
     }
     if(deptId){
         $(".selectDept").html(deptId).attr({
@@ -63,6 +63,7 @@ $(".abnormalClear").click(function(){
     deptId = deptIdTemp = deptList[0].deptName
     curDeptId = deptList[0].deptId
     behospitalCode=behospitalCodeTemp = ""
+    setDatePicker($("#datepicker"),$("#datepicker2"),statisticsType||2)
     $(".patientNumInp").val("")
     $(".selectDept").html(deptId).attr({
         "data-id":deptId,
@@ -80,16 +81,6 @@ $(".partTitle a").click(function(){
     }
     $(".container",parent.document).addClass("console-cont");
 })
-$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
-$('.iconCalen').on("mouseenter", function(e){
-    $(this).attr("src", iconCalenBlue)
-})
-$('.iconCalen').on("mouseleave", function(e){
-    $(this).attr("src", iconCalenGrey)
-})
-$('.iconCalen').on("click", function(e){
-    $(this).parent().find("input").focus()
-})
 $('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
 //科室处理
 // getDeptList()
@@ -121,6 +112,7 @@ function dateChange(){
         $(".dayDetail .deptListWrap").css("display","block")
         $(".dayDetail .dayFilter").css("display","none")
         statisticsType = 1
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
         getTabData(1)
     })
     $(".monthYear .year").click(function(){
@@ -134,6 +126,7 @@ function dateChange(){
         $(".dayDetail .deptListWrap").css("display","none")
         $(".dayDetail .dayFilter").css("display","block")
         statisticsType = 2
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
         getTabData(1)
     })
 }
@@ -151,13 +144,23 @@ function dateChange(){
 }
 
 function getTabData(activePage){
+    const dateStatrt = getPickerDate($("#datepicker"),1)
+    const dateEnd = getPickerDate($("#datepicker2"),2)
+    const start = new Date(dateStatrt).getTime()
+    const end = new Date(dateEnd).getTime()
+    if(start > end){
+        $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     const param = {
         "asc": "",
         "deptName": deptId||"",
         "desc": "",
         "level": "",
         "name": behospitalCode||"",
-        "type": statisticsType||2
+        "type": statisticsType||2,
+        "startDate":dateStatrt,
+        "endDate":dateEnd
     }
     post(api.levelStatisticsByDept,param).then(res =>{
         if(res.data.code == '0'){
@@ -614,5 +617,17 @@ $(document).on("click", function(){
     $(".selectDept .arrow").attr("src",iconDown)    
 })
 
-$((function($){
-})($));
+$(function() {
+    const  iconCalenBlue= require("./../images/darkDate.png")
+    const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+    $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+    $('.iconCalen').on("mouseenter", function(e){
+        $(this).attr("src", iconCalenBlue)
+    })
+    $('.iconCalen').on("mouseleave", function(e){
+        $(this).attr("src", iconCalenGrey)
+    })
+    $('.iconCalen').on("click", function(e){
+        $(this).parent().find("input").focus()
+    })
+});

+ 0 - 1
src/js/deptScoreDetailControl.js

@@ -48,7 +48,6 @@ let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",beho
       setDatePicker($("#datepicker"),$("#datepicker2"),2)
   }
 $(".abnormalClear").click(function(){
-    // window.location.reload()
     setDatePicker($("#datepicker"),$("#datepicker2"),statisticsType||2)
     behospitalCode=behospitalCodeTemp = ""
     deptId =deptIdTemp= ""

+ 34 - 8
src/js/mukuai.js

@@ -3,7 +3,7 @@ require("../css/mukuai.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox,setDatePicker,getPickerDate} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -37,6 +37,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
     }else{
         $(".monthYear .year").css({
             backgroundColor:'#00A1FF',
@@ -45,6 +46,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
     }
     if(deptId){
         $(".selectDept").html(deptId).attr({
@@ -61,7 +63,7 @@ $(function(){
         $(".container",parent.document).addClass("console-cont");
     })
     $(".abnormalClear").click(function(){
-        // window.location.reload()
+        setDatePicker($("#datepicker"),$("#datepicker2"),isReject||2)
         deptId =deptIdTemp= deptList[0].deptName
         name = ""
         $(".patientNumInp").val("")
@@ -146,8 +148,8 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        isReject = 1
-        isRejectTemp = 1
+        isReject = isRejectTemp = 1
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
         getTabData(1)
     })
     $(".monthYear .year").click(function(){
@@ -158,19 +160,29 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        isReject = 2
-        isRejectTemp = 2
+        isReject = isRejectTemp = 2
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
         getTabData(1)
     })
 }
 //获取表格数据
 function getTabData(activePage){
+    const dateStatrt = getPickerDate($("#datepicker"),1)
+    const dateEnd = getPickerDate($("#datepicker2"),2)
+    const start = new Date(dateStatrt).getTime()
+    const end = new Date(dateEnd).getTime()
+    if(start > end){
+        $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     const param = {
         current:activePage,
         type: isReject,
         name: name, //条目名
         deptName: deptId||(deptList.length>0?deptList[0].deptName:''), //科室名
-        size: 15
+        size: 15,
+        "startDate":dateStatrt,
+        "endDate":dateEnd
     }
     post(from == 1?api.entryCountGroupByCasePage:api.entryCountGroupByCaseAndDeptPage,param).then(res =>{
         if(res.data.code == '0'){
@@ -511,4 +523,18 @@ $(document).on("click", function(){
     $(".selectUsed .arrow").attr("src",iconDown)
     $(".deptList").css("display", "none")
     $(".selectDept .arrow").attr("src",iconDown)
-})
+})
+$(function() {
+    const  iconCalenBlue= require("./../images/darkDate.png")
+    const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+    $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+    $('.iconCalen').on("mouseenter", function(e){
+        $(this).attr("src", iconCalenBlue)
+    })
+    $('.iconCalen').on("mouseleave", function(e){
+        $(this).attr("src", iconCalenGrey)
+    })
+    $('.iconCalen').on("click", function(e){
+        $(this).parent().find("input").focus()
+    })
+});

+ 34 - 5
src/js/quexianDetail.js

@@ -3,7 +3,7 @@ require("../css/quexianDetail.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox,setDatePicker,getPickerDate} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -34,6 +34,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
     }else{
         $(".monthYear .year").css({
             backgroundColor:'#00A1FF',
@@ -42,9 +43,9 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
     }
-    $(".selectDepts").html(deptName)
-    getTabData(1)//条目缺陷    
+    $(".selectDepts").html(deptName)   
     from = getUrlArgObjectNew("from",srcUrl)||""
     if(from == 1){
         $(".partTitle .titlePic ").html(`<a class="consoleD" href="deptConsole.html">控制台(科室) / </a><a class="consoleP" href="partDetail.html">病案首页合格率占比 / </a>缺陷详情`)
@@ -66,6 +67,7 @@ $(function(){
         })
     }
     $(".abnormalClear").click(function(){
+        setDatePicker($("#datepicker"),$("#datepicker2"),isReject||2)
         name =nameTemp= ""
         deptIdTemp=deptId =''
         $(".selectDept").html("全部").attr("data-id","").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
@@ -73,6 +75,7 @@ $(function(){
         getTabData(1)
     })
     getMolist()
+    getTabData(1)//条目缺陷
 })
 function getMolist(){
     post(api.getQcCases).then(res =>{
@@ -157,6 +160,14 @@ $("th[code]").on("click",function(e){
     // console.log(code)
 });
 function getTabData(activePage){
+    const dateStatrt = getPickerDate($("#datepicker"),1)
+    const dateEnd = getPickerDate($("#datepicker2"),2)
+    const start = new Date(dateStatrt).getTime()
+    const end = new Date(dateEnd).getTime()
+    if(start > end){
+        $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     const param = {
         current:activePage,
         type: isReject,
@@ -167,7 +178,9 @@ function getTabData(activePage){
         casesId:casesIds||"",
         ascs:data_asc,
         descs:data_desc,
-        size: 15
+        size: 15,
+        "startDate":dateStatrt,
+        "endDate":dateEnd
     }
     post(api.entryCountGroupByEntryAndDeptPage,param).then(res =>{
         if(res.data.code == '0'){
@@ -197,6 +210,7 @@ function dateChange(){
         })
         isReject = 1
         isRejectTemp = 1
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
         getTabData(1)
     })
     $(".monthYear .year").click(function(){
@@ -209,6 +223,7 @@ function dateChange(){
         })
         isReject = 2
         isRejectTemp = 2
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
         getTabData(1)
     })
 }
@@ -542,4 +557,18 @@ $(document).on("click", function(){
     $(".selectReject .arrow").attr("src",iconDown)
     $(".selectUsed .arrow").attr("src",iconDown)
     $(".deptList").css("display", "none")
-})
+})
+$(function() {
+    const  iconCalenBlue= require("./../images/darkDate.png")
+    const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+    $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+    $('.iconCalen').on("mouseenter", function(e){
+        $(this).attr("src", iconCalenBlue)
+    })
+    $('.iconCalen').on("mouseleave", function(e){
+        $(this).attr("src", iconCalenGrey)
+    })
+    $('.iconCalen').on("click", function(e){
+        $(this).parent().find("input").focus()
+    })
+});

+ 38 - 9
src/js/quexianDetailHome.js

@@ -3,7 +3,9 @@ require("../css/quexianDetailHome.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox,setDatePicker,getPickerDate} = require('./utils.js')
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./../resource/jquery-ui/jquery-ui.min.css');
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -35,6 +37,7 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
     }else{
         $(".monthYear .year").css({
             backgroundColor:'#00A1FF',
@@ -43,8 +46,8 @@ $(function(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-    }
-    getTabData(1)//条目缺陷    
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
+    }   
     from = getUrlArgObjectNew("from",srcUrl)||""
     if(from == 1){
         $(".partTitle .titlePic ").html(`<a class="consoleD" href="deptConsole.html">控制台(科室) / </a><a class="consoleP" href="partDetail.html">病案首页合格率占比 / </a>缺陷详情`)
@@ -66,10 +69,12 @@ $(function(){
         })
     }
     $(".abnormalClear").click(function(){
+        setDatePicker($("#datepicker"),$("#datepicker2"),isReject||2)
         name = ""
         $(".patientNumInp").val("")
         getTabData(1)
     })
+    getTabData(1)//条目缺陷 
     // getMolist()
 })
 function getMolist(){
@@ -155,6 +160,14 @@ $("th[code]").on("click",function(e){
     // console.log(code)
 });
 function getTabData(activePage){
+    const dateStatrt = getPickerDate($("#datepicker"),1)
+    const dateEnd = getPickerDate($("#datepicker2"),2)
+    const start = new Date(dateStatrt).getTime()
+    const end = new Date(dateEnd).getTime()
+    if(start > end){
+        $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        return
+    }
     const param = {
         current:activePage,
         type: isReject,
@@ -166,7 +179,9 @@ function getTabData(activePage){
         ascs:data_asc,
         descs:data_desc,
         ruleType:ruleType||null,
-        size: 15
+        size: 15,
+        "startDate":dateStatrt,
+        "endDate":dateEnd
     }
     post(api.entryCountGroupByEntryAndDeptPage,param).then(res =>{
         if(res.data.code == '0'){
@@ -194,8 +209,8 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        isReject = 1
-        isRejectTemp = 1
+        isReject = isRejectTemp = 1
+        setDatePicker($("#datepicker"),$("#datepicker2"),1)
         getTabData(1)
     })
     $(".monthYear .year").click(function(){
@@ -206,8 +221,8 @@ function dateChange(){
             color:'#00A1FF',
             backgroundColor:'#fff'
         })
-        isReject = 2
-        isRejectTemp = 2
+        isReject = isRejectTemp = 2
+        setDatePicker($("#datepicker"),$("#datepicker2"),2)
         getTabData(1)
     })
 }
@@ -539,4 +554,18 @@ $(document).on("click", function(){
     $(".selectModuleType .arrow").attr("src",iconDown)
     $(".selectReject .arrow").attr("src",iconDown)
     $(".selectUsed .arrow").attr("src",iconDown)
-})
+})
+$(function() {
+    const  iconCalenBlue= require("./../images/darkDate.png")
+    const  iconCalenGrey= require("./../images/icon_calen_grey.png")
+    $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
+    $('.iconCalen').on("mouseenter", function(e){
+        $(this).attr("src", iconCalenBlue)
+    })
+    $('.iconCalen').on("mouseleave", function(e){
+        $(this).attr("src", iconCalenGrey)
+    })
+    $('.iconCalen').on("click", function(e){
+        $(this).parent().find("input").focus()
+    })
+});