|
@@ -2,7 +2,7 @@
|
|
|
$(function () {
|
|
|
init_daterangepicker();
|
|
|
//daterangepicker(getAllOperator);
|
|
|
- initMzsrmxTable();
|
|
|
+ initMzsrmxTable();
|
|
|
//重置查询参数
|
|
|
$('#btn_clean').click(function () {
|
|
|
cleanParams();
|
|
@@ -24,7 +24,6 @@ $(function () {
|
|
|
});
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 初始化下拉选
|
|
|
*/
|
|
@@ -42,8 +41,6 @@ function initSelect() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 父类码下拉选
|
|
|
*/
|
|
@@ -159,42 +156,65 @@ function initMzsrmxTable() {
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- data: JSON.stringify({"beginDate": rePortRangeArr[0], "endDate": rePortRangeArr[1], "caseType": $('#timeParam').val(), "jzSqDept": $("#jzSqDept").val(), "jzSqDoctor": $("#jzSqDoctor").val(),"hisData": $('#hisData').is(':checked') ? 0 : 1}),
|
|
|
+ data: JSON.stringify({
|
|
|
+ "beginDate": rePortRangeArr[0],
|
|
|
+ "endDate": rePortRangeArr[1],
|
|
|
+ "caseType": $('#timeParam').val(),
|
|
|
+ "jzSqDept": $("#jzSqDept").val(),
|
|
|
+ "jzSqDoctor": $("#jzSqDoctor").val(),
|
|
|
+ "hisData": $('#hisData').is(':checked') ? 0 : 1
|
|
|
+ }),
|
|
|
success: function (res) {
|
|
|
if (res == '401' || res == 401) {
|
|
|
window.location.href = '/thmz/login/view'
|
|
|
return;
|
|
|
}
|
|
|
- if(res.code==0){
|
|
|
- if(res.depetList!=null && res.depetList.length>0 && res.chargeTypeList!=null && res.chargeTypeList.length>0){
|
|
|
- var html ="<thead><tr><th rowspan='2'>科室</th>";
|
|
|
- var secondRow='<tr>';
|
|
|
- for (var i=0;i<res.chargeTypeList.length;i++){
|
|
|
- html+="<th colspan='2'>"+res.chargeTypeList[i].charge_type_name+"</th>";
|
|
|
- secondRow+="<th>号数</th><th>金额</th>"
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.depetList != null && res.depetList.length > 0 && res.chargeTypeList != null && res.chargeTypeList.length > 0) {
|
|
|
+ var html = "<thead><tr><th rowspan='2' class='text-center' style='vertical-align: middle !important;' >科室</th>";
|
|
|
+ var secondRow = '<tr>';
|
|
|
+ var totalTr = '<tr><th class="text-center">总计</th>';
|
|
|
+ for (var i = 0; i < res.chargeTypeList.length; i++) {
|
|
|
+ var charge_type_name=res.chargeTypeList[i].charge_type_name;
|
|
|
+ if(charge_type_name==null){
|
|
|
+ charge_type_name="";
|
|
|
+ }
|
|
|
+ html += "<th colspan='2' class='text-center'>" + charge_type_name + "</th>";
|
|
|
+ secondRow += "<th class='text-center'>号数</th><th class='text-center'>金额</th>";
|
|
|
+ totalTr += "<th>"+res.chargeTypeList[i].chargeHshj+"</th><th>"+res.chargeTypeList[i].chargeHehj+"</th>";
|
|
|
}
|
|
|
- html+="<th colspan='2'>合计</th></tr>"
|
|
|
- secondRow+="<th>号数</th><th>金额</th></tr></thead>"
|
|
|
- html+=secondRow;
|
|
|
- html+="<tbody>";
|
|
|
- for (var i=0;i<res.depetList.length;i++){
|
|
|
- html+="<tr><td>"+res.depetList[i].dept_name+"</td>";
|
|
|
- for (var j=0;j<res.chargeTypeList.length;j++){
|
|
|
- var id_after = res.chargeTypeList[j].charge_type+"_"+res.depetList[i].unit_code;
|
|
|
- var hsid= "hs_"+id_after;
|
|
|
- var jeid= "je_"+id_after;
|
|
|
- html+="<td id='"+hsid+"'></td><td id='"+jeid+"'></td>";
|
|
|
+ html += "<th colspan='2' class='text-center'>合计</th></tr>";
|
|
|
+ secondRow += "<th class='text-center'>号数</th><th class='text-center'>金额</th></tr></thead>";
|
|
|
+ html += secondRow;
|
|
|
+ html += "<tbody>";
|
|
|
+ var allhsht=0;
|
|
|
+ var alljehj=0.0;
|
|
|
+ for (var i = 0; i < res.depetList.length; i++) {
|
|
|
+ html += "<tr><td>" + res.depetList[i].dept_name + "</td>";
|
|
|
+ for (var j = 0; j < res.chargeTypeList.length; j++) {
|
|
|
+ var id_after = res.chargeTypeList[j].charge_type.trim() + "_" + res.depetList[i].unit_code;
|
|
|
+ var hsid = "hs_" + id_after;
|
|
|
+ var jeid = "je_" + id_after;
|
|
|
+ html += "<td id='" + hsid + "'></td><td id='" + jeid + "'></td>";
|
|
|
}
|
|
|
- var hjhsid= "hs_hj_"+res.depetList[i].unit_code;
|
|
|
- var hjjeid= "je_hj_"+res.depetList[i].unit_code;
|
|
|
- html+="<td id='"+hjhsid+"'></td><td id='"+hjjeid+"'></td>";
|
|
|
- html+="</tr>";
|
|
|
+ html += "<td>" + res.depetList[i].hshj + "</td><td>" + res.depetList[i].jehj.toFixed(2) + "</td>";
|
|
|
+ html += "</tr>";
|
|
|
+ allhsht=allhsht+res.depetList[i].hshj;
|
|
|
+ alljehj=alljehj+res.depetList[i].jehj;
|
|
|
}
|
|
|
- html+="</tbody>";
|
|
|
+ totalTr+="<th>"+allhsht+"</th><th>"+alljehj.toFixed(2)+"</th></tr>";
|
|
|
+ html+=totalTr;
|
|
|
+ html += "</tbody>";
|
|
|
$("#tb_table").html(html);
|
|
|
|
|
|
- for(var i=0;i<res.data.length;i++){
|
|
|
-
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ var id_after = res.data[i].charge_type.trim() + "_" + res.data[i].unit_code;
|
|
|
+ var hsid = "hs_" + id_after;
|
|
|
+ var jeid = "je_" + id_after;
|
|
|
+ $("#" + hsid).text(res.data[i].patient_count);
|
|
|
+ if (res.data[i].req_fee != null) {
|
|
|
+ $("#" + jeid).text(res.data[i].req_fee.toFixed(2));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -214,19 +234,18 @@ function queryParams(params) {
|
|
|
endDate: rePortRangeArr[1],
|
|
|
commonParams: $('#commonParams').val(),
|
|
|
caseType: $('#timeParam').val(),
|
|
|
- jzSqDept:$("#jzSqDept").val(),
|
|
|
- jzSqDoctor:$("#jzSqDoctor").val(),
|
|
|
- execDept:$("#execDept").val(),
|
|
|
- hsm:$("#hsm").val(),
|
|
|
- parentCode:$("#parentCode").val(),
|
|
|
- xmm:$("#xmm").val()
|
|
|
+ jzSqDept: $("#jzSqDept").val(),
|
|
|
+ jzSqDoctor: $("#jzSqDoctor").val(),
|
|
|
+ execDept: $("#execDept").val(),
|
|
|
+ hsm: $("#hsm").val(),
|
|
|
+ parentCode: $("#parentCode").val(),
|
|
|
+ xmm: $("#xmm").val()
|
|
|
};
|
|
|
|
|
|
return temp;
|
|
|
};
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取时间选择器的时间数组
|
|
|
* @returns {string[]}
|
|
@@ -240,7 +259,6 @@ function getRePortRangeArr() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 清空查询条件
|
|
|
*/
|
|
@@ -267,7 +285,7 @@ function cleanParams() {
|
|
|
*/
|
|
|
function exportExcel() {
|
|
|
var rePortRangeArr = getRePortRangeArr();
|
|
|
- window.location.href = "/thmz/excelThmzmxsr?beginDate=" + rePortRangeArr[0] + "&endDate=" + rePortRangeArr[1]+"&commonParams="+$('#commonParams').val()
|
|
|
- +"&caseType="+$('#timeParam').val()+"&jzSqDept="+$("#jzSqDept").val()+"&jzSqDoctor="+$("#jzSqDoctor").val()+"&execDept="+$("#execDept").val()+"&hsm="
|
|
|
- +$("#hsm").val()+"&parentCode="+$("#parentCode").val()+"&xmm="+$("#xmm").val();
|
|
|
+ window.location.href = "/thmz/excelThmzmxsr?beginDate=" + rePortRangeArr[0] + "&endDate=" + rePortRangeArr[1] + "&commonParams=" + $('#commonParams').val()
|
|
|
+ + "&caseType=" + $('#timeParam').val() + "&jzSqDept=" + $("#jzSqDept").val() + "&jzSqDoctor=" + $("#jzSqDoctor").val() + "&execDept=" + $("#execDept").val() + "&hsm="
|
|
|
+ + $("#hsm").val() + "&parentCode=" + $("#parentCode").val() + "&xmm=" + $("#xmm").val();
|
|
|
}
|