Ejemplo n.º 1
0
        /// <summary>
        /// 根据物理号获得发票信息 [已经退票的发票 发票状态:1-有效、0-作废、2-退票]
        /// </summary>
        /// <param name="p_NO_STR">物理号 [最大三位]</param>
        /// <param name="p_objResult"></param>
        /// <returns></returns>
        public long m_lngGetInfoBySeqidForResume(string p_NO_STR, out clsT_opr_outpatientrecipeinv_VO p_objResult)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsInvoiceManageSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsInvoiceManageSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsInvoiceManageSvc));
            lngRes = objSvc.m_lngGetInfoBySeqidForResume(objPrincipal, p_NO_STR, out p_objResult);
            objSvc.Dispose();
            return(lngRes);
        }
Ejemplo n.º 2
0
        public void m_mthAudingInvoice()
        {
            //验证发票是否存在
            clsT_opr_outpatientrecipeinv_VO objResult = null;
            long lngRet = m_objManage.m_lngGetInfoByNoForReturn(m_objViewer.txtInvoice.Text.Trim(), out objResult);

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

            //if (!string.IsNullOrEmpty(this.m_strCreatInvoEmpID) && m_strCreatInvoEmpID.Trim().CompareTo(this.m_objViewer.LoginInfo.m_strEmpID) !=0)
            //{
            //    switch (this.m_strOperateLevel)
            //    {
            //        case "0":
            //            break;
            //        case "1":
            //           if( MessageBox.Show("发票不属于当前登录用户所开,是否确认审核?","系统提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information,MessageBoxDefaultButton.Button2) !=DialogResult.Yes)
            //            {
            //                return;
            //            }
            //            break;
            //        case "2":
            //            MessageBox.Show("发票不属于当前登录用户所开,不能审核当前发票", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //            return;
            //            //break;
            //        default:
            //            break;
            //    }
            //}

            frmAudingInvoice frmObj = new frmAudingInvoice(m_objViewer.txtInvoice.Text.Trim(), "1");

            frmObj.DataServer           = this.m_objManage;
            frmObj.m_blnUseByInvoReturn = true;
            frmObj.m_strInvoCreatorID   = m_strCreatInvoEmpID;
            frmObj.m_strLimitLevel      = this.m_strOperateLevel;
            if (frmObj.ShowDialog() == DialogResult.OK)
            {
                this.m_objViewer.lbeAuding.Text = "审核人:" + frmObj.AudingName;
            }
        }
Ejemplo n.º 3
0
        public void m_mthAudingInvoice()
        {
            //验证发票是否存在
            clsT_opr_outpatientrecipeinv_VO objResult = null;
            long lngRet = m_objManage.m_lngGetInfoByNoForResume(m_objViewer.txtInvoice.Text.Trim(), out objResult);

            if (objResult == null || objResult.m_intSTATUS_INT != 2)
            {
                //发票不是有效的发票,退票失败!
                MessageBox.Show(m_objViewer, "此发票不是有效的发票!", "错误提示框", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            frmAudingInvoice frmObj = new frmAudingInvoice(m_objViewer.txtInvoice.Text.Trim(), "2");

            frmObj.DataServer = this.m_objManage;
            if (frmObj.ShowDialog() == DialogResult.OK)
            {
                this.m_objViewer.lbeAuding.Text = "审核人:" + frmObj.AudingName;
            }
        }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
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();
        }