|
@@ -14,7 +14,7 @@ var lastcell;//最后编辑单元格的列
|
|
|
var searchData = {};//搜索条件
|
|
|
$(function () {
|
|
|
init_daterangepicker();
|
|
|
- $('#reportrange span').html(moment().subtract(10, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
+ $('#reportrange span').html(moment().subtract(5, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
$(".selectpicker").selectpicker({
|
|
|
dropuAuto: false
|
|
|
});
|
|
@@ -41,7 +41,11 @@ $(function () {
|
|
|
initTbTable();
|
|
|
clearInterval(tableInterval);
|
|
|
//五分钟刷新一次请领单列表数据
|
|
|
- tableInterval = setInterval(initTbTable, 50000);
|
|
|
+ tableInterval = setInterval(function (){
|
|
|
+ if($("#submitFlagSearch").val() === "1"){
|
|
|
+ initTbTable()
|
|
|
+ }
|
|
|
+ }, 50000);
|
|
|
initDynamicSelect("allUnitCode", "wardCode");
|
|
|
//重置查询参数
|
|
|
$('#btn_clean').click(function () {
|
|
@@ -180,8 +184,10 @@ function initButtonChange(object, realIndex) {
|
|
|
$("#wardCode").removeAttr('disabled');
|
|
|
$("#pageNoSearch").removeAttr('disabled');
|
|
|
$("#pageClassSearch").removeAttr('disabled');
|
|
|
+ $("#submitFlagSearch").removeAttr('disabled');
|
|
|
$("#wardCode").selectpicker('refresh');
|
|
|
$("#pageClassSearch").selectpicker('refresh');
|
|
|
+ $("#submitFlagSearch").selectpicker('refresh');
|
|
|
$("#btn_query").removeAttr('disabled');
|
|
|
$("#btn_clean").removeAttr('disabled');
|
|
|
$("#barCode").attr('disabled', true);
|
|
@@ -209,6 +215,7 @@ function setFrom() {
|
|
|
$("#wardCode").attr('disabled', true);
|
|
|
$("#pageNoSearch").attr('disabled', true);
|
|
|
$("#pageClassSearch").attr('disabled', true);
|
|
|
+ $("#submitFlagSearch").attr('disabled', true);
|
|
|
$("#btn_clean").attr('disabled', true);
|
|
|
$("#btn_query").attr('disabled', true);
|
|
|
}
|
|
@@ -542,7 +549,7 @@ function loadSummarizingTable() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 加载药单汇总信息表格
|
|
|
+ * 加载药单详细信息表格
|
|
|
*/
|
|
|
function loadDetailTable() {
|
|
|
initDetailHtml();
|
|
@@ -1306,7 +1313,7 @@ function printDetailHtml(datas, flag) {
|
|
|
html += '<td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">年龄:' + getBirthSlot(data.birthDate, new Date()) + '</td>';
|
|
|
html += '<td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">性别:' + getSex(data.sex) + '</td>';
|
|
|
html += '<td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">身份:' + data.responceName + '</td>';
|
|
|
- html += '<td colspan="7" class="xtd" style="text-align: left;border: transparent !important;">诊断:';
|
|
|
+ html += '<td colspan="8" class="xtd" style="text-align: left;border: transparent !important;">诊断:';
|
|
|
if (data.admissDiagStr != null) {
|
|
|
html += data.admissDiagStr
|
|
|
}
|
|
@@ -1371,7 +1378,7 @@ function printDetailHtml(datas, flag) {
|
|
|
html += '<td class="xtd" style="text-align: center;">' + data.supplyName + '</td>';
|
|
|
html += '<td class="xtd" style="text-align: center;">' + data.doctorNameStr + '</td>';
|
|
|
}
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + (isEmpty(data.manuNo) ? "" : data.manuNo) + '</td>';
|
|
|
+ /*html += '<td class="xtd" style="text-align: center;">' + (isEmpty(data.manuNo) ? "" : data.manuNo) + '</td>';*/
|
|
|
html += '</tr>';
|
|
|
totalMoney += parseFloat(data.totalMoney);
|
|
|
}
|
|
@@ -1466,9 +1473,47 @@ function printZyLabelData() {
|
|
|
$('#zydybqModal').modal();
|
|
|
}
|
|
|
|
|
|
+function printLabel(datas, isMx) {
|
|
|
+ LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INITA(6, 0, "80mm", "60mm", "住院患者内服袋打印");
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, "80mm", "60mm", "");
|
|
|
+ //设置打印机
|
|
|
+ LODOP.SET_PRINTER_INDEX(nfdPrintIndex);
|
|
|
+ LODOP.SET_PRINT_STYLE("FontSize", 10); //字体大小
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
|
|
|
+ var strStyle = "<style>table,td,th {border-width: 1px;" +
|
|
|
+ "border-style: solid;border-collapse: collapse;table-layout:fixed;word-wrap:break-word;font-size: 16px}.xtd{border: 1px solid black;}</style>";
|
|
|
+ let tableDatas = getJQAllData(isMx == 1 ? "tb_detail_table" : "tb_summarizing_table");
|
|
|
+ for (var i = 0; i < datas.length; i++) {
|
|
|
+ let data = datas[i];
|
|
|
+ for (let j = 0; j < tableDatas.length; j++) {
|
|
|
+ if (tableDatas[j].fybz.indexOf("发药") != -1 && tableDatas[j].chargeCode == data.chargeCode
|
|
|
+ && tableDatas[j].serial == data.serial && (tableDatas[j].occTime == data.occTime || isMx == 0)) {
|
|
|
+ $(".inpatientNo").text($.trim(data.inpatientNo));
|
|
|
+ $(".bedNo").text($.trim(data.bedNo));
|
|
|
+ $(".name").text($.trim(data.name));
|
|
|
+ $(".age").text(getBirthSlot(data.birthDate, new Date()));
|
|
|
+ $(".sex").text(getSex(data.sex));
|
|
|
+ $(".occTime").text(format(data.occTime, "yyyy/MM/dd HH:mm"));
|
|
|
+ $(".drugName").text(data.drugName);
|
|
|
+ $(".specification").text(data.specification);
|
|
|
+ $(".dose").text(data.dose + data.doseUnit);
|
|
|
+ $(".dosage").text(data.dosage.replace(".0", ""));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("bqdy_table_div").innerHTML);
|
|
|
+ LODOP.NewPageA();
|
|
|
+ }
|
|
|
+ LODOP.PRINT();
|
|
|
+ /*LODOP.NewPageA();*/
|
|
|
+ //LODOP.PRINT_DESIGN();
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 打印标签
|
|
|
- */
|
|
|
+
|
|
|
function printLabel(datas, isMx) {
|
|
|
LODOP = getLodop();
|
|
|
LODOP.PRINT_INITA(6, 0, "80mm", "60mm", "住院患者内服袋打印");
|
|
@@ -1548,7 +1593,7 @@ function printLabel(datas, isMx) {
|
|
|
LODOP.PRINT();
|
|
|
//LODOP.PRINT_DESIGN();
|
|
|
}
|
|
|
-}
|
|
|
+}*/
|
|
|
|
|
|
/**
|
|
|
* 打印报表
|