Ver código fonte

发票打印调整

hurugang 5 anos atrás
pai
commit
6f84a17a72

+ 2 - 0
src/main/resources/static/js/menu.js

@@ -1,4 +1,6 @@
 var content_url=null;
+//发票计数器
+var countReceiot=0;
 $(function (){
     if(localStorage.getItem("token")==undefined){
         window.location.href='/thmz/login/view'

+ 0 - 2
src/main/resources/static/js/registration.js

@@ -9,8 +9,6 @@ var pageIndex = 0;
 var LODOP; //声明为全局变量
 //默认打印机下标
 var printIndex = -1;
-//发票计数器
-var countReceiot=0;
 var TableInit = function () {
     var oTableInit = new Object();
     //初始化Table

+ 8 - 3
src/main/resources/static/js/registration_list.js

@@ -2019,6 +2019,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,
@@ -2034,14 +2038,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", "93mm", "泰和门诊发票打印");
+                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", "93mm");
-                LODOP.SET_PRINT_PAGESIZE(1, "120mm", "93mm", "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", "湖南泰和医院管理有限公司");

+ 0 - 2
src/main/resources/static/js/toll_administration.js

@@ -4,8 +4,6 @@ var LODOP; //声明为全局变量
 var printIndex = -1;
 //选中的要退的费用收费编码
 var chargeItemCodes =null;
-//发票计数器
-var countReceiot=0;
 $(function () {
     //默认光标在卡号输入框
     $("#cardNo").focus();