|
|
@@ -664,7 +664,7 @@ function initFeeTable() {
|
|
|
str += '<button type="button" class="registration-no-color-foot-button"title="支付明细" onclick="depositFileList(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ')"><i class="fa fa-th-list"></i></button>';
|
|
|
if(fpVsesionNo == 1){
|
|
|
str += '<button type="button" class="registration-no-color-foot-button"title="电子发票作废" onclick="uploadMzInvoice(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo +',2'+ ')"><i class="fa fa-mail-reply-all"></i></button>';
|
|
|
- str += '<button type="button" class="registration-no-color-foot-button"title="下载已作废的电子发票" onclick="openDzfpDownModal(\'' + row.mzyReqrec.patientId + '\',' + row.mzyReqrec.times +',\'' + row.mzyReqrec.serialNo + '\'' + ')"><i class="fa fa-download"></i></button>';
|
|
|
+ str += '<button type="button" class="registration-no-color-foot-button"title="下载已作废的电子发票" onclick="openDzfpDownModal(\'' + row.patientId + '\',' + row.times +',\'' + row.serialNo + '\'' + ')"><i class="fa fa-download"></i></button>';
|
|
|
}
|
|
|
// str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
|
|
|
return str;
|
|
|
@@ -1841,8 +1841,10 @@ function saveConfirmFee() {
|
|
|
let dyTgId = $("#dyTgId").val();
|
|
|
var jsonData = JSON.parse('{"patientId":"","times":"","receiptNo":"","mzDepositFiles":[]}');
|
|
|
var patientId = $("#patientIdHaveTally").val();
|
|
|
+ var name = $("#nameHaveTally").val();
|
|
|
var times = $("#timesHaveTally").val();
|
|
|
var receiptNo = $("#receiptNoHaveTally").val();
|
|
|
+ var realMoney = $("#realMoney").val();
|
|
|
jsonData.patientId = patientId;
|
|
|
jsonData.times = times;
|
|
|
jsonData.receiptNo = receiptNo;
|
|
|
@@ -1888,11 +1890,13 @@ function saveConfirmFee() {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- if(fpVsesionNo == 0){
|
|
|
- prn1Print(patientId, times, true, res.receiptNo);
|
|
|
- }else {
|
|
|
- printDzfp(patientId, times,res.receiptNo,0)
|
|
|
- }
|
|
|
+// if(fpVsesionNo == 0){
|
|
|
+// prn1Print(patientId, times, true, res.receiptNo);
|
|
|
+// }else {
|
|
|
+// printDzfp(patientId, times,res.receiptNo,0)
|
|
|
+// }
|
|
|
+ //进入电子发票开票
|
|
|
+ printDzfp(patientId, times,res.receiptNo,0,name,realMoney)
|
|
|
successMesage(res);
|
|
|
closeConfirmFeeModal();
|
|
|
//缴费成功后清空全局参数
|
|
|
@@ -1956,13 +1960,30 @@ function saveProject() {
|
|
|
}
|
|
|
|
|
|
//上传电子发票
|
|
|
-function printDzfp(patientId,times,receiptNo,loadingFlag) {
|
|
|
+function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount) {
|
|
|
if(loadingFlag == 1){
|
|
|
$("#dzfpLoadingModal").modal('show');
|
|
|
}
|
|
|
postAjaxJsonHttpRequst("/thmz/getNewAllSerialForThisTime",{patientId:patientId,times:times,receiptNo:receiptNo},true,function (res) {
|
|
|
if(res.code == 0){
|
|
|
- uploadMzInvoice(patientId,times,receiptNo,1,localStorage.getItem("userName"))
|
|
|
+ var typeFlag = "1";
|
|
|
+ postAjaxJsonHttpRequst("/thmz/uploadMzInvoice",{patientId:patientId,times:times,receiptNo:receiptNo,ghFlag:false,typeFlag:typeFlag},true,function (rs) {
|
|
|
+ if(typeFlag == 1){
|
|
|
+ $("#dzfpLoadingModal").modal('hide');
|
|
|
+ }
|
|
|
+ if(rs.code ==0){
|
|
|
+ successMesageSimaple("电子发票上传成功,即将打印!")
|
|
|
+ setTimeout(function(){
|
|
|
+ prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount);
|
|
|
+ },1000)
|
|
|
+ if(typeFlag == 1){
|
|
|
+ initFeeTable();
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ errorMesage(rs);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}else {
|
|
|
$("#dzfpLoadingModal").modal('hide');
|
|
|
errorMesage(res)
|
|
|
@@ -2007,56 +2028,6 @@ console.log("dfds",patientId,times,serialNo)
|
|
|
// dzfp_typeFlag = typeFlag;
|
|
|
$("#dzfpDownModal").modal();
|
|
|
}
|
|
|
-
|
|
|
-/**
|
|
|
- * @param type 1 打印二维码 2 下载pdf
|
|
|
- */
|
|
|
-function downOrPrintDzfp(type) {
|
|
|
-//console.log("11111111111111111111111111111")
|
|
|
-//console.log("dfds",dzfp_patientId,dzfp_times,dzfp_serialNo)
|
|
|
- downloadDzfp(dzfp_patientId,dzfp_times,dzfp_serialNo,type)
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-//下载电子发票
|
|
|
-function downloadDzfp(patientId,times,serialNo,type) {
|
|
|
- setPrint();
|
|
|
- postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:patientId,times:times,serialNo:serialNo},true,function (res) {
|
|
|
- if(res.code == 0){
|
|
|
- $("#dzfpDownModal").modal("hide");
|
|
|
- if(res.data.resUrl){
|
|
|
- console.log("11111111111111111111111111111",type)
|
|
|
- if(type == 2 || !stringNotBlank(type)){
|
|
|
- window.open(res.data.resUrl)
|
|
|
- }else {
|
|
|
- //打印二维码
|
|
|
- let height = "70mm"
|
|
|
- let bkimgWidth = "110mm"
|
|
|
- LODOP = getLodop();
|
|
|
- LODOP.PRINT_INITA(6, 0, bkimgWidth, height, hospitalName+"门诊电子发票二维码打印");
|
|
|
- //设置默认打印机
|
|
|
- LODOP.SET_PRINTER_INDEX(printIndex);
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_WIDTH", bkimgWidth);
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", height);
|
|
|
- LODOP.SET_PRINT_PAGESIZE(1,bkimgWidth, height, "CreateCustomPage");
|
|
|
- LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊电子发票二维码");//对新建的纸张重命名
|
|
|
- LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
|
|
|
- LODOP.ADD_PRINT_TEXT("6mm", "3mm", "60mm", "3mm", hospitalName+"发票二维码");
|
|
|
- LODOP.ADD_PRINT_IMAGE("10mm", "3mm", "50mm", "50mm", createInMemoryQR(res.data.resUrl));
|
|
|
-// LODOP.PRINT();
|
|
|
- LODOP.PREVIEW();
|
|
|
- }
|
|
|
- } else {
|
|
|
- errorMesage("未获取到电子发票,请重新上传发票!");
|
|
|
- }
|
|
|
-
|
|
|
- }else {
|
|
|
- errorMesage(res)
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 直接打印发票
|
|
|
* @param patientId
|