Exemplo n.º 1
0
 public clsCtl_ShowReports()
 {
     objSvc              = new clsDcl_ShowReports();
     m_objAge            = new clsBrithdayToAge();
     objCalPatientCharge = new clsCalcPatientCharge(string.Empty, "0001", 100, this.m_objComInfo.m_strGetHospitalTitle(), 1, 100);
     //
     // TODO: 在此处添加构造函数逻辑
     //
 }
Exemplo n.º 2
0
        private void m_mthShowInfoByInvoiceNO(string strInvoiceNO)
        {
            clsCalcPatientCharge objCalcPatienCharge = null;

            objCalcPatienCharge = new clsCalcPatientCharge("", "", 1, this.m_objComInfo.m_strGetHospitalTitle(), 0, 100);
            int setValue = clsPublic.m_intGetSysParm("0320");

            //显示发票明细信息
            objCalcPatienCharge.m_mthGetChargeItemByInvoiceID(strInvoiceNO, m_objViewer.m_lstItemsInfo, "2");
            if (setValue == 0)
            {
                //显示发票信息
                m_objViewer.m_repInvoiceInfo.ReportSource = objCalcPatienCharge.m_mthPrintChargePreview(strInvoiceNO, "2", out objPC);
                if (objPC.Reprintprninfo.Trim() != "")
                {
                    objPC.Reprintprninfo = "*REPEAT(" + objPC.Reprintprninfo + ")*";
                }
                m_objViewer.dwInvoice.Visible = false;
            }
            else
            {
                objCalcPatienCharge.m_mthPrintChargePreview(strInvoiceNO, "2", out objPC);

                DataTable chargeType  = null;
                DataTable computation = null;
                if (objPC.Reprintprninfo.Trim() == "")
                {
                    m_objManage.m_lngChargeItemTypeByInvoice(objPC.m_strInvoiceNO, out chargeType);
                }
                else
                {
                    m_objManage.m_lngChargeItemTypeByInvoice(objPC.Reprintprninfo, out chargeType);
                }
                if (objPC.Reprintprninfo.Trim() != "")
                {
                    objPC.Reprintprninfo = "*REPEAT(" + objPC.Reprintprninfo + ")*";
                }
                m_objManage.m_lngComputationByScope("8", out computation);


                m_objViewer.dwInvoice.LibraryList      = Application.StartupPath + "\\pb_Invioce.pbl";
                m_objViewer.dwInvoice.DataWindowObject = "d_op_invoice_prt_new";
                m_objViewer.dwInvoice.SetRedrawOff();
                m_objViewer.dwInvoice.Reset();
                m_objViewer.dwInvoice.InsertRow(0);


                List <String> arryText = clsNewInvoicPrint.s_arryGetInvoiceInfo(objPC, objCalcPatienCharge.ObjMain.m_mthCreatDataTable(objPC), chargeType, computation, -1);
                foreach (String text in arryText)
                {
                    m_objViewer.dwInvoice.Modify(text);
                }

                m_objViewer.dwInvoice.Visible = true;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 重打发票
        /// </summary>
        /// <param name="seqid"></param>
        /// <param name="invono"></param>
        public void m_mthReprintinvo()
        {
            if (dtChargeCheck.Rows.Count == 0 || this.m_objViewer.DgChargeCheck.CurrentCell.RowNumber < 0)
            {
                return;
            }

            string seqid = this.m_objViewer.DgChargeCheck[this.m_objViewer.DgChargeCheck.CurrentRowIndex, 3].ToString();

            if (seqid == "")
            {
                return;
            }

            this.m_objViewer.Cursor = Cursors.WaitCursor;
            clsCalcPatientCharge objCalPatientCharge = new clsCalcPatientCharge(this.m_objComInfo.m_strGetHospitalTitle());

            com.digitalwave.Utility.clsLogText objlog = new com.digitalwave.Utility.clsLogText();
            objlog.LogError(this.m_objComInfo.m_strGetHospitalTitle());
            objCalPatientCharge.m_mthReprintinvoice(seqid, this.m_objViewer.LoginInfo.m_strEmpID, 0);
            this.m_objViewer.Cursor = Cursors.Default;
        }
Exemplo n.º 4
0
        private void btnBulkPrint_Click(object sender, EventArgs e)
        {
            if (dgvInvoList_NotPrint.Rows.Count == 0)
            {
                return;
            }

            string strEmpId      = this.LoginInfo.m_strEmpID;   // iCareBase.Global.Info.clsGlobalValueTool.m_ObjGlobalEmployee.m_strEMPID_CHR;
            string strEmpName    = this.LoginInfo.m_strEmpName; // iCare.Base.Global.Info.clsGlobalValueTool.m_ObjGlobalEmployee.m_strLASTNAME_VCHR;
            string strHospitalId = "";                          //iCare.Base.Global.Info.clsGlobalValueTool.m_OblGlobalHospital.m_strHOSPITALID_CHR;
            Dictionary <string, string> dictRePrint = new Dictionary <string, string>();

            foreach (DataGridViewRow dgvrTemp in dgvInvoList_NotPrint.Rows)
            {
                if (dgvrTemp.Tag == null)
                {
                    continue;
                }
                DataRow dtrTemp      = dgvrTemp.Tag as DataRow;
                string  strSeqId     = dtrTemp["seqid"].ToString().Trim();
                string  strOldInvoNo = dtrTemp["invono"].ToString().Trim();
                if (!dictRePrint.ContainsKey(strSeqId))
                {
                    dictRePrint.Add(strSeqId, strOldInvoNo);
                }
            }
            if (dictRePrint.Count == 0)
            {
                return;
            }

            frmInvoiceBulkPrint_SetInvoRange objForm = new frmInvoiceBulkPrint_SetInvoRange(strHospitalId, strEmpId, strEmpName, dictRePrint.Count);

            if (objForm.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            if (objForm.NewRePrintInvoList.Count == 0)
            {
                return;
            }

            clsPublic.PlayAvi("findFILE.avi", "正在打印,请稍候...");
            try
            {
                // iCare.Opd.Base.Gui.clsOpdInvoice objInvo = new iCare.Opd.Base.Gui.clsOpdInvoice();
                //   iCare.Opd.Print.Invoice.Gui.clsChargeInvoicePrinter objInvo_prt = new iCare.Opd.Print.Invoice.Gui.clsChargeInvoicePrinter();
                string strCurrentNewRePrintInvo = "";
                int    intHavePrintCount        = 0;
                int    intIndex = -1;
                foreach (string strSeqId in dictRePrint.Keys)
                {
                    ++intIndex;
                    if (intIndex >= objForm.NewRePrintInvoList.Count)
                    {
                        break;
                    }
                    string strOldInvo        = dictRePrint[strSeqId];
                    string strNewRePrintInvo = objForm.NewRePrintInvoList[intIndex];
                    // clsOPChargeSvc objOpchar = new clsOPChargeSvc();
                    //  long l = objOpchar.m_lngSaveinvorepeatprninfo("1", strSeqId, strOldInvo, strNewRePrintInvo, strEmpId);
                    ////  long l = objInvo.m_lngSaveRepeatPrintInoviceNo(strHospitalId, 1, strSeqId, strOldInvo, strNewRePrintInvo, strEmpId);
                    //  if (l != 1)
                    //  {
                    //      MessageBox.Show("保存发票重打信息失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //      break;
                    //  }

                    try
                    {
                        if (strNewRePrintInvo == "" || strNewRePrintInvo == null)
                        {
                            // objInvo_prt.RepeatNo = "+";//+代表重打发票
                        }
                        else
                        {
                            //  objInvo_prt.RepeatNo = strNewRePrintInvo;
                        }
                        clsOPChargeQuerySvc  objChar             = new clsOPChargeQuerySvc();
                        clsCalcPatientCharge objCalPatientCharge = new clsCalcPatientCharge(objChar.m_mthGetHospitalName());
                        objCalPatientCharge.m_mthBulkReprintinvoice(strSeqId, strEmpId, 0, strOldInvo, strNewRePrintInvo);

                        //  objInvo_prt.m_mthPrint(strOldInvo, false);
                    }
                    catch
                    {
                        MessageBox.Show("新发票号(" + strNewRePrintInvo + ")已保存发票重打信息成功,但打印失败,请凭该发票号使用重打发票功能重打该发票。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        break;
                    }
                    strCurrentNewRePrintInvo = strNewRePrintInvo;
                    ++intHavePrintCount;
                }

                if (strCurrentNewRePrintInvo != "")
                {
                    //  bool blnSuccess = objInvo.m_blnSaveCurrInvoiceNo(strEmpId, strCurrentNewRePrintInvo, 3);
                    //if (!blnSuccess)
                    //{
                    //    MessageBox.Show("保存当前发票号码失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //}
                }

                //   iCare.Pub.Utility.clsMessageBox.Show("已成功打印" + intHavePrintCount + "张发票,尚未打印" + (dictRePrint.Count - intHavePrintCount) + "张发票。");

                //objInvo = null;
                // objInvo_prt = null;
            }
            finally
            {
                clsPublic.CloseAvi();
            }

            btnQuery_Click(null, null);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 恢复发票
        /// </summary>
        public void m_ResumeTicket()
        {
            //如果发票号为空则返回
            if (m_objViewer.txtInvoice.Text.Trim() == "")
            {
                MessageBox.Show(m_objViewer, "发票号不正,或此发票不是退票!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (this.m_objViewer.LoginInfo != null)
            {
                m_strOperatorID = this.m_objViewer.LoginInfo.m_strEmpID;
            }
            //验证发票是否存在
            clsT_opr_outpatientrecipeinv_VO objResult = null;
            long lngRet = m_objManage.m_lngGetInfoByNoForResume(m_objViewer.txtInvoice.Text.Trim(), out objResult);

            if (lngRet <= 0)
            {
                //退票失败!
                MessageBox.Show(m_objViewer, "恢复失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (objResult == null || objResult.m_intSTATUS_INT != 2)          //发票状态  [发票状态:1-有效、0-作废、2-退票]
            {
                //发票不是已经退的发票,恢复失败!
                MessageBox.Show(m_objViewer, "此发票不是退票,恢复失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            //发票未审核,不能退票
            DataTable dt;

            lngRet = m_objManage.m_mthGetInvoiceAuditingInfo(m_objViewer.txtInvoice.Text.Trim(), out dt, 2);
            if (dt.Rows.Count == 0)
            {
                //发票未审核,不能退票
                MessageBox.Show(m_objViewer, "发票未审核,不能恢复!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            //发票如果含有药品,不能退票
            bool blContains = false;

            lngRet = m_objManage.m_CheckIsContainMed(m_objViewer.txtInvoice.Text.Trim(), ref blContains);
            if (lngRet <= 0)
            {
                MessageBox.Show(m_objViewer, "恢复失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                if (blContains)
                {
                    MessageBox.Show(m_objViewer, "发票含有药品,不能恢复", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            string Seqid = "";

            lngRet = m_objManage.m_lngResumeTicket(m_objViewer.txtInvoice.Text.Trim(), m_strOperatorID, ref Seqid);
            if (lngRet <= 0)
            {
                //退票失败!
                MessageBox.Show(m_objViewer, "恢复失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                //退票成功!
                MessageBox.Show(m_objViewer, "发票恢复成功!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (IsPrintInvoice)
                {
                    this.m_objViewer.Cursor = Cursors.WaitCursor;
                    clsCalcPatientCharge objCalPatientCharge = new clsCalcPatientCharge(this.m_objComInfo.m_strGetHospitalTitle());
                    objCalPatientCharge.m_mthReprintinvoice(Seqid, this.m_objViewer.LoginInfo.m_strEmpID, 2);
                    this.m_objViewer.Cursor = Cursors.Default;
                }
            }
            //清空发票号
            m_EmptyInput();
        }
Exemplo n.º 6
0
        private void m_mthPrint()
        {
            clsCalcPatientCharge objTemp = new clsCalcPatientCharge("", "", 0, _objPC.m_strHospitalName, 1, 100);

            objTemp.m_mthPrintCharge(_objPC);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 发票退回
        /// </summary>
        public void m_ReturnTicket()
        {
            //如果发票号为空则返回
            if (m_objViewer.txtInvoice.Text.Trim() == "")
            {
                MessageBox.Show("请输入发票号!", "错误提示框");
                return;
            }

            if (this.m_objViewer.LoginInfo != null)
            {
                m_strOperatorID = this.m_objViewer.LoginInfo.m_strEmpID;
            }
            //验证发票是否存在
            clsT_opr_outpatientrecipeinv_VO objResult = null;
            long lngRet = m_objManage.m_lngGetInfoByNoForReturn(m_objViewer.txtInvoice.Text.Trim(), out objResult);

            if (lngRet <= 0)
            {
                //退票失败!
                MessageBox.Show(m_objViewer, "退票失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (objResult == null || objResult.m_intSTATUS_INT != 1)
            {
                //发票不是有效的发票,退票失败!
                MessageBox.Show(m_objViewer, "此发票不是有效的发票,退票失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            //发票未审核,不能退票
            DataTable dt;

            lngRet = m_objManage.m_mthGetInvoiceAuditingInfo(m_objViewer.txtInvoice.Text.Trim(), out dt, 1);
            if (dt.Rows.Count == 0)
            {
                //发票未审核,不能退票
                MessageBox.Show(m_objViewer, "发票未审核,不能退票!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            //			else
            //			{
            //			this.m_objViewer.lbeAuding.Text ="审核人:"+dt.Rows[0]["LASTNAME_VCHR"].ToString().Trim();
            //			}
            // by huafeng.xiao\
            //添加对药品退药的检测
            string m_strStatus = string.Empty;

            lngRet = m_objManage.m_lngReturnTicketCheckOutSendMed(m_objViewer.txtInvoice.Text.Trim(), out m_strStatus);
            if (lngRet > 0)
            {
                if (m_strStatus.Trim() == "1" || m_strStatus.Trim() == "2")
                {
                }
                else
                {
                    MessageBox.Show(m_objViewer, "当前发票已经配发药,请先退药!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            else
            {
                MessageBox.Show(m_objViewer, "检测药品信息失败,请与管理员联系!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string Seqid   = "";
            int    intFlag = 0;

            lngRet = m_objManage.m_lngReturnTicket(m_objViewer.txtInvoice.Text.Trim(), m_strOperatorID, ref Seqid, intFlag);
            if (lngRet <= 0)
            {
                //退票失败!
                MessageBox.Show(m_objViewer, "退票失败!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                //新增嵌入式社保退费,函数里有查询到社保数据才去作退费接口的调用
                //自助机的经办人由于是 711014_ZZZD03  --- 711014_ZZZD01 ,而系统的登录号是截取后面6位,所以在退费的时候要将这些补充完整
                string strEmpNo = this.m_objViewer.LoginInfo.m_strEmpNo;
                if (this.m_objViewer.LoginInfo.m_strEmpNo.Contains("ZZZD"))
                {
                    strEmpNo = "711014_" + strEmpNo;
                }
                clsCtl_YBChargeMZCancel clsYbChargeMZCancel = new clsCtl_YBChargeMZCancel();
                clsYbChargeMZCancel.m_lngCSYBChargeCancel(m_objViewer.txtCardID.Text.Trim(), strEmpNo);
                //退票成功!
                MessageBox.Show(m_objViewer, "退票成功!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (IsPrintInvoice)
                {
                    this.m_objViewer.Cursor = Cursors.WaitCursor;
                    clsCalcPatientCharge objCalPatientCharge = new clsCalcPatientCharge(this.m_objComInfo.m_strGetHospitalTitle());
                    objCalPatientCharge.m_mthReprintinvoice(Seqid, this.m_objViewer.LoginInfo.m_strEmpID, 1);
                    this.m_objViewer.Cursor = Cursors.Default;
                }
            }
            //清空发票号
            m_EmptyInput();
        }