|
@@ -3,7 +3,7 @@ require("../css/tiaomu.less");
|
|
|
require('./../resource/jquery-ui/jquery-ui.min.js');
|
|
|
require('./modal.js');
|
|
|
const {api} = require('./api.js')
|
|
|
-const {post,getCookie,getUrlArgObjectNew,emptyBox,focusMenuItem} = require('./utils.js')
|
|
|
+const {post,getCookie,getUrlArgObjectNew,emptyBox,focusMenuItem,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")
|
|
@@ -45,7 +45,6 @@ $(function(){
|
|
|
if(from == 2){
|
|
|
$(".partTitle a").attr("href","deptConsole.html").html("控制台(科室) / ")
|
|
|
}
|
|
|
- getTabData(1)//条目缺陷
|
|
|
$(".partTitle a").click(function(){
|
|
|
//初始菜单选中
|
|
|
$(".managerContainer").remove()
|
|
@@ -58,6 +57,7 @@ $(function(){
|
|
|
})
|
|
|
$(".abnormalClear").click(function(){
|
|
|
// window.location.reload()
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),isReject||2)
|
|
|
$(".selectModuleType").html("全部")
|
|
|
$(".selectReject").html("全部")
|
|
|
$(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
@@ -78,6 +78,7 @@ $(function(){
|
|
|
color:'#00A1FF',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),1)
|
|
|
}else{
|
|
|
$(".monthYear .year").css({
|
|
|
backgroundColor:'#00A1FF',
|
|
@@ -86,7 +87,9 @@ $(function(){
|
|
|
color:'#00A1FF',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),2)
|
|
|
}
|
|
|
+ getTabData(1)//条目缺陷
|
|
|
})
|
|
|
bindDeptSelect()
|
|
|
//科室选择
|
|
@@ -135,6 +138,14 @@ function getDeptList(){
|
|
|
$(".tiaomu .filterDropList").html(str)
|
|
|
}
|
|
|
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,
|
|
@@ -143,7 +154,9 @@ function getTabData(activePage){
|
|
|
isReject:isSingleReject, //是否单项否决
|
|
|
name: name, //条目名
|
|
|
deptName: deptId, //科室名
|
|
|
- size: 15
|
|
|
+ size: 15,
|
|
|
+ "startDate":dateStatrt,
|
|
|
+ "endDate":dateEnd
|
|
|
}
|
|
|
post(from == 1?api.entryGroupByEntryInnerPage:api.entryGroupByEntryAndDeptInnerPage,param).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
@@ -171,8 +184,8 @@ function dateChange(){
|
|
|
color:'#00A1FF',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
- isRejectTemp = 1
|
|
|
- isReject = 1
|
|
|
+ isRejectTemp = isReject = 1
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),1)
|
|
|
getTabData(1)
|
|
|
})
|
|
|
$(".monthYear .year").click(function(){
|
|
@@ -183,8 +196,8 @@ function dateChange(){
|
|
|
color:'#00A1FF',
|
|
|
backgroundColor:'#fff'
|
|
|
})
|
|
|
- isRejectTemp = 2
|
|
|
- isReject = 2
|
|
|
+ isRejectTemp = isReject = 2
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),2)
|
|
|
getTabData(1)
|
|
|
})
|
|
|
}
|
|
@@ -526,4 +539,20 @@ $(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()
|
|
|
+ })
|
|
|
+});
|