pengjingzhao 3 tháng trước cách đây
mục cha
commit
0241359e97

+ 1 - 1
src/main/resources/static/js/mz/registration.js

@@ -1886,6 +1886,7 @@ function prn1Print(patientId, times) {
     var height = "93.15mm";
     var bkimgWidth = "120mm"
     if(fpVsesionNo == 1){
+        //电子发票
         height = "60mm"
         bkimgWidth = "110mm"
     }
@@ -1969,7 +1970,6 @@ function prn1Print(patientId, times) {
     });
 };
 
-
 /**
  * 销卡
  * @param data

+ 31 - 0
src/main/resources/static/js/mz/toll_administration.js

@@ -155,6 +155,36 @@ function downloadEBill(serialNo) {
         }
     })
 };
+
+function issueEBill(patientId,amount,name,doctorCode) {
+    $.ajax({
+        type: "POST",
+        url: 'http://130.150.161.72:9206/thyy/api/public/ebill/invoicehisissue',
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        data: JSON.stringify({
+            "timestamp":this.getCurrentTime(),
+            "busseqno":"2025070314143716059_896",
+            "bustype": "02",
+            "totalAmount":amount,
+            "payerPartyType":"1",
+            "payerPartyName":name,
+            "bizcode":"2025070314143716059_896",
+            "handlingPerson":doctorCode,
+
+
+        }),
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            console.log('issueEBill',res);
+            if(res.code == 1 && res.data.invoice_url){
+
+                // successMesageSimaple("电子发票查询成功!")
+            }
+        }
+    })
+};
+
 /**
  * 列表类型按钮切换事件
  * @param object
@@ -601,6 +631,7 @@ function initFeeTable() {
                         }
                         if(fpVsesionNo == 1){
                             str += '<button type="button" class="registration-no-color-foot-button" title="上传电子发票" onclick="printDzfp(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo +',1'+ ');" style="color: #35D082;"><i class="fa fa-upload"></i></button>';
+                            str += '<button type="button" class="registration-no-color-foot-button" title="开具电子发票" onclick="issueEBill(\'' + row.patientId + '\',' + row.amount + ',' + row.name + ',' + row.doctorCode + ');" style="color: #35D082;"><i class="fa fa-sign-in"></i></button>';
                             str += '<button type="button" class="registration-no-color-foot-button"title="下载电子发票" onclick="openDzfpDownModal(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ',1'+')"><i class="fa fa-download"></i></button>';
                             str += '<button type="button" class="registration-no-color-foot-button"title="查询电子发票" onclick="getEBill(\'' + row.serialNo+ '\',)"><i class="fa fa-search"></i></button>';
                             str += '<button type="button" class="registration-no-color-foot-button"title="下载电子发票" onclick="downloadEBill(\'' + row.serialNo+ '\',)"><i class="fa fa-download"></i></button>';