瀏覽代碼

优化门诊血透室处方打印

hsh 1 年之前
父節點
當前提交
13ac27db95

+ 6 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzPharmacyMapper.java

@@ -53,6 +53,12 @@ public interface MzPharmacyMapper {
             "<when test='mzChargeDetail.printFlag!=null'>",
             " and print_flag =#{mzChargeDetail.printFlag,jdbcType=CHAR}",
             "</when>",
+            "<when test='xtsPrint == 3'>",
+            " and warn_dept = '1020510' ",
+            "</when>",
+            "<when test='xtsPrint != 3'>",
+            " and warn_dept &lt;&gt; '1020510' ",
+            "</when>",
             "<when test='beginTime!=null'>",
             " and charge_date &gt;=#{beginTime,jdbcType=TIMESTAMP}",
             "</when>",

+ 2 - 0
src/main/java/cn/hnthyy/thmz/vo/ChargeDetailPharmacyVo.java

@@ -19,4 +19,6 @@ public class ChargeDetailPharmacyVo {
     //窗口号(发药叫号用)
     private String winNo;
     private MzChargeDetail mzChargeDetail;
+    // 血透室打印处方
+    private String xtsPrint;
 }

+ 3 - 0
src/main/resources/static/js/fy_config.js

@@ -44,6 +44,9 @@ $(function (){
         if($("#groupNo").val() != null){
             window.localStorage["groupNo"] = $("#groupNo").val();
         }
+        if($("#xtsPrint").val() != null){
+            window.localStorage["xtsPrint"] = $("#xtsPrint").val();
+        }
         window.localStorage["groupYk"] = isEmpty($("#groupYk").val())?'':$("#groupYk").val();
         successMesage({code:1,message:'设置成功'});
     });

+ 9 - 13
src/main/resources/static/js/mz/west_pharmacy_dispensing.js

@@ -7,7 +7,7 @@ var jzCfPrintIndex = window.localStorage["jzCfPrintIndex"];
 var mzydPrintIndex = window.localStorage["mzydPrintIndex"];
 var groupNo = window.localStorage["groupNo"];
 var windowsNoYf = window.localStorage["winNo"];
-var printType = '';
+var xtsPrint = window.localStorage["xtsPrint"];
 var temporaryKeyList="";
 var timer="";
 var printTimer = "";
@@ -33,22 +33,18 @@ $(function () {
         $(this).click(function () {
             if ($(this).prop('checked')) {
                 $(':checkbox[name=autoPrint]').removeAttr('checked');
-                $(':checkbox[name=printType]').removeAttr('checked');
                 $(this).prop('checked', true);
                 var chk_value = '';
                 $('input[name="autoPrint"]:checked').each(function () {
                     chk_value = $(this).val();
                 });
-                $('input[name="printType"]:checked').each(function () {
-                    printType = $(this).val();
-                });
                 if (!printTimer) {
-                    printTimer = setInterval("autoPrintMzCf()",timesLong);
+                    printTimer = setInterval(function(){
+                        autoPrintMzCf(chk_value);
+                    },timesLong);
                 }
             } else {
                 $(':checkbox[name=autoPrint]').removeAttr('checked');
-                $(':checkbox[name=printType]').removeAttr('checked');
-                printType = "";
                 clearTimeout(printTimer);
                 printTimer=null;
 
@@ -560,13 +556,14 @@ function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId) {
  * 构建列表查询参数
  * @param params
  */
-function queryParams(params) {
+function queryParams() {
     var rePortRangeArr = getRePortRangeArr();
     var temp = {
         /* pageSize: params.limit,   //页面大小
          pageIndex: params.offset / params.limit,  //页码*/
         beginTime: new Date(rePortRangeArr[0]),
         endTime: new Date(rePortRangeArr[1]),
+        xtsPrint: xtsPrint, // 是否血透室打印:3为是
         mzChargeDetail: {
             patientId: $("#patientIdSearch").val() == "" ? null : $("#patientIdSearch").val(),
             name: $("#nameSearch").val() == "" ? null : $("#nameSearch").val(),
@@ -695,7 +692,7 @@ function printPrescriptions(chkValue) {
     }
     $.ajax({
         type: "GET",
-        url: '/thmz/getPrintPrescriptionDatas?groupNo=' + groupNo + '&printType=' + printType,
+        url: '/thmz/getPrintPrescriptionDatas?groupNo=' + groupNo + '&printType=' + xtsPrint,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -1040,8 +1037,7 @@ function checkInput() {
 }
 
 // 定时器调用处方打印
-function autoPrintMzCf(){
-    let v = $("#autoPrint").val();
-    printPrescriptions(v);
+function autoPrintMzCf(chk_value){
+    printPrescriptions(chk_value);
     initTable();
 }

+ 10 - 0
src/main/resources/templates/fy_config.html

@@ -68,6 +68,16 @@
                             </select>
                         </div>
                     </div>
+                    <div class="item form-group">
+                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="xtsPrint">血透室打印
+                        </label>
+                        <div class="col-md-2 col-sm-2 col-xs-12">
+                            <select class="form-control selectpicker show-tick" required="required" id="xtsPrint">
+                                <option value="1" selected>否</option>
+                                <option value="3">是</option>
+                            </select>
+                        </div>
+                    </div>
                     <div class="item form-group">
                         <label class="control-label col-md-1 col-sm-1 col-xs-12" for="printSelect_mzyd">门诊药单打印机
                         </label>

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

@@ -58,7 +58,7 @@
                             <label>
                                 配药单自动打印 <label><input id="autoPrint" name="autoPrint" type="checkbox" value="1"/>处方形式</label>&nbsp;&nbsp;
 <!--                                <label><input name="autoPrint" type="radio" value="2" onclick="javascript:return false;"/>药单形式</label>&nbsp;&nbsp;-->
-                                <label><input id="printType" name="printType" type="checkbox" value="3"/>血透室打印</label>
+<!--                                <label><input id="printType" name="printType" type="checkbox" value="3"/>血透室打印</label>-->
                             </label>
                         </div>
                         <label class="control-label col-md-1 col-sm-1 col-xs-12" for="nameSearch">姓名