|  | @@ -1565,7 +1565,7 @@ function initClinicForException(patientId, times, payMark, receiptNo) {
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 提示有记账记录
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | -function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
 | 
	
		
			
				|  |  | +function tipHaveTally(data, patientId, times, name, receiptNo) {
 | 
	
		
			
				|  |  |      addOrderLock(patientId,times,null)
 | 
	
		
			
				|  |  |      closeConfirmFeeModal();
 | 
	
		
			
				|  |  |      if (patientId == null || patientId == "") {
 | 
	
	
		
			
				|  | @@ -1576,7 +1576,6 @@ function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
 | 
	
		
			
				|  |  |      $("#dataIdHaveTally").val(data);
 | 
	
		
			
				|  |  |      $("#timesHaveTally").val(times);
 | 
	
		
			
				|  |  |      $("#receiptNoHaveTally").val(receiptNo);
 | 
	
		
			
				|  |  | -    $("#doctorNameHaveTally").val(doctorName);
 | 
	
		
			
				|  |  |      saveFeeGzzf()
 | 
	
		
			
				|  |  |      // postAjaxJsonHttpRequst("/thmz/queryCountYbZf",{"patientId": patientId, "times": times},true,function (rs) {
 | 
	
		
			
				|  |  |      //     if (rs == '401' || rs == 401) {
 | 
	
	
		
			
				|  | @@ -1598,12 +1597,20 @@ function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //收费时保存个账支付选择
 | 
	
		
			
				|  |  |  function saveFeeGzzf() {
 | 
	
		
			
				|  |  | +    var param = {
 | 
	
		
			
				|  |  | +        "patientId": $("#patientIdHaveTally").val(),
 | 
	
		
			
				|  |  | +        "times": $("#timesHaveTally").val(),
 | 
	
		
			
				|  |  | +        "receiptNo": $("#receiptNoHaveTally").val(),
 | 
	
		
			
				|  |  | +        "readCardType": $('input[name="mztczfSiReadCardType"]:checked').val(),
 | 
	
		
			
				|  |  | +        "readCardResult": $("#readCardResult").val(),
 | 
	
		
			
				|  |  | +        "busCardInfo": $("#pBusiCardInfo").val()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      $.ajax({
 | 
	
		
			
				|  |  |          type: "POST",
 | 
	
		
			
				|  |  |          url: '/thmz/getTmFee',
 | 
	
		
			
				|  |  |          contentType: "application/json;charset=UTF-8",
 | 
	
		
			
				|  |  |          dataType: "json",
 | 
	
		
			
				|  |  | -        data: JSON.stringify({"patientId": $("#patientIdHaveTally").val(), "times": $("#timesHaveTally").val(), "receiptNo": $("#receiptNoHaveTally").val()}),
 | 
	
		
			
				|  |  | +        data: JSON.stringify(param),
 | 
	
		
			
				|  |  |          headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
 | 
	
		
			
				|  |  |          async: false,
 | 
	
		
			
				|  |  |          success: function (res) {
 | 
	
	
		
			
				|  | @@ -1845,7 +1852,6 @@ function saveConfirmFee() {
 | 
	
		
			
				|  |  |      var name = $("#nameHaveTally").val();
 | 
	
		
			
				|  |  |      var times = $("#timesHaveTally").val();
 | 
	
		
			
				|  |  |      var receiptNo = $("#receiptNoHaveTally").val();
 | 
	
		
			
				|  |  | -    var doctorName = $("#doctorNameHaveTally").val();
 | 
	
		
			
				|  |  |      var realMoney = $("#realMoney").val();
 | 
	
		
			
				|  |  |      jsonData.patientId = patientId;
 | 
	
		
			
				|  |  |      jsonData.times = times;
 | 
	
	
		
			
				|  | @@ -1898,7 +1904,7 @@ function saveConfirmFee() {
 | 
	
		
			
				|  |  |  //                    printDzfp(patientId, times,res.receiptNo,0)
 | 
	
		
			
				|  |  |  //                }
 | 
	
		
			
				|  |  |                  //进入电子发票开票
 | 
	
		
			
				|  |  | -                printDzfp(patientId, times,res.receiptNo,0,name,realMoney,doctorName)
 | 
	
		
			
				|  |  | +                printDzfp(patientId, times,res.receiptNo,0,name,realMoney)
 | 
	
		
			
				|  |  |                  successMesage(res);
 | 
	
		
			
				|  |  |                  closeConfirmFeeModal();
 | 
	
		
			
				|  |  |                  //缴费成功后清空全局参数
 | 
	
	
		
			
				|  | @@ -1962,13 +1968,10 @@ function saveProject() {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //上传电子发票
 | 
	
		
			
				|  |  | -//function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName,chargeDate) {
 | 
	
		
			
				|  |  | -function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName) {
 | 
	
		
			
				|  |  | +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){
 | 
	
		
			
				|  |  |          var typeFlag = "1";
 | 
	
	
		
			
				|  | @@ -1979,7 +1982,7 @@ function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName)
 | 
	
		
			
				|  |  |                  if(rs.code ==0){
 | 
	
		
			
				|  |  |                      successMesageSimaple("电子发票上传成功,即将打印!")
 | 
	
		
			
				|  |  |                      setTimeout(function(){
 | 
	
		
			
				|  |  | -                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount,doctorName);
 | 
	
		
			
				|  |  | +                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount);
 | 
	
		
			
				|  |  |                      },3000)
 | 
	
		
			
				|  |  |                      if(typeFlag == 1){
 | 
	
		
			
				|  |  |                          initFeeTable();
 | 
	
	
		
			
				|  | @@ -2008,20 +2011,6 @@ function uploadMzInvoice(patientId,times,receiptNo,typeFlag) {
 | 
	
		
			
				|  |  |          if(typeFlag == 1){
 | 
	
		
			
				|  |  |              $("#dzfpLoadingModal").modal('hide');
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -//        if(rs.code ==0){
 | 
	
		
			
				|  |  | -//            successMesageSimaple("电子发票上传成功,即将打印!")
 | 
	
		
			
				|  |  | -//            setTimeout(function(){
 | 
	
		
			
				|  |  | -//                prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount,doctorName);
 | 
	
		
			
				|  |  | -//            },3000)
 | 
	
		
			
				|  |  | -//            if(typeFlag == 1){
 | 
	
		
			
				|  |  | -//                            initFeeTable();
 | 
	
		
			
				|  |  | -//                        }
 | 
	
		
			
				|  |  | -//            if(typeFlag == 1){
 | 
	
		
			
				|  |  | -//                initFeeTable();
 | 
	
		
			
				|  |  | -//            }
 | 
	
		
			
				|  |  | -//        }else {
 | 
	
		
			
				|  |  | -//            errorMesage(rs);
 | 
	
		
			
				|  |  | -//        }
 | 
	
		
			
				|  |  |          if(rs.code ==0){
 | 
	
		
			
				|  |  |              successMesageSimaple("电子发票上传成功!")
 | 
	
		
			
				|  |  |              if(typeFlag == 1){
 | 
	
	
		
			
				|  | @@ -2338,23 +2327,6 @@ function printCommon(url, patientId, times, chargeFeeFlag) {
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -//下载电子发票
 | 
	
		
			
				|  |  | -function downloadDzfp() {
 | 
	
		
			
				|  |  | -    postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:dzfp_patientId,times:dzfp_times,serialNo:dzfp_serialNo},true,function (res) {
 | 
	
		
			
				|  |  | -        if(res.code == 0){
 | 
	
		
			
				|  |  | -            $("#dzfpDownModal").modal("hide");
 | 
	
		
			
				|  |  | -            if(res.data.resUrl){
 | 
	
		
			
				|  |  | -                window.open(res.data.resUrl)
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                errorMesage("未获取到电子发票,请重新上传发票!");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        }else {
 | 
	
		
			
				|  |  | -            errorMesage(res)
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 打印发票通用方法
 | 
	
		
			
				|  |  |   * @param patientId
 | 
	
	
		
			
				|  | @@ -2365,7 +2337,7 @@ function downloadDzfp() {
 | 
	
		
			
				|  |  |   * 直接打印发票
 | 
	
		
			
				|  |  |   * @param patientId
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | -function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
 | 
	
		
			
				|  |  | +function prn1PrintAndQRCode(patientId, times,serialNo,name,fee) {
 | 
	
		
			
				|  |  |  //    getInvoiceBase64(patientId,times,serialNo)
 | 
	
		
			
				|  |  |  //    setPrint();
 | 
	
		
			
				|  |  |  //    var height = "93.15mm";
 | 
	
	
		
			
				|  | @@ -2387,30 +2359,6 @@ function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
 | 
	
		
			
				|  |  |  //    LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
 | 
	
		
			
				|  |  |  //    LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
 | 
	
		
			
				|  |  |  //    LODOP.ADD_PRINT_TEXT("6mm", "0mm", "55mm", "3mm", hospitalName);
 | 
	
		
			
				|  |  | -    //获取项目集合
 | 
	
		
			
				|  |  | -    var params = {
 | 
	
		
			
				|  |  | -        billItemCode:'012',
 | 
	
		
			
				|  |  | -        patientId:patientId,
 | 
	
		
			
				|  |  | -        times:times,
 | 
	
		
			
				|  |  | -        payMark:0,
 | 
	
		
			
				|  |  | -        receiptNo:'1',
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -//    initChargeDetailTablePublic('/thmz/getMzChargeDetailByBillItem', $('#charge_detail_table'), queryParamsForDetail);
 | 
	
		
			
				|  |  | -//    var projectList = [];
 | 
	
		
			
				|  |  | -    $("#printProjectName").empty();
 | 
	
		
			
				|  |  | -    postAjaxJsonHttpRequst("/thmz/getMzChargeDetailByBillItem",params,true,function (res) {
 | 
	
		
			
				|  |  | -        if(res.code == 0){
 | 
	
		
			
				|  |  | -        res.data.forEach((item,index)=>{
 | 
	
		
			
				|  |  | -//            projectList.add({
 | 
	
		
			
				|  |  | -//                name:item.name,
 | 
	
		
			
				|  |  | -//                fee:item.chargeAmount
 | 
	
		
			
				|  |  | -//            })
 | 
	
		
			
				|  |  | -            var html = '<div style="font-size:15px;line-height:15px;float:left;width:150px;"><span style="width:105px;display:inline-block;overflow:hidden;white-space: nowrap;" id="printProjectName'+(index+1)+'">'+item.tcName+'</span><span style="margin-left: 5px;line-height:15px;" id="printProjectFee1">'+item.amount+'</span><br /></div>'
 | 
	
		
			
				|  |  | -            $('#printProjectName').append(html);
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  |      postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:patientId,times:times,serialNo:serialNo},true,function (dzfp) {
 | 
	
		
			
				|  |  |          if(dzfp.code == 0){
 | 
	
		
			
				|  |  |              if(dzfp.data.resUrl){
 | 
	
	
		
			
				|  | @@ -2420,15 +2368,13 @@ function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
 | 
	
		
			
				|  |  |                      width: 1, //线宽
 | 
	
		
			
				|  |  |                      height: 30, //条码高度
 | 
	
		
			
				|  |  |                      displayValue: true, //是否显示文字信息
 | 
	
		
			
				|  |  | -                    fontSize: 14,
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |                  $("#printDate1").text(name);
 | 
	
		
			
				|  |  |                  $("#printDate2").text(fee);
 | 
	
		
			
				|  |  |                  $("#printDate3").text(dzfp.data.fpNo);
 | 
	
		
			
				|  |  |                  $("#printDate4").text(dzfp.data.opCode);
 | 
	
		
			
				|  |  |                  $("#printDate5").text(dzfp.data.blueIssueDate);
 | 
	
		
			
				|  |  | -                console.log("doctorName",doctorName)
 | 
	
		
			
				|  |  | -                $("#printDate6").text(doctorName);
 | 
	
		
			
				|  |  | +                $("#printDate5").text(dzfp.data.blueIssueDate);
 | 
	
		
			
				|  |  |                  let src = createInMemoryQR(dzfp.data.resUrl);
 | 
	
		
			
				|  |  |                  let wxPayQrCardHtml =`<img src="${src}" style="width: 100px;height: 100px"/><div style="width: 140px;margin-top: 2px;"></div>`;
 | 
	
		
			
				|  |  |                  $("#dzfpImg").html(wxPayQrCardHtml);
 | 
	
	
		
			
				|  | @@ -3201,7 +3147,7 @@ function saveRefundFee(refundType) {
 | 
	
		
			
				|  |  |                          if(fpVsesionNo == 0){
 | 
	
		
			
				|  |  |                              prn1Print(res.patientId, res.times, false, 1);
 | 
	
		
			
				|  |  |                          }else {
 | 
	
		
			
				|  |  | -//                            printDzfp(res.patientId, res.times,1,0)
 | 
	
		
			
				|  |  | +                            printDzfp(res.patientId, res.times,1,0)
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else {
 | 
	
	
		
			
				|  | @@ -3964,9 +3910,12 @@ function chargeFeeForMztcbl() {
 | 
	
		
			
				|  |  |      var receiptNo = $("#mzblReceiptNo").val();
 | 
	
		
			
				|  |  |      var doctorName = $("#doctorNameHaveTally").val();
 | 
	
		
			
				|  |  |      var realMoney = $("#realMoney").val();
 | 
	
		
			
				|  |  | +    var readCardType = $('input[name="mztczfSiReadCardType"]:checked').val();
 | 
	
		
			
				|  |  | +    var readCardResult = $("#readCardResult").val();
 | 
	
		
			
				|  |  | +    var busCardInfo = $("#pBusiCardInfo").val()
 | 
	
		
			
				|  |  |      $.ajax({
 | 
	
		
			
				|  |  |          type: "GET",
 | 
	
		
			
				|  |  | -        url: '/thmz/chargeFeeForMztcbl?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo,
 | 
	
		
			
				|  |  | +        url: '/thmz/chargeFeeForMztcbl?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo + "&readCardType=" + readCardType + "&readCardResult=" + readCardResult + "&busCardInfo=" + busCardInfo,
 | 
	
		
			
				|  |  |          contentType: "application/json;charset=UTF-8",
 | 
	
		
			
				|  |  |          dataType: "json",
 | 
	
		
			
				|  |  |          headers: {
 |