Przeglądaj źródła

处方打印优化

hsh 1 rok temu
rodzic
commit
64478d5a00

+ 25 - 24
src/main/resources/static/js/mz/west_pharmacy_dispensing.js

@@ -777,6 +777,7 @@ function printView(data) {
     //设置默认打印机
     LODOP.SET_PRINTER_INDEX(printIndex);
     LODOP.SET_PRINT_PAGESIZE(1, '140mm', '202mm', "CreateCustomPage");
+    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
     LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "140mm");
     LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "202mm");
     LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊配药单");//对新建的纸张重命名
@@ -788,10 +789,10 @@ function printView(data) {
         strStyle += "}";
         strStyle += "</style>";
     }
-    LODOP.ADD_PRINT_HTM("5mm", "7mm", "140mm", "202mm", strStyle + $("div[id='print_view']").html());
+    LODOP.ADD_PRINT_HTM("2mm", "4mm", "140mm", "202mm", strStyle + $("div[id='print_view']").html());
     LODOP.PRINT();
     LODOP.NewPageA();//下一页
-    //LODOP.PREVIEW();
+    // LODOP.PREVIEW();
 }
 
 /**
@@ -914,42 +915,42 @@ function getXyPrintHtml(list) {
         var number = i + 1;
         let manufactoryName = list[i].manufactoryName == null || list[i].manufactoryName == '' ? '' : '(' + list[i].manufactoryName + ')';
         tr += '<tr>' +
-            '    <td style="margin-bottom: 5px;width: 10px;font-size: 12px;" align="left" valign="top">' + number + "." +
+            '    <td style="margin-bottom: 5px;width: 10px;font-size: 14px;" align="left" valign="top">' + number + "." +
             '</td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 12px;">' + tryResult + list[i].drugName +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 14px;">' + tryResult + list[i].drugName +
             '    </td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 70px;text-align: right;font-size: 12px;">' + list[i].specification +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 70px;text-align: right;font-size: 14px;">' + list[i].specification +
             '</td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 5px;text-align: left;font-size: 12px;">×</td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 5px;text-align: left;font-size: 12px;">' + list[i].quantity +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 5px;text-align: left;font-size: 14px;">×</td>' +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 5px;text-align: left;font-size: 14px;">' + list[i].quantity +
             '</td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 25px;text-align: left;font-size: 12px;">' + list[i].ypUnitName +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 25px;text-align: left;font-size: 14px;">' + list[i].ypUnitName +
             '</td>' +
             '</tr>' +
             '<tr>' +
-            '    <td style="margin-bottom: 5px;width: 10px;font-size: 12px;" align="left" valign="top">' +
+            '    <td style="margin-bottom: 5px;width: 10px;font-size: 14px;" align="left" valign="top">' +
             '</td>' +
-            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 12px;">' + manufactoryName + tryFlag +
+            '    <td style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 14px;">' + manufactoryName + tryFlag +
             '    </td>' +
-            '    <td colspan="4" style="padding-left:0px;margin-bottom: 5px;width:220px;vertical-align: middle !important;text-align: left;font-size: 12px;">用法:' + list[i].drugQuan + "&nbsp;" + list[i].drugUnitName + '/次&nbsp;&nbsp;' + list[i].frequencyName + '&nbsp;&nbsp;' + printName +
+            '    <td colspan="4" style="padding-left:0px;margin-bottom: 5px;width:220px;vertical-align: middle !important;text-align: left;font-size: 14px;">用法:' + list[i].drugQuan + "&nbsp;" + list[i].drugUnitName + '/次&nbsp;&nbsp;' + list[i].frequencyName + '&nbsp;&nbsp;' + printName +
             '</td>' +
             '</tr>' +
             '<tr>' +
-            '    <td style="margin-bottom: 5px;width: 10px;font-size: 12px;" align="left" valign="top">' +
+            '    <td style="margin-bottom: 5px;width: 10px;font-size: 14px;" align="left" valign="top">' +
             '</td>' +
-            '    <td colspan="5" style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 12px;">' + (list[i].instructionText == null ? '' : list[i].instructionText) +
+            '    <td colspan="5" style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 14px;">' + (list[i].instructionText == null ? '' : list[i].instructionText) +
             '    </td>' +
             '</tr>' +
             '<tr>' +
-            '    <td style="margin-bottom: 5px;width: 10px;font-size: 12px;" align="left" valign="top">' +
+            '    <td style="margin-bottom: 5px;width: 10px;font-size: 14px;" align="left" valign="top">' +
             '</td>' +
-            '    <td colspan="5" style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 12px;">' + '货位号:' + list[i].location +
+            '    <td colspan="5" style="margin-bottom: 5px;vertical-align: middle !important;width: 245px;font-size: 14px;">' + '货位号:' + list[i].location +
             '    </td>' +
             '</tr><tr style="height: 5px;"><td><img src="about:blank" width="5" height="5" /></td></tr>';
     }
     $('#yxwk').remove();
-    if (list.length <= 5) {
-        $('#div_yp').append('<span id="yxwk" style="margin-bottom: 5px;font-size: 12px;">以下为空</span>');
+    if (list.length < 5) {
+        $('#div_yp').append('<span id="yxwk" style="margin-bottom: 5px;font-size: 14px;">以下为空</span>');
     }
     return tr;
 }
@@ -963,18 +964,18 @@ function getZyPrintHtml(list) {
     let tr = '';
     for (let i = 0; i < list.length;) {
         tr += '<tr class="sjh">' +
-            '<td style="width: 160px; font-size: 12px;">' + list[i].drugName +
+            '<td style="width: 160px; font-size: 14px;">' + list[i].drugName +
             '</td>' +
-            '<td style="width: 40px;text-align: right; font-size: 12px;">' + list[i].specification +
+            '<td style="width: 40px;text-align: right; font-size: 14px;">' + list[i].specification +
             '</td>' +
-            '<td style="width: 25px;text-align: right;border-right: 1px solid black; font-size: 12px;">' + list[i].quantity + list[i].ypUnitName +
+            '<td style="width: 25px;text-align: right;border-right: 1px solid black; font-size: 14px;">' + list[i].quantity + list[i].ypUnitName +
             '</td>';
         if (i + 1 < list.length) {
-            tr += '<td style="width: 160px; font-size: 12px;">' + list[i + 1].drugName +
+            tr += '<td style="width: 160px; font-size: 14px;">' + list[i + 1].drugName +
                 '</td>' +
-                '<td style="width: 40px;text-align: right; font-size: 12px;">' + list[i + 1].specification +
+                '<td style="width: 40px;text-align: right; font-size: 14px;">' + list[i + 1].specification +
                 '</td>' +
-                '<td style="width: 25px;text-align: right; font-size: 12px;">' + list[i + 1].quantity + list[i + 1].ypUnitName +
+                '<td style="width: 25px;text-align: right; font-size: 14px;">' + list[i + 1].quantity + list[i + 1].ypUnitName +
                 '</td>' +
                 '</tr>';
         }
@@ -993,7 +994,7 @@ function getZyPrintHtml(list) {
     yf += isEmpty(list[0].cyFfcs)?'':'分'+list[0].cyFfcs+'次,';
     yf += isEmpty(list[0].cyFysm)?'':list[0].cyFysm;
     tr += '<tr class="sjh">' +
-        '<td colspan="6" style="border: 0 !important;text-align: left;padding: 0; font-size: 12px;">'+yf+'</td>' +
+        '<td colspan="6" style="border: 0 !important;text-align: left;padding: 0; font-size: 14px;">'+yf+'</td>' +
         '</tr>';
     return tr;
 }

+ 11 - 11
src/main/resources/static/js/yf/ward_prescription.js

@@ -1255,12 +1255,12 @@ function printCyCount(flag) {
             $(".bedNo").text(data.bedNo);
         }
         html += '<tr class="sjh">';
-        html += '<td class="xtd" style="text-align: center;">' + data.drugName + '</td>';
+        html += '<td class="xtd" style="text-align: left;">' + data.drugName + '</td>';
         html += '<td class="xtd" style="text-align: center;">' + data.specification + '</td>';
         html += '<td class="xtd" style="text-align: center;">' + data.minAmount + '</td>';
         html += '<td class="xtd" style="text-align: left;">' + data.instruction + '</td>';
         if (i !== datas.length - 1) {
-            html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].drugName + '</td>';
+            html += '<td class="xtd" style="text-align: left;">' + datas[i + 1].drugName + '</td>';
             html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].specification + '</td>';
             html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].minAmount + '</td>';
             html += '<td class="xtd" style="text-align: left;">' + datas[i + 1].instruction + '</td>';
@@ -1272,18 +1272,18 @@ function printCyCount(flag) {
     let totalContent;
     let fyfsContent;
     if(groupNo === '83'){
-        totalContent = '共 ' + datas[0].amount + ' 剂,' + datas[0].orderJe + ' 元/剂,' +
+        totalContent = '共 ' + datas[0].amount + ' 剂,' + datas[0].orderJe + ' 元/剂,' +
             '药费总金额:' + keepTwoDecimal(datas[0].orderJe * datas[0].amount) + '元。';
-        fyfsContent = '每天 ' + datas[0].cyMtjs + ' 剂,' + datas[0].cyJssm + datas[0].cyJsl + 'ml,' +
-            '分 ' + datas[0].cyFfcs + ' 次' + datas[0].fysmContent + '。';
+        fyfsContent = '每天 ' + datas[0].cyMtjs + ' 剂,' + datas[0].cyJssm + datas[0].cyJsl + 'ml,' +
+            '分 ' + datas[0].cyFfcs + ' 次,' + datas[0].fysmContent + '。';
     } else {
-        totalContent = '共 ' + datas[0].amount + ' 剂,' + datas[0].orderJe + ' 元/剂,院内代煎 ' + datas[0].quantityDj + ' 剂,' +
-            '药费总金额:' + keepTwoDecimal(datas[0].orderJe * datas[0].amount) + '元代煎费:' + datas[0].quantityDj * datas[0].orderJeDj + '元。';
-        fyfsContent = '每天 ' + datas[0].cyMtjs + ' 剂,' + datas[0].cyJssm + datas[0].cyJsl + 'ml,煮取' + datas[0].cyZql + 'ml,复煎 ' + datas[0].cyFj + ' 次,' +
-            '分 ' + datas[0].cyFfcs + ' 次' + datas[0].fysmContent + '。';
+        totalContent = '共 ' + datas[0].amount + ' 剂,' + datas[0].orderJe + ' 元/剂,院内代煎 ' + datas[0].quantityDj + ' 剂,' +
+            '药费总金额:' + keepTwoDecimal(datas[0].orderJe * datas[0].amount) + '元,代煎费:' + datas[0].quantityDj * datas[0].orderJeDj + '元。';
+        fyfsContent = '每天 ' + datas[0].cyMtjs + ' 剂,' + datas[0].cyJssm + datas[0].cyJsl + 'ml,煮取' + datas[0].cyZql + 'ml,复煎 ' + datas[0].cyFj + ' 次,' +
+            '分 ' + datas[0].cyFfcs + ' 次,' + datas[0].fysmContent + '。';
     }
-    $(".total").text(totalContent);
-    $(".fyfs").text(fyfsContent);
+    $(".total").text(totalContent + fyfsContent);
+    // $(".fyfs").text(fyfsContent);
     $(".doctorName").text(datas[0].doctorName);
     print("zydy_table_div");
 }

+ 1 - 1
src/main/resources/templates/mz/west_pharmacy_dispensing.html

@@ -151,7 +151,7 @@
                             </tbody>
                         </table>
                     </div>
-                    <div id="zbr_div" style="position: absolute;top:685px; ">
+                    <div id="zbr_div" style="position: absolute;top:670px; ">
                         <div style="margin-bottom: 5px;margin-top: 10px;"><span style="font-size: 12px;">医师(签章):</span>
                             <input style="font-size: 12px;border-top: 0px;border-left: 0px;border-right: 0px;border-bottom: 1px solid;width: 190px;background-color: white;color: black;"
                                    disabled value="" id="employeeName"/>

+ 5 - 7
src/main/resources/templates/yf/ward_prescription.html

@@ -339,20 +339,18 @@
                             <td colspan="2" style="text-align: left;border: transparent !important;">单号:<span class="pageNo"></span></td>
                         </tr>
                         <tr id="trContent">
-                            <td class="xtd" style="text-align: center;width: 80px;">药名</td>
+                            <td class="xtd" style="text-align: center;width: 150px;">药名</td>
                             <td class="xtd" style="text-align: center;width: 60px;">规格</td>
                             <td class="xtd" style="text-align: center;width: 40px;">剂量</td>
-                            <td class="xtd" style="text-align: center;width: 150px;">备注</td>
-                            <td class="xtd" style="text-align: center;width: 80px;">药名</td>
+                            <td class="xtd" style="text-align: center;width: 80px;">备注</td>
+                            <td class="xtd" style="text-align: center;width: 150px;">药名</td>
                             <td class="xtd" style="text-align: center;width: 60px;">规格</td>
                             <td class="xtd" style="text-align: center;width: 40px;">剂量</td>
-                            <td class="xtd" style="text-align: center;width: 150px;">备注</td>
+                            <td class="xtd" style="text-align: center;width: 80px;">备注</td>
                         </tr>
                         <tr>
                             <td colspan="8" style="border: transparent !important;"><span class="total"></span></td>
-                        </tr>
-                        <tr>
-                            <td colspan="8" style="border: transparent !important;"><span class="fyfs"></span></td>
+<!--                            <td colspan="8" style="border: transparent !important;"><span class="fyfs"></span></td>-->
                         </tr>
                         <tr>
                             <td colspan="8" style="border: transparent !important;">&nbsp;</td>