瀏覽代碼

解决发票打印走纸问题

hurugang 5 年之前
父節點
當前提交
976f3c2364

+ 6 - 6
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -375,13 +375,13 @@ public interface ChargeFeeVoMapper {
                     "sum ( amount) zjss," +
                     "sum ( case when pay_mark ='0'  then amount else 0 end ) zjsk," +
                     "sum ( case when pay_mark  <![CDATA[<>]]>'0'  then amount else 0 end ) zjtk," +
-                    "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') then amount else 0 end ) wxzzss," +
-                    "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='0'  then amount else 0 end ) wxzzsk," +
+                    "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') then amount else 0 end ) wxzzss," +
+                    "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='0'  then amount else 0 end ) wxzzsk," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') then amount else 0 end ) zfbzzss," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0'  then amount else 0 end ) zfbzzsk," +
-                    "count ( distinct case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) wxzzbs," +
-                    " count ( distinct case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark &gt; '0' then receipt_sn else null end ) wxzztfbs," +
-                    "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) wxzztf," +
+                    "count ( distinct case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) wxzzbs," +
+                    " count ( distinct case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark &gt; '0' then receipt_sn else null end ) wxzztfbs," +
+                    "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) wxzztf," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) zfbzztf," +
                     "count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) zfbzzbs," +
                     " count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark &gt; '0' then receipt_sn else null end ) zfbzztfbs," +
@@ -869,7 +869,7 @@ public interface ChargeFeeVoMapper {
             " from " +
             " ${tableName} " +
             " where dcount_date>=#{beginDate} and " +
-            "      dcount_date<=#{endDate} " +
+            "      dcount_date<=#{endDate}  and pay_mark <> 2 " +
             "group by op_id,dcount_date " +
             "order by op_id ")
     List<WorkloadVo> selectSfWorkloadVo(@Param("tableName") String tableName, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);

+ 1 - 1
src/main/resources/static/js/daily.js

@@ -436,7 +436,7 @@ function getRjbb() {
                 if (res.zffpmx.length == 0) {
                     $("#sfzffpmx_table").css("display", "none");
                 } else if (res.zffpmx.length > 0) {
-                    $("#sfzffpmx_table").css("display", "block");
+                    $("#sfzffpmx_table").css("display", "inline-block");
                     var html = '';
                     for (var i = 0; i < res.zffpmx.length; i++) {
                         var receiptBill = res.zffpmx[i].receiptBill;

+ 1 - 1
src/main/resources/static/js/daily_repeat_print.js

@@ -405,7 +405,7 @@ function getRjbb() {
                     $("#username_zbr").html(uerName);
                 }
                 if(userCode!=null && userCode=='9999'){
-                    $(".zz_title").css("display","block");
+                    $(".zz_title").css("display","inline-block");
                 }else {
                     $(".zz_title").css("display","none");
                 }

+ 10 - 3
src/main/resources/static/js/registration.js

@@ -9,6 +9,8 @@ var pageIndex = 0;
 var LODOP; //声明为全局变量
 //默认打印机下标
 var printIndex = -1;
+//发票计数器
+var countReceiot=0;
 var TableInit = function () {
     var oTableInit = new Object();
     //初始化Table
@@ -1635,6 +1637,10 @@ function clearRegistration() {
  */
 function prn1Print(patientId, times) {
     setPrint();
+    var height ="93.0mm";
+    if(countReceiot%2==0){
+        height ="93.1mm";
+    }
     $.ajax({
         type: "GET",
         url: '/thmz/printMzyReqrecRecept?patientId=' + patientId + "&times=" + times,
@@ -1650,14 +1656,15 @@ function prn1Print(patientId, times) {
                 if (res.data == null || res.data.length == 0) {
                     return;
                 }
+                countReceiot++;
                 LODOP = getLodop();
                 var temp = res.data;
-                LODOP.PRINT_INITA(6, 0, "120mm", "93.2mm", "泰和门诊发票打印");
+                LODOP.PRINT_INITA(6, 0, "120mm", height, "泰和门诊发票打印");
                 //设置默认打印机
                 LODOP.SET_PRINTER_INDEX(printIndex);
                 LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "120mm");
-                LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "93.2mm");
-                LODOP.SET_PRINT_PAGESIZE(1, "120mm", "93.2mm", "CreateCustomPage");
+                LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", height);
+                LODOP.SET_PRINT_PAGESIZE(1, "120mm", height, "CreateCustomPage");
                 LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
                 LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
                 LODOP.ADD_PRINT_TEXT("6mm", "0mm", "45mm", "3mm", "湖南泰和医院管理有限公司");

+ 10 - 3
src/main/resources/static/js/toll_administration.js

@@ -4,6 +4,8 @@ var LODOP; //声明为全局变量
 var printIndex = -1;
 //选中的要退的费用收费编码
 var chargeItemCodes =null;
+//发票计数器
+var countReceiot=0;
 $(function () {
     //默认光标在卡号输入框
     $("#cardNo").focus();
@@ -1265,6 +1267,10 @@ function obsoleteAndRepPrint(patientId, times,receiptNo) {
  */
 function printCommon(url,patientId, times) {
     setPrint();
+    var height ="93.0mm";
+    if(countReceiot%2==0){
+        height ="93.1mm";
+    }
     $.ajax({
         type: "GET",
         url: url,
@@ -1280,15 +1286,16 @@ function printCommon(url,patientId, times) {
                 if (res.data == null || res.data.length == 0) {
                     return;
                 }
+                countReceiot++;
                 for (var i = 0; i < res.data.length; i++) {
                     LODOP = getLodop();
                     var temp = res.data[i].mzReceiptSerial;
-                    LODOP.PRINT_INITA(6, 0, "120mm", "93.2mm", "泰和门诊发票打印");
+                    LODOP.PRINT_INITA(6, 0, "120mm", height, "泰和门诊发票打印");
                     //设置默认打印机
                     LODOP.SET_PRINTER_INDEX(printIndex);
                     LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "120mm");
-                    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "93.2mm");
-                    LODOP.SET_PRINT_PAGESIZE(1, "120mm", "93.2mm", "CreateCustomPage");
+                    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", height);
+                    LODOP.SET_PRINT_PAGESIZE(1, "120mm", height, "CreateCustomPage");
                     LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
                     LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
                     LODOP.ADD_PRINT_TEXT("6mm", "0mm", "45mm", "3mm", "湖南泰和医院管理有限公司");