|
@@ -1480,6 +1480,11 @@ function printZyLabelData() {
|
|
|
$('#zydybqModal').modal();
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 打印标签
|
|
|
+ * @param datas
|
|
|
+ * @param isMx
|
|
|
+ */
|
|
|
function printLabel(datas, isMx) {
|
|
|
LODOP = getLodop();
|
|
|
LODOP.PRINT_INITA(6, 0, "80mm", "60mm", "住院患者内服袋打印");
|
|
@@ -1489,50 +1494,46 @@ function printLabel(datas, isMx) {
|
|
|
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)) {
|
|
|
- let w_code = $("#wardCode").find("option:selected").text();
|
|
|
- $(".wardName").text(w_code.substring(0, w_code.lastIndexOf("(")));
|
|
|
- $(".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", ""));
|
|
|
- $(".instruction").text(data.instruction);
|
|
|
- break;
|
|
|
+ if(pageClass == 5){//长期口服
|
|
|
+ printLabelLongTime(datas, isMx, LODOP);
|
|
|
+ }else {
|
|
|
+ let tableDatas = getJQAllData(isMx == 1 ? "tb_detail_table" : "tb_summarizing_table");
|
|
|
+ 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>";
|
|
|
+ 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)) {
|
|
|
+ let w_code = $("#wardCode").find("option:selected").text();
|
|
|
+ $(".wardName").text(w_code.substring(0, w_code.lastIndexOf("(")));
|
|
|
+ $(".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", ""));
|
|
|
+ $(".instruction").text(data.instruction);
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+ LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("bqdy_table_div").innerHTML);
|
|
|
+ LODOP.NewPageA();
|
|
|
}
|
|
|
- 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();
|
|
|
}
|
|
|
- LODOP.PRINT();
|
|
|
- /*LODOP.NewPageA();*/
|
|
|
- //LODOP.PRINT_DESIGN();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 打印标签
|
|
|
-
|
|
|
-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);
|
|
|
+ * 打印口服标签
|
|
|
+ */
|
|
|
+function printLabelLongTime(datas, isMx, LODOP) {
|
|
|
var strStyle = "<style>table,td,th {border-width: 1px;" +
|
|
|
"border-style: solid;border-collapse: collapse;table-layout:fixed;word-wrap:break-word;font-size: 13px}.xtd{border: 1px solid black;}</style>";
|
|
|
let html = '';
|
|
@@ -1554,11 +1555,10 @@ function printLabel(datas, isMx) {
|
|
|
html += '<td class="xtd"></td>';
|
|
|
html += '<td class="xtd"></td>';
|
|
|
html += '<td class="xtd"></td>';
|
|
|
- html += '<td class="xtd"></td>';
|
|
|
html += '</tr>';
|
|
|
}
|
|
|
- $("#bqdy_table").append(html);
|
|
|
- LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("bqdy_table_div").innerHTML);
|
|
|
+ $("#cq_bqdy_table").append(html);
|
|
|
+ LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("cq_bqdy_table_div").innerHTML);
|
|
|
LODOP.NewPageA();
|
|
|
html = '';
|
|
|
number = 0;
|
|
@@ -1578,9 +1578,8 @@ function printLabel(datas, isMx) {
|
|
|
}
|
|
|
html += '<tr class="sjh">';
|
|
|
html += '<td class="xtd" style="text-align: left;">' + data.drugName + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.dose + data.doseUnit + '</td>';
|
|
|
html += '<td class="xtd" style="text-align: center;">' + data.specification + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.dosage.replace(".0", "") + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.dose + data.doseUnit + '</td>';
|
|
|
html += '<td class="xtd" style="text-align: center;">' + data.amount + '</td>';
|
|
|
html += '</tr>';
|
|
|
number++;
|
|
@@ -1595,15 +1594,14 @@ function printLabel(datas, isMx) {
|
|
|
html += '<td class="xtd"></td>';
|
|
|
html += '<td class="xtd"></td>';
|
|
|
html += '<td class="xtd"></td>';
|
|
|
- html += '<td class="xtd"></td>';
|
|
|
html += '</tr>';
|
|
|
}
|
|
|
- $("#bqdy_table").append(html);
|
|
|
- LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("bqdy_table_div").innerHTML);
|
|
|
+ $("#cq_bqdy_table").append(html);
|
|
|
+ LODOP.ADD_PRINT_HTM("1mm", "3mm", "RightMargin:1mm", "BottomMargin:3mm", strStyle + document.getElementById("cq_bqdy_table_div").innerHTML);
|
|
|
LODOP.PRINT();
|
|
|
//LODOP.PRINT_DESIGN();
|
|
|
}
|
|
|
-}*/
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 打印报表
|