|
@@ -516,6 +516,7 @@ function saveYjItem() {
|
|
*/
|
|
*/
|
|
function openYjEntryHistoryModel() {
|
|
function openYjEntryHistoryModel() {
|
|
$("#yjEntryModal").modal();
|
|
$("#yjEntryModal").modal();
|
|
|
|
+ initYjHistoryTable();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -532,7 +533,7 @@ function initYjHistoryTable() {
|
|
pagination: true, //是否显示分页(*)
|
|
pagination: true, //是否显示分页(*)
|
|
sortable: true, //是否启用排序
|
|
sortable: true, //是否启用排序
|
|
sortOrder: "asc", //排序方式
|
|
sortOrder: "asc", //排序方式
|
|
- queryParams: diagQueryParams, //传递参数(*)
|
|
|
|
|
|
+ queryParams: {}, //传递参数(*)
|
|
sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
|
sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
|
pageNumber: 1, //初始化加载第一页,默认第一页
|
|
pageNumber: 1, //初始化加载第一页,默认第一页
|
|
pageSize: 10, //每页的记录行数(*)
|
|
pageSize: 10, //每页的记录行数(*)
|
|
@@ -561,20 +562,57 @@ function initYjHistoryTable() {
|
|
valign: 'middle',
|
|
valign: 'middle',
|
|
formatter: function (value, row, index) {
|
|
formatter: function (value, row, index) {
|
|
// var rowData = JSON.stringify(row);
|
|
// var rowData = JSON.stringify(row);
|
|
- var str = '<button type="button" class="btn btn-primary btn-sm" onclick="chongPrint(\'' + row.code + '\',\'' + row.name + '\')">选中</button>';
|
|
|
|
|
|
+ var str = '<button type="button" class="btn btn-primary btn-sm" onclick="chongPrint(\'' + row.patientId + '\',\'' + row.times + '\')">打印</button>';
|
|
return str;
|
|
return str;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- field: 'code',
|
|
|
|
- title: '诊断编码',
|
|
|
|
|
|
+ field: 'patientId',
|
|
|
|
+ title: '门诊号',
|
|
|
|
+ align: "center",
|
|
|
|
+ valign: 'middle'
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'times',
|
|
|
|
+ title: '次数',
|
|
align: "center",
|
|
align: "center",
|
|
valign: 'middle'
|
|
valign: 'middle'
|
|
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
field: 'name',
|
|
field: 'name',
|
|
- title: '诊断名称',
|
|
|
|
|
|
+ title: '姓名',
|
|
|
|
+ align: "center",
|
|
|
|
+ valign: 'middle'
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'deptName',
|
|
|
|
+ title: '科室',
|
|
|
|
+ align: "center",
|
|
|
|
+ valign: 'middle'
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'doctorName',
|
|
|
|
+ title: '医生',
|
|
|
|
+ align: "center",
|
|
|
|
+ valign: 'middle'
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'visitDate',
|
|
|
|
+ title: '时间',
|
|
|
|
+ align: "center",
|
|
|
|
+ valign: 'middle',
|
|
|
|
+ formatter: function (value, row, index) {
|
|
|
|
+ return format(value,'yyyy-MM-dd HH:mm:ss')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'totalFee',
|
|
|
|
+ title: '总金额(元)',
|
|
align: "center",
|
|
align: "center",
|
|
valign: 'middle'
|
|
valign: 'middle'
|
|
|
|
|
|
@@ -602,16 +640,14 @@ function initYjHistoryTable() {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
- "total": ress.total,//总页数
|
|
|
|
|
|
+ "total": ress.data.length,//总页数
|
|
"rows": ress.data //数据
|
|
"rows": ress.data //数据
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
-function chongPrint(patientId,times) {
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
//查询病人信息
|
|
//查询病人信息
|
|
function queryMzPatient() {
|
|
function queryMzPatient() {
|
|
@@ -674,6 +710,10 @@ function selectDeptModal() {
|
|
$("#selectDeptModal").modal("show");
|
|
$("#selectDeptModal").modal("show");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function chongPrint(patientId,times) {
|
|
|
|
+ setPrintDetail(patientId,times)
|
|
|
|
+ $("#yjEntryModal").modal("hide");
|
|
|
|
+}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 加载搜索窗口
|
|
* 加载搜索窗口
|
|
@@ -705,33 +745,30 @@ function initSearchList(content, searchTextIds, width, height) {
|
|
}
|
|
}
|
|
|
|
|
|
function setPrintDetail(patientId,times) {
|
|
function setPrintDetail(patientId,times) {
|
|
- if(rightData.length == 0){
|
|
|
|
- errorMesageSimaple('没有要打印的数据')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
postAjaxJsonHttpRequst("/thmz/queryYjEntryPrintData",{patientId:patientId,times:times},true,function (res) {
|
|
postAjaxJsonHttpRequst("/thmz/queryYjEntryPrintData",{patientId:patientId,times:times},true,function (res) {
|
|
if(res.code == 0){
|
|
if(res.code == 0){
|
|
- $("#patientId_t").html("门诊号:"+ res.patientId)
|
|
|
|
- $("#name_t").html("姓名:"+ res.name)
|
|
|
|
- $("#date_t").html("日期:"+ res.visitData)
|
|
|
|
- $("#dept_t").html("科室:"+ res.deptName)
|
|
|
|
- $("#doctor_t").html("医生:"+ res.userName)
|
|
|
|
|
|
+ $("#patientId_t").html("门诊号:"+ res.data.patientId)
|
|
|
|
+ $("#name_t").html("姓名:"+ res.data.name)
|
|
|
|
+ $("#date_t").html("日期:"+ format(res.data.visitDate,'yyyy-MM-dd'))
|
|
|
|
+ $("#dept_t").html("科室:"+ res.data.deptName)
|
|
|
|
+ $("#doctor_t").html("医生:"+ res.data.doctorName)
|
|
let html = "";
|
|
let html = "";
|
|
- for (let i = 0; i <res.data.length ; i++) {
|
|
|
|
|
|
+ let mzChargeDetails = res.data.mzChargeDetails
|
|
|
|
+ for (let i = 0; i <mzChargeDetails.length ; i++) {
|
|
html += "<tr>";
|
|
html += "<tr>";
|
|
- html += ' <td style="width: 17%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].code + '</td>';
|
|
|
|
- html += ' <td style="width: 45%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].name + '</td>';
|
|
|
|
- html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].descriptions + '</td>';
|
|
|
|
- html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].chargeUnit + '</td>';
|
|
|
|
- html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].unitPrice + '</td>';
|
|
|
|
- html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].quantity + '</td>';
|
|
|
|
- html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].amount + '</td>';
|
|
|
|
|
|
+ html += ' <td style="width: 17%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].chargeItemCode + '</td>';
|
|
|
|
+ html += ' <td style="width: 45%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].tcName + '</td>';
|
|
|
|
+ html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].instructionText + '</td>';
|
|
|
|
+ html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].drugUnit + '</td>';
|
|
|
|
+ html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].unitPrice + '</td>';
|
|
|
|
+ html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].quantity + '</td>';
|
|
|
|
+ html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].amount + '</td>';
|
|
|
|
|
|
html += "</tr>";
|
|
html += "</tr>";
|
|
}
|
|
}
|
|
html += '<tr><td colspan="8"><div style="border:0;border-top:1px solid #000;overflow:hidden;font-size: 13px;"><div style="float: right;font-weight: 700;padding-top: 4px;padding-bottom: 4px;"><span>金额合计:</span><span id="total_count" style="margin-left: 50px;"></span></div></div></td></tr>';
|
|
html += '<tr><td colspan="8"><div style="border:0;border-top:1px solid #000;overflow:hidden;font-size: 13px;"><div style="float: right;font-weight: 700;padding-top: 4px;padding-bottom: 4px;"><span>金额合计:</span><span id="total_count" style="margin-left: 50px;"></span></div></div></td></tr>';
|
|
$("#fymx_table_body").html(html);
|
|
$("#fymx_table_body").html(html);
|
|
- $("#total_count").text(res.totalFee);
|
|
|
|
|
|
+ $("#total_count").text(res.data.totalFee+' 元');
|
|
|
|
|
|
setTimeout(printChargeDetail,500)
|
|
setTimeout(printChargeDetail,500)
|
|
}else {
|
|
}else {
|