From 6ca66a5941f8bfb4828b906ee203f71154c14990 Mon Sep 17 00:00:00 2001 From: zengwh Date: Tue, 15 Sep 2020 15:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E9=99=A2=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=AE=A1=E6=A0=B8=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/static/js/beHospList/beHospList.js | 18 +- .../js/lastVerifyList/lastVerifyList.js | 3 +- .../static/js/record/recordStatistics.js | 404 ++++++++++++++++++ 3 files changed, 414 insertions(+), 11 deletions(-) create mode 100644 src/main/webapp/static/js/record/recordStatistics.js diff --git a/src/main/webapp/static/js/beHospList/beHospList.js b/src/main/webapp/static/js/beHospList/beHospList.js index 8c9cc32..6161558 100644 --- a/src/main/webapp/static/js/beHospList/beHospList.js +++ b/src/main/webapp/static/js/beHospList/beHospList.js @@ -401,6 +401,8 @@ function paramsMatter(value, row) { //审核弹窗 单个审批① function verifyInfo(role,archivestate,roleCode,masterId){ + //生成表单token,防止表单重复提交 + setFormToken(); //赋值审批一个 $("#approveCount").val(1); //查询his判断医生护士是否全部提交 @@ -425,8 +427,7 @@ function verifyInfo(role,archivestate,roleCode,masterId){ } //提交审核 单个审批② 批量审批③ $("#verifyBtn").on('click', function () { - //生成表单token,防止表单重复提交 - setFormToken(); + $("#verifyModal").modal('hide'); var approveCount = $("#approveCount").val(); if(approveCount > 1) { //大于一个弹出确认框 @@ -444,7 +445,6 @@ $("#verifyBtn").on('click', function () { //判断完整性 var result = checkSuccessMethod(id); if (result != '完整') { - $("#verifyModal").modal('hide'); $("#resultLabel").text("完整性未通过:" + result + ",是否强制提交?"); $('#WZModal').modal({ backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。 @@ -452,18 +452,20 @@ $("#verifyBtn").on('click', function () { show: true//弹出对话框 }); } else { - $("#verifyModal").modal('hide'); save(1,''); } } }); //强制提交 单个审批③ $("#wzSaveBtn").on('click', function () { + $("#WZModal").modal('hide'); save(1,''); }); //批量初审功能 批量审批① $("#approvesBtn").on('click', function () { + //生成表单token,防止表单重复提交 + setFormToken(); selects = $("#table").bootstrapTable('getSelections'); var count = selects.length; //定义可提交审核的个数 @@ -538,8 +540,6 @@ function callApproveDiag(ids,roleCode,archivestate,isSuccess,approveCount) { } //批量初审确认 批量审批④ $("#sureBtn").click(function(){ - //生成表单token,防止表单重复提交 - setFormToken(); //计算完整与不完整个数及不完整集合 var successCount = 0; var failCount = 0; @@ -553,11 +553,13 @@ $("#sureBtn").click(function(){ successCount++; } } + $('#verifyModal').modal('hide'); save(successCount,failSelects); }) //提交后台审核 function save(successCount,failSelects){ + $("#sureModal").modal('hide'); var id = $("#archiveId").val(); var roleCode = $("#roleCode").val(); var firstTrial = $("#verifyText").val(); @@ -589,11 +591,8 @@ function save(successCount,failSelects){ initTable4(failSelects); $('#unSuccessModal').modal('show'); }else{ - $("#verifyModal").modal('hide'); - $("#WZModal").modal('hide'); toastr.success("审核成功!"); } - $("#sureModal").modal('hide'); $("#table").bootstrapTable("refresh"); }else{ toastr.error(data.msg); @@ -693,7 +692,6 @@ function getApproveRoles() { //监听审核节点查询的变更事件,记录属于支线 $("#infoId").change(function(){ var dataRole = $(this).find("option:selected").attr("data-role"); - console.log(dataRole) if(dataRole == 1 || dataRole == 2) { $("#searchOperRole").val(dataRole); }else{ diff --git a/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js b/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js index ae2678c..4d16c1f 100644 --- a/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js +++ b/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js @@ -363,6 +363,7 @@ function initTable3() { //终审功能 $("#verifyBtn").on('click', function () { + setFormToken(); //审核信息保存 //获取审批个数 var approveCount = $("#approveCount").val(); @@ -412,7 +413,6 @@ $("#wzSaveBtn").click(function(){ //终审方法 function approveMethod(){ - setFormToken(); //归档状态改为初审还是有就是初审内容保存 $.ajax({ url: path+"/lastVerify/updateStateByArchivId", @@ -434,6 +434,7 @@ function approveMethod(){ //批量终审功能 $("#approvesBtn").on('click', function () { + setFormToken(); selects = $("#table").bootstrapTable('getSelections'); var count = selects.length; if(count !== 0){ diff --git a/src/main/webapp/static/js/record/recordStatistics.js b/src/main/webapp/static/js/record/recordStatistics.js new file mode 100644 index 0000000..ce954f9 --- /dev/null +++ b/src/main/webapp/static/js/record/recordStatistics.js @@ -0,0 +1,404 @@ +var tipLoad = 0; +var url = path + '/statistics/recordStatistics/'; +//定义表格内容最大高度 +var maxHeight = 0; +$(function(){ + //加载科室 + getDeptStatistics(); + //获取加载层数级 + var level = $("#level").val(); + switch (level) { + case '1': + initTable(); + break; + case '2': + initTable1(); + break; + case '3': + initTable2(getDeptName(),'table2'); + break; + } +}) +//加载科室 +function getDeptStatistics() { + //获取科室列表 + $.ajax({ + url: path+"/inHosp/getDept", + type: "POST", + data: {effective: 1, typecode: "dept_code"}, + async:false, + success: function (result) { + if (result != null) { + var html = ''; + for (var i = 0; i < result.length; i++) { + //默认需要选中 + var searchDeptName = $("#searchDeptName").val().split(","); + //定义是否包含默认需要选中的 + var name = result[i].name; + var py = makePy(name); + var pingyin = ConvertPinyin(name); + html += ''; + } + $("#deptName").append(html); + $("#deptAdmissionTo").append(html); + $("#deptName").val(searchDeptName); + } + $(".selectpicker").selectpicker('refresh'); // + } + }); +} +//第一层,查全部 +function initTable() { + $("#table").bootstrapTable({ // 对应table标签的id + url: path+"/statistics/getRecordStatistics", // 获取表格数据的url + cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true + striped: true, //表格显示条纹,默认为false + sidePagination: 'server', // 设置为服务器端分页 客户端:client + toolbar: '#toolbar',//指定工具栏 + searchOnEnterKey: true, //设置为 true时,按回车触发搜索方法,否则自动触发搜索方法 + detailView:true,//是否可展开 + undefinedText: '--', //当数据为 undefined 时显示的字符 + singleSelect: false,//设置True 将禁止多选 + clickToSelect: true,//设置true 将在点击行时,自动选择rediobox 和 checkbox + searchTimeOut: 500,// 默认500 设置搜索超时时间。 + showHeader: true,//是否显示列头。 + height:550, + //是否显示导出按钮 + queryParams: function (params) { + return queryParams(params,this,''); + }, + columns: [ + { + title: '序号', + align: 'center', + formatter: function (value, row, index) { + return index + 1; + } + }, + { + title: '出院人数', + field: 'allRecordCount', + align: 'center' + }, + { + title: '总文件数', + field: 'allFileCount', + align: 'center' + }, + { + title: '总页数', + field: 'allPageCount', + align: 'center' + }, + { + title: '自动采集总文件数', + field: 'autoCollectionFileCount', + align: 'center' + }, + { + title: '自动采集总页数', + field: 'autoCollectionPageCount', + align: 'center' + }, + { + title: '扫描上传总文件数', + field: 'manualScanFileCount', + align: 'center' + }, + { + title: '扫描上传总页数', + field: 'manualScanPageCount', + align: 'center' + }, + { + title:'操作', + align: 'center', + valign: 'middle', + formatter: function (value, row, index) { + var allRecordCount = row.allRecordCount; + if(allRecordCount != 0){ + return showDetail('2',null); + } + } + } + ], + onLoadSuccess: function (result) { //加载成功时执行 + $(".page-list").show(); + }, + //展开详情事件 + onExpandRow: function (index, row, $detail) {//點擊datagrid 展開按鈕事件 + var html = '
\n' + + '
\n' + + '
'; + $detail.html(html); + initTable1(); + } + }); +} +//第二层,按科室分组查 +function initTable1() { + $("#table1").bootstrapTable({ // 对应table标签的id + url: path + "/statistics/getRecordStatisticsGroupDept", // 获取表格数据的url + cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true + striped: true, //表格显示条纹,默认为false + pagination: true, // 在表格底部显示分页组件,默认false + paginationShowPageGo: true, + pageList: [10, 20, 50, 100], // 如果设置了分页,设置可供选择的页面数据条数。设置为All 则显示所有记录。 + sidePagination: 'server', // 设置为服务器端分页 客户端:client + searchOnEnterKey: true, //设置为 true时,按回车触发搜索方法,否则自动触发搜索方法 + detailView: true,//是否可展开 + undefinedText: '--', //当数据为 undefined 时显示的字符 + singleSelect: false,//设置True 将禁止多选 + clickToSelect: true,//设置true 将在点击行时,自动选择rediobox 和 checkbox + paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。 + height:514, + searchTimeOut: 500,// 默认500 设置搜索超时时间。 + showHeader: true,//是否显示列头。 + //查询条件 + queryParams: function (params) { + return queryParams(params,this,''); + }, + columns: [ + { + title: '序号', + align: 'center', + formatter: function (value, row, index) { + return index + 1; + } + }, + { + title: '出院科室', + field: 'deptNameCn', + align: 'left' + }, + { + title: '出院人数', + field: 'allRecordCount', + align: 'center' + }, + { + title: '总文件数', + field: 'allFileCount', + align: 'center' + }, + { + title: '总页数', + field: 'allPageCount', + align: 'center' + }, + { + title: '自动采集总文件数', + field: 'autoCollectionFileCount', + align: 'center' + }, + { + title: '自动采集总页数', + field: 'autoCollectionPageCount', + align: 'center' + }, + { + title: '扫描上传总文件数', + field: 'manualScanFileCount', + align: 'center' + }, + { + title: '扫描上传总页数', + field: 'manualScanPageCount', + align: 'center' + }, + { + title:'操作', + align: 'center', + valign: 'middle', + formatter: function (value, row, index) { + return showDetail('3',row.deptName); + } + } + ], + onLoadSuccess: function (result) { //加载成功时执行 + $(".page-list").show(); + //reloadTableHeight("table1"); + }, + //展开详情事件 + onExpandRow: function (index, row, $detail) {//點擊datagrid 展開按鈕事件 + var deptName = row.deptName; + var tableId = 'table_'+deptName; + var html = '
\n' + + '
\n' + + '
'; + $detail.html(html); + initTable2(deptName,tableId); + } + }); +} +//第三层,根据科室查询病患详情 +function initTable2(deptName,tableId) { + $("#"+tableId).bootstrapTable({ // 对应table标签的id + url: path+"/statistics/getRecordStatisticsByDeptName", // 获取表格数据的url + cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true + striped: true, //表格显示条纹,默认为false + sidePagination: 'server', // 设置为服务器端分页 客户端:client + pagination: true, // 在表格底部显示分页组件,默认false + paginationShowPageGo: true, + pageList: [10, 20, 50, 100], // 如果设置了分页,设置可供选择的页面数据条数。设置为All 则显示所有记录。 + toolbar: '#toolbar',//指定工具栏 + searchOnEnterKey: true, //设置为 true时,按回车触发搜索方法,否则自动触发搜索方法 + //detailView:true,//是否可展开 + undefinedText: '--', //当数据为 undefined 时显示的字符 + singleSelect: false,//设置True 将禁止多选 + clickToSelect: true,//设置true 将在点击行时,自动选择rediobox 和 checkbox + paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。 + height:475, + searchTimeOut: 500,// 默认500 设置搜索超时时间。 + showHeader: true,//是否显示列头。 + //是否显示导出按钮 + queryParams: function (params) { + return queryParams(params,this,deptName); + }, + columns: [ + { + title: '序号', + align: 'center', + formatter: function (value, row, index) { + return index + 1; + } + }, + { + title: '住院号', + field: 'inpNo', + align: 'left' + }, + { + title: '姓名', + field: 'name', + align: 'left' + }, + { + title: '住院次数', + field: 'visitId', + align: 'center' + }, + { + title: '出院科室', + field: 'deptNameCn', + align: 'left' + }, + { + title: '出院日期', + field: 'dischargeDateTime', + align: 'center', + formatter: function (value) { + return operDisDate(value); + } + }, + { + title: '总文件数', + field: 'allFileCount', + align: 'center' + }, + { + title: '总页数', + field: 'allPageCount', + align: 'center' + }, + { + title: '自动采集总文件数', + field: 'autoCollectionFileCount', + align: 'center' + }, + { + title: '自动采集总页数', + field: 'autoCollectionPageCount', + align: 'center' + }, + { + title: '扫描上传总文件数', + field: 'manualScanFileCount', + align: 'center' + }, + { + title: '扫描上传总页数', + field: 'manualScanPageCount', + align: 'center' + } + + ], + onLoadSuccess: function (result) { //加载成功时执行 + $(".page-list").show(); + //reloadTableHeight("table2"); + } + }); +} +//各表格查询条件 +function queryParams(params,_this,deptName){ + var currPageSize = _this.pageSize; + if (currPageSize == 2) { + currPageSize = 10; + } + var limit = null; + var offset = params.offset; + //判断是否导出全部all + if ($("#sel_exportoption").val() == "all") { + offset = 0; + limit = _this.totalRows; + _this.pageSize = limit; + } else { + limit = currPageSize; + _this.pageSize = currPageSize; + } + if(deptName == ''){ + deptName = getDeptName(); + } + var temp = { + offset:offset, + limit:limit, + startDate: $("#startTime1").val(), + endDate: $("#endTime1").val(), + deptName:deptName, + timeInterval:$("#timeInterval").val(), + name:$("#name").val(), + inpNo:$("#inpNo").val() + }; + return temp; +} +//封装展开显示按钮方法 +function showDetail(level,deptName){ + return '展开显示'} +//封装展开显示跳转方法 +function showDetailMethod(level,deptName){ + var startDate =$("#startTime1").val(); + var endDate = $("#endTime1").val(); + var timeInterval = $("#timeInterval").val(); + var name = $("#name").val(); + var inpNo = $("#inpNo").val(); + if(deptName == null){ + deptName = getDeptName(); + } + var urlTemp = url + level + "?deptName="+deptName+"&startDate="+ startDate + + "&endDate="+endDate+"&timeInterval="+timeInterval+"&name="+name + +"&inpNo="+inpNo; + window.open(urlTemp); +} +//查询按钮 +$('#searchBtnStatistics').click(function () { + $("#isSearch").val(1); + //查询之后重新从第一页算起 + if (tipLoad == 0) { + var level = $("#level").val(); + if(level == '1') { + $("#table").bootstrapTable("refreshOptions", {pageNumber: 1}); + }else if(level == '2') { + $("#table1").bootstrapTable("refreshOptions", {pageNumber: 1}); + }else if(level == '3') { + $("#table2").bootstrapTable("refreshOptions", {pageNumber: 1}); + } + } else { + toastr.warning("正在查询,请稍等..."); + } +}); +//键盘回车查询 +$(document).keyup(function(event){ + if(event.keyCode ==13){ + $("#searchBtnStatistics").trigger("click"); + } +});