|  | @@ -1565,7 +1565,7 @@ function initClinicForException(patientId, times, payMark, receiptNo) {
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 提示有记账记录
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | -function tipHaveTally(data, patientId, times, name, receiptNo) {
 | 
	
		
			
				|  |  | +function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
 | 
	
		
			
				|  |  |      addOrderLock(patientId,times,null)
 | 
	
		
			
				|  |  |      closeConfirmFeeModal();
 | 
	
		
			
				|  |  |      if (patientId == null || patientId == "") {
 | 
	
	
		
			
				|  | @@ -1576,6 +1576,7 @@ function tipHaveTally(data, patientId, times, name, receiptNo) {
 | 
	
		
			
				|  |  |      $("#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) {
 | 
	
	
		
			
				|  | @@ -1852,6 +1853,7 @@ 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;
 | 
	
	
		
			
				|  | @@ -1904,7 +1906,7 @@ function saveConfirmFee() {
 | 
	
		
			
				|  |  |  //                    printDzfp(patientId, times,res.receiptNo,0)
 | 
	
		
			
				|  |  |  //                }
 | 
	
		
			
				|  |  |                  //进入电子发票开票
 | 
	
		
			
				|  |  | -                printDzfp(patientId, times,res.receiptNo,0,name,realMoney)
 | 
	
		
			
				|  |  | +                printDzfp(patientId, times,res.receiptNo,0,name,realMoney,doctorName)
 | 
	
		
			
				|  |  |                  successMesage(res);
 | 
	
		
			
				|  |  |                  closeConfirmFeeModal();
 | 
	
		
			
				|  |  |                  //缴费成功后清空全局参数
 | 
	
	
		
			
				|  | @@ -1968,7 +1970,7 @@ function saveProject() {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //上传电子发票
 | 
	
		
			
				|  |  | -function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount) {
 | 
	
		
			
				|  |  | +function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName) {
 | 
	
		
			
				|  |  |      if(loadingFlag == 1){
 | 
	
		
			
				|  |  |          $("#dzfpLoadingModal").modal('show');
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -1982,7 +1984,7 @@ function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount) {
 | 
	
		
			
				|  |  |                  if(rs.code ==0){
 | 
	
		
			
				|  |  |                      successMesageSimaple("电子发票上传成功,即将打印!")
 | 
	
		
			
				|  |  |                      setTimeout(function(){
 | 
	
		
			
				|  |  | -                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount);
 | 
	
		
			
				|  |  | +                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount,doctorName);
 | 
	
		
			
				|  |  |                      },3000)
 | 
	
		
			
				|  |  |                      if(typeFlag == 1){
 | 
	
		
			
				|  |  |                          initFeeTable();
 | 
	
	
		
			
				|  | @@ -2021,7 +2023,22 @@ function uploadMzInvoice(patientId,times,receiptNo,typeFlag) {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +//下载电子发票
 | 
	
		
			
				|  |  | +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)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  var dzfp_patientId ;
 | 
	
		
			
				|  |  |  var dzfp_times ;
 | 
	
	
		
			
				|  | @@ -2337,7 +2354,8 @@ function printCommon(url, patientId, times, chargeFeeFlag) {
 | 
	
		
			
				|  |  |   * 直接打印发票
 | 
	
		
			
				|  |  |   * @param patientId
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | -function prn1PrintAndQRCode(patientId, times,serialNo,name,fee) {
 | 
	
		
			
				|  |  | +function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  //    getInvoiceBase64(patientId,times,serialNo)
 | 
	
		
			
				|  |  |  //    setPrint();
 | 
	
		
			
				|  |  |  //    var height = "93.15mm";
 | 
	
	
		
			
				|  | @@ -2359,48 +2377,82 @@ function prn1PrintAndQRCode(patientId, times,serialNo,name,fee) {
 | 
	
		
			
				|  |  |  //    LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
 | 
	
		
			
				|  |  |  //    LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
 | 
	
		
			
				|  |  |  //    LODOP.ADD_PRINT_TEXT("6mm", "0mm", "55mm", "3mm", hospitalName);
 | 
	
		
			
				|  |  | -    postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:patientId,times:times,serialNo:serialNo},true,function (dzfp) {
 | 
	
		
			
				|  |  | -        if(dzfp.code == 0){
 | 
	
		
			
				|  |  | -            if(dzfp.data.resUrl){
 | 
	
		
			
				|  |  | -                JsBarcode('#barcode', patientId, {
 | 
	
		
			
				|  |  | -                    renderer: "svg",
 | 
	
		
			
				|  |  | -                    lineColor: '#000000', //线条颜色
 | 
	
		
			
				|  |  | -                    width: 1, //线宽
 | 
	
		
			
				|  |  | -                    height: 30, //条码高度
 | 
	
		
			
				|  |  | -                    displayValue: true, //是否显示文字信息
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | -                $("#printDate1").text(name);
 | 
	
		
			
				|  |  | -                $("#printDate2").text(fee);
 | 
	
		
			
				|  |  | -                $("#printDate3").text(dzfp.data.fpNo);
 | 
	
		
			
				|  |  | -                $("#printDate4").text(dzfp.data.opCode);
 | 
	
		
			
				|  |  | -                $("#printDate5").text(dzfp.data.blueIssueDate);
 | 
	
		
			
				|  |  | -                $("#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);
 | 
	
		
			
				|  |  | -                setPrint();
 | 
	
		
			
				|  |  | -                LODOP = getLodop();
 | 
	
		
			
				|  |  | -                //设置默认打印机
 | 
	
		
			
				|  |  | -                LODOP.SET_PRINTER_INDEX(printIndex);
 | 
	
		
			
				|  |  | -                LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
 | 
	
		
			
				|  |  | -                LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "192mm");
 | 
	
		
			
				|  |  | -                LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "97mm");
 | 
	
		
			
				|  |  | -                LODOP.SET_PRINT_PAGESIZE(1, "192mm", "97mm", "CreateCustomPage");
 | 
	
		
			
				|  |  | -                LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
 | 
	
		
			
				|  |  | -                var strStyle = "<style>table{width: 170mm;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse;padding: 8px;}</style>"
 | 
	
		
			
				|  |  | -                LODOP.ADD_PRINT_HTM("0mm", "8mm", "140mm", "380mm", strStyle + document.getElementById("report_table").innerHTML);
 | 
	
		
			
				|  |  | -                LODOP.PREVIEW();
 | 
	
		
			
				|  |  | -//                LODOP.ADD_PRINT_IMAGE("70mm", "3mm", "50mm", "50mm", createInMemoryQR(dzfp.data.resUrl));
 | 
	
		
			
				|  |  | -//                console.log("img",createInMemoryQR(dzfp.data.resUrl))
 | 
	
		
			
				|  |  | +//获取项目集合
 | 
	
		
			
				|  |  | +    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)=>{
 | 
	
		
			
				|  |  | +            console.log("item",item.tcName,item.amount)
 | 
	
		
			
				|  |  | +    //            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="printProjectFee'+(index+1)+'">'+item.amount+'</span><br /></div>'
 | 
	
		
			
				|  |  | +                $('#printProjectName').append(html);
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                errorMesage("未获取到电子发票,请重新上传发票!");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        }else {
 | 
	
		
			
				|  |  | -            errorMesage(res)
 | 
	
		
			
				|  |  | +            postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:patientId,times:times,serialNo:serialNo},true,function (dzfp) {
 | 
	
		
			
				|  |  | +                    if(dzfp.code == 0){
 | 
	
		
			
				|  |  | +                        if(dzfp.data.resUrl){
 | 
	
		
			
				|  |  | +                            JsBarcode('#barcode', patientId, {
 | 
	
		
			
				|  |  | +                                renderer: "svg",
 | 
	
		
			
				|  |  | +                                lineColor: '#000000', //线条颜色
 | 
	
		
			
				|  |  | +                                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);
 | 
	
		
			
				|  |  | +                            $("#printDate5").text(dzfp.data.blueIssueDate);
 | 
	
		
			
				|  |  | +                            $("#printDate6").text(doctorName);
 | 
	
		
			
				|  |  | +                            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);
 | 
	
		
			
				|  |  | +                            setPrint();
 | 
	
		
			
				|  |  | +                            LODOP = getLodop();
 | 
	
		
			
				|  |  | +                            //设置默认打印机
 | 
	
		
			
				|  |  | +                            LODOP.SET_PRINTER_INDEX(printIndex);
 | 
	
		
			
				|  |  | +                            LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
 | 
	
		
			
				|  |  | +                            LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "192mm");
 | 
	
		
			
				|  |  | +                            LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "97mm");
 | 
	
		
			
				|  |  | +                            LODOP.SET_PRINT_PAGESIZE(1, "192mm", "97mm", "CreateCustomPage");
 | 
	
		
			
				|  |  | +                            LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
 | 
	
		
			
				|  |  | +                            var strStyle = "<style>table{width: 170mm;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse;padding: 8px;}</style>"
 | 
	
		
			
				|  |  | +                            LODOP.ADD_PRINT_HTM("0mm", "8mm", "140mm", "380mm", strStyle + document.getElementById("report_table").innerHTML);
 | 
	
		
			
				|  |  | +                            LODOP.PREVIEW();
 | 
	
		
			
				|  |  | +            //                LODOP.ADD_PRINT_IMAGE("70mm", "3mm", "50mm", "50mm", createInMemoryQR(dzfp.data.resUrl));
 | 
	
		
			
				|  |  | +            //                console.log("img",createInMemoryQR(dzfp.data.resUrl))
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                        } else {
 | 
	
		
			
				|  |  | +                            errorMesage("未获取到电子发票,请重新上传发票!");
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    }else {
 | 
	
		
			
				|  |  | +                        errorMesage(res)
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +        errorMesage("未获取到收费项目,请重试!");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function createInMemoryQR(url) {
 |