/// <summary> /// 设置现金发票打印内容 /// </summary> /// <param name="regInfo">挂号信息</param> /// <param name="invoice">发票主表信息</param> /// <param name="alInvoiceDetail">发票明细信息</param> /// <param name="alFeeItemList">费用明细信息</param> /// <param name="isPreview">是否预览模式</param> /// <returns></returns> private int SetMZFPPrintValueOther() { try { ucMZFP ucReceipt = (ucMZFP)c; int otherIdx = 0; while (alName.Count > 0) { if (otherIdx < 3) { Label lName = GetFeeNameLable("lblOtherInvoiceNO" + otherIdx.ToString(), lblPrint); lName.Text = invoiceOther.Invoice.ID; lName = GetFeeNameLable("lblOtherName" + otherIdx.ToString(), lblPrint); lName.Text = regInfoOther.Name; lName = GetFeeNameLable("lblOtherDate" + otherIdx.ToString(), lblPrint); lName.Text = invoiceOther.PrintTime.ToShortDateString(); lName = GetFeeNameLable("lblOtherDoctorInfoTempletDeptName" + otherIdx.ToString(), lblPrint); lName.Text = regInfoOther.DoctorInfo.Templet.Dept.Name; lName = GetFeeNameLable("lblOtherFeeName" + otherIdx.ToString(), lblPrint); lName.Text = alName[0].ToString(); lName = GetFeeNameLable("lblOtherFeeInfo" + otherIdx.ToString(), lblPrint); lName.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(System.Convert.ToDecimal(alValue[0]), 2).PadLeft(9, ' '); otherIdx++; alName.RemoveAt(0); alValue.RemoveAt(0); } else { break; } } ucReceipt.lblScrap.Visible = true; ucReceipt.lblScrap1.Visible = true; ucReceipt.lblScrap.Text = "作废"; ucReceipt.lblScrap1.Text = "作废"; } catch (Exception ex) { return(-1); } return(0); }
/// <summary> /// 设置现金发票打印内容 /// </summary> /// <param name="regInfo">挂号信息</param> /// <param name="invoice">发票主表信息</param> /// <param name="alInvoiceDetail">发票明细信息</param> /// <param name="alFeeItemList">费用明细信息</param> /// <param name="isPreview">是否预览模式</param> /// <returns></returns> private int SetMZFPPrintValue( Neusoft.HISFC.Models.Registration.Register regInfo, Neusoft.HISFC.Models.Fee.Outpatient.Balance invoice, ArrayList alInvoiceDetail, ArrayList alFeeItemList, bool isPreview) { try { #region 设置发票打印内容 ucMZFP ucReceipt = (ucMZFP)c; #region 医疗机构 //ucReceipt.lblYiLiaoJiGou.Text = "阜新市新邱区第二人民医院"; #endregion #region 门诊号 ucReceipt.lblCardNO.Text = regInfo.PID.CardNO; ucReceipt.lblCardNO1.Text = regInfo.PID.CardNO; #endregion #region 打印时间 ucReceipt.lblDate.Text = invoice.PrintTime.ToString("yyyy MM dd"); ucReceipt.lblDateTime.Text = invoice.PrintTime.ToShortTimeString(); ucReceipt.lblDate1.Text = invoice.PrintTime.ToString("yyyy MM dd"); //ucReceipt.lblDateTime1.Text = invoice.PrintTime.ToShortTimeString(); #endregion #region 发票号 ucReceipt.lblInvoiceNO.Text = invoice.Invoice.ID; ucReceipt.lblInvoiceNO1.Text = invoice.Invoice.ID; #endregion #region 收费员 Neusoft.HISFC.BizLogic.Manager.Person person = new Neusoft.HISFC.BizLogic.Manager.Person(); string operUserCode = string.Empty; operUserCode = person.GetPersonByID(invoice.BalanceOper.ID).Name; ucReceipt.lblOperName.Text = operUserCode; ucReceipt.lblOperName1.Text = operUserCode; #endregion #region 合同单位 //if (invoice.Patient.Pact.PayKind.ID == "01" || invoice.Patient.Pact.PayKind.ID == "02") //{ ucReceipt.lblPactName.Text = regInfo.Pact.Name; ucReceipt.lblPactName1.Text = regInfo.Pact.Name; //} #endregion #region 姓名 ucReceipt.lblName.Text = regInfo.Name; ucReceipt.lblName1.Text = regInfo.Name; #endregion #region 科别 //Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList detFeeItemList = alFeeItemList[0] as Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList; //ucReceipt.lblExeDept.Text = detFeeItemList.ExecOper.Dept.Name; #endregion #region 处方医师 //ucReceipt.lblRecipeOperName.Text = regInfo.DoctorInfo.Templet.Dept .Name ; #endregion #region 费用大类 //票面信息 decimal[] FeeInfo = //---------------------1-----------2------------3------------4-------------5----------------- new decimal[15] { decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, //decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero, //decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero }; //票面信息 string[] FeeInfoName = //---------------------1-----------2------------3------------4-------------5----------------- new string[15] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, //string.Empty,string.Empty,string.Empty,string.Empty,string.Empty, //string.Empty,string.Empty,string.Empty,string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }; //统计大类项目可以直接取 for (int i = 0; i < alInvoiceDetail.Count; i++) { Neusoft.HISFC.Models.Fee.Outpatient.BalanceList detail = null; detail = (Neusoft.HISFC.Models.Fee.Outpatient.BalanceList)alInvoiceDetail[i]; if (detail.FeeCodeStat.SortID <= FeeInfo.Length) { FeeInfo[detail.FeeCodeStat.SortID - 1] += detail.BalanceBase.FT.TotCost; if (detail.FeeCodeStat.Name.Length > 5) { FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name.Substring(0, 5); } else { FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name; } // FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name.Substring(0,5); } } int feeInfoNameIdx = 0; int FeeInfoIndex = 0; foreach (decimal d in FeeInfo) {//测试用 //FeeInfo[FeeInfoIndex] = 999999.99m; //名称 Label lName = GetFeeNameLable("lblFeeName" + feeInfoNameIdx.ToString(), lblPrint); //值 Label lValue = GetFeeNameLable("lblFeeInfo" + feeInfoNameIdx.ToString(), lblPrint); if (lName != null) { if (FeeInfo[FeeInfoIndex] > 0) { //lName.Text = FeeInfoName[FeeInfoIndex] + "普通人工器官材料费"; //lName.Text = FeeInfoName[FeeInfoIndex] + ""; lValue.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2).PadLeft(9, ' '); //操作下一组控件 if (FeeInfoIndex > 2) { alName.Add(FeeInfoName[FeeInfoIndex]); alValue.Add(Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2)); } else { drugTotCost += FeeInfo[FeeInfoIndex]; } } } //名称 lName = GetFeeNameLable("lbl1FeeName" + feeInfoNameIdx.ToString(), lblPrint); //值 lValue = GetFeeNameLable("lbl1FeeInfo" + feeInfoNameIdx.ToString(), lblPrint); if (lName != null) { if (FeeInfo[FeeInfoIndex] > 0) { //lName.Text = FeeInfoName[FeeInfoIndex] + "普通人工器官材料费"; //lName.Text = FeeInfoName[FeeInfoIndex] + ""; lValue.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2).PadLeft(9, ' '); } } feeInfoNameIdx++; FeeInfoIndex++; } #endregion int otherIdx = 0; if (drugTotCost > 0) { ucReceipt.lblOtherInvoiceNO0.Text = invoice.Invoice.ID; ucReceipt.lblOtherName0.Text = regInfo.Name; ucReceipt.lblOtherDate0.Text = invoice.PrintTime.ToShortDateString(); ucReceipt.lblOtherDoctorInfoTempletDeptName0.Text = regInfo.DoctorInfo.Templet.Dept.Name; ucReceipt.lblOtherFeeName0.Text = "药费"; ucReceipt.lblOtherFeeInfo0.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(drugTotCost, 2).PadLeft(9, ' '); otherIdx++; } while (alName.Count > 0) { if (otherIdx < 3) { Label lName = GetFeeNameLable("lblOtherInvoiceNO" + otherIdx.ToString(), lblPrint); lName.Text = invoice.Invoice.ID; lName = GetFeeNameLable("lblOtherName" + otherIdx.ToString(), lblPrint); lName.Text = regInfo.Name; lName = GetFeeNameLable("lblOtherDate" + otherIdx.ToString(), lblPrint); lName.Text = invoice.PrintTime.ToShortDateString(); lName = GetFeeNameLable("lblOtherDoctorInfoTempletDeptName" + otherIdx.ToString(), lblPrint); lName.Text = regInfo.DoctorInfo.Templet.Dept.Name; lName = GetFeeNameLable("lblOtherFeeName" + otherIdx.ToString(), lblPrint); lName.Text = alName[0].ToString(); lName = GetFeeNameLable("lblOtherFeeInfo" + otherIdx.ToString(), lblPrint); lName.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(System.Convert.ToDecimal(alValue[0]), 2).PadLeft(9, ' '); otherIdx++; alName.RemoveAt(0); alValue.RemoveAt(0); } else { break; } } #region 医保信息 if (invoice.Patient.Pact.PayKind.ID == "02") { ucReceipt.lblSSN.Text = regInfo.SSN; ucReceipt.lblOwnCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OwnCost, 2); ucReceipt.lblPayCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PayCost, 2); ucReceipt.lblPubCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PubCost, 2); ucReceipt.lblOverCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OverCost, 2); ucReceipt.lblIndividualBalance.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance, 2); ucReceipt.lblSSN1.Text = regInfo.SSN; ucReceipt.lblOwnCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OwnCost, 2); ucReceipt.lblPayCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PayCost, 2); ucReceipt.lblPubCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PubCost, 2); //ucReceipt.lblOverCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OverCost, 2); ucReceipt.lblIndividualBalance1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance, 2); //-----1---------------------------2----------------3-----------------------4-----------------------5-----------------6---------------- //|医疗费总额TotCost|个人帐户支付金额PayCost|统筹支付金额PubCost|个人现金支付OwnCost|救助金支出金额OverCost|公务员补助支出金额OfficalCost //-----------------7------------------8-----------------------9----------- //|保健对象补贴支出BaseCost|离休人员统筹支出PubOwnCost|医院付担金额HosCost //-------------10-------------11----------------------12------------13------------------ //|上次进入统筹医疗费用累计|本次进入统筹医疗费用金额|上次个人帐户余额|个人自费金额 //----14---------------15-------------16--------------------------------17---------- //|乙类药品个人自理|起付标准自付金额|分段自理金额|超过封顶线个人自付金额|住院封顶线以上公务员补助支出金额 //----18---------------------------19------20--------------21-------------------- //|住院自付部分公务员补助支出金额|住院人次|工伤基金支付金额|生育基金支付金额| string[] temp = regInfo.SIMainInfo.Memo.Split('|'); ucReceipt.lblTemp20.Text = temp[20]; ucReceipt.lblTemp21.Text = temp[21]; ucReceipt.lbl1Temp20.Text = temp[20]; ucReceipt.lbl1Temp21.Text = temp[21]; ucReceipt.lblIndividualBalanceNew.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance - regInfo.SIMainInfo.PayCost, 2); ucReceipt.lblIndividualBalanceNew1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance - regInfo.SIMainInfo.PayCost, 2); } #endregion #region 小写总金额 ucReceipt.lblDownTotCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(invoice.FT.TotCost, 2); ucReceipt.lblDownTotCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(invoice.FT.TotCost, 2); #endregion #region 大写总金额 ucReceipt.lblUpTotCost.Text = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(invoice.FT.TotCost).PadLeft(10, ' '); ucReceipt.lblUpTotCost1.Text = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(invoice.FT.TotCost).PadLeft(10, ' '); #endregion #endregion } catch (Exception ex) { return(-1); } return(0); }