/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_RequestReport entity = base.EntityData != null ? base.EntityData as B_RequestReport : new B_RequestReport(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); #region 弹出窗口 //抄送 this.OASelectUC1.UCSelectType = "2"; this.OASelectUC1.UCDeptIDControl = this.txtChaoSongDeptID.ClientID; this.OASelectUC1.UCDeptUserIDControl = this.txtChaoSongID.ClientID; this.OASelectUC1.UCDeptAndUserControl = this.txtChaoSong.ClientID; this.OASelectUC1.UCTemplateName = base.TemplateName; this.OASelectUC1.UCFormName = "抄送"; //分发范围 this.OASelectUC2.UCSelectType = "2"; this.OASelectUC2.UCDeptIDControl = this.txtChuanYueDeptIDs.ClientID; this.OASelectUC2.UCDeptUserIDControl = this.txtChuanYueRenIDs.ClientID; this.OASelectUC2.UCDeptAndUserControl = this.txtChuanYueRenYuan.ClientID; this.OASelectUC2.UCTemplateName = base.TemplateName; this.OASelectUC2.UCFormName = "分发范围"; //核稿人 this.OASelectUC3.UCSelectType = "1"; this.OASelectUC3.UCDeptUserIDControl = this.txtHeGaoRenID.ClientID; this.OASelectUC3.UCDeptUserNameControl = this.txtHeGaoRen.ClientID; this.OASelectUC3.UCIsSingle = "1"; this.OASelectUC3.UCTemplateName = base.TemplateName; this.OASelectUC3.UCFormName = "核稿人"; if (this.ddlBianZhiBuMen.Items.Count > 0) { this.OASelectUC3.UCShowDeptID = OADept.GetChildDeptIDSConSelf(this.ddlBianZhiBuMen.SelectedValue, -1); } this.OASelectUC3.UCLevel = "3"; //传阅 this.OASelectUC4.UCDeptIDControl = this.hDeptID.ClientID; this.OASelectUC4.UCDeptNameControl = this.txtDeptName.ClientID; this.OASelectUC4.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.OASelectUC4.UCRoleUserIDControl = this.hUserID.ClientID; this.OASelectUC4.UCRoleUserNameControl = this.txtUserName.ClientID; this.OASelectUC4.UCSelectType = "0"; this.OASelectUC4.UCDeptShowType = "1010"; //承办部门 this.OASelectUC5.UCSelectType = "0"; this.OASelectUC5.UCDeptIDControl = this.txtChengBanBuMenID.ClientID; this.OASelectUC5.UCDeptNameControl = this.txtChengBanBuMen.ClientID; this.OASelectUC5.UCIsSingle = "1"; this.OASelectUC5.UCLevel = "1"; this.OASelectUC5.UCDeptShowType = "1010"; #endregion OAControl controls = new OAControl(); if (!base.IsPreview) { this.txtZhuTi.ToolTip = "50字符以内"; this.txtNeiRong.ToolTip = "2000字符以内"; this.txtPiShiYiJian.ToolTip = "2000字符以内"; this.txtChengBanBuMen.ToolTip = "承办部门(处室)"; this.ddlZhuSong.ToolTip = "公司领导"; this.ddlFuZeRen.ToolTip = "部门负责人、部门领导、大于副处长"; this.ddlKeShiLingDao.ToolTip = "科室(部门负责人)"; this.ddlChengBanRen.ToolTip = "处室承办(处室下所有人包括科室),科室承办(科室下所有人)"; this.ddlBianZhiBuMen.ToolTip = "自己所属的处室"; this.txtHeGaoRen.ToolTip = this.ddlBianZhiBuMen.Items.Count > 0 ? (this.ddlBianZhiBuMen.SelectedItem.Text + "的成员") : string.Empty; } if (this.ddlType.SelectedValue == "请示") { FileTitle = "海南核电有限公司请示"; } else { FileTitle = "海南核电有限公司报告"; } //DateTime DirectorDate = DateTime.MinValue; //DateTime ChiefDate = DateTime.MinValue; //DateTime MemberDate = DateTime.MinValue; //string strDirector = string.Empty; //string strChief = string.Empty; //string strMember = string.Empty; //DataTable dt1 = null; //DataTable dt2 = null; //DataTable dt3 = null; ////承办时获取承办人和时间(兼容以前用) //if (base.StepName == ProcessConstString.StepName.RequestReportStepName.STEP_DIRECTOR || // base.StepName == ProcessConstString.StepName.RequestReportStepName.STEP_CHIEF || // base.StepName == ProcessConstString.StepName.RequestReportStepName.STEP_MEMBER) //{ // dt1 = FormsMethod.GetUndertakeInfo(base.ProcessID, ProcessConstString.StepName.RequestReportStepName.STEP_DIRECTOR, ProcessConstString.TemplateName.INSTUCTION_REPORT); // dt2 = FormsMethod.GetUndertakeInfo(base.ProcessID, ProcessConstString.StepName.RequestReportStepName.STEP_CHIEF, ProcessConstString.TemplateName.INSTUCTION_REPORT); // dt3 = FormsMethod.GetUndertakeInfo(base.ProcessID, ProcessConstString.StepName.RequestReportStepName.STEP_MEMBER, ProcessConstString.TemplateName.INSTUCTION_REPORT); // if (dt1.Rows.Count > 0) // { // DirectorDate = Convert.ToDateTime(dt1.Rows[0][1].ToString()); // strDirector = dt1.Rows[0][0].ToString(); // } // if (dt2.Rows.Count > 0) // { // ChiefDate = Convert.ToDateTime(dt2.Rows[0][1].ToString()); // strChief = dt2.Rows[0][0].ToString(); // } // if (dt3.Rows.Count > 0) // { // MemberDate = Convert.ToDateTime(dt3.Rows[0][1].ToString()); // strMember = dt3.Rows[0][0].ToString(); // } //} if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; this.ddlType.Attributes.Add("onchange", "SelectedChanged()"); if (string.IsNullOrEmpty(base.WorkItemID)) { this.lbJs.Text = "<script>ShowMyDiv();</script>"; } controls.EnableControls = new Control[] { this.OASelectUC1, this.OASelectUC3, this.btnTiJiaoQianFa, this.btnTiJiaoHeGao, this.btnSave }; controls.YellowControls = new Control[] { this.txtHeGaoRen, this.txtChaoSong }; break; #endregion #region 核稿 case ProcessConstString.StepName.RequestReportStepName.STEP_CHECK: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTiJiaoQianFa, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtHeGaoRen }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 签发 case ProcessConstString.StepName.RequestReportStepName.STEP_SIGN: this.btnFenFa.Attributes.Add("onclick", "javascript: if(!checkChaoSong()){return false;}else{DisableButtons();}"); controls.EnableControls = new Control[] { this.OASelectUC1, this.btnFenFa, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.ddlFuZeRen, this.txtHeGaoRen }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 部门会签 #endregion #region 主管领导审核 #endregion #region 秘书审核 case ProcessConstString.StepName.RequestReportStepName.STEP_MSVERIFY: controls.EnableControls = new Control[] { this.btnLingDaoPiShi, this.btnZhuRenShenHe, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen }; break; #endregion #region 主任审核 case ProcessConstString.StepName.RequestReportStepName.STEP_ZRVERIFY: controls.EnableControls = new Control[] { this.btnTongGuoShenHe, this.btnSave }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen }; break; #endregion #region 领导批示 case ProcessConstString.StepName.RequestReportStepName.STEPNAME_INSTRUCTION: controls.EnableControls = new Control[] { this.TdYiJian }; controls.DisEnableControls = new Control[] { this.TaTishi, this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen, this.txtTianJia }; break; #endregion #region 秘书分发 case ProcessConstString.StepName.RequestReportStepName.STEP_MSFF: this.btnChengBanFenFa.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); controls.EnableControls = new Control[] { this.OASelectUC4, this.OASelectUC5, this.tbChuanYue, this.btnChengBanFenFa, this.btnLingDaoPiShi, this.btnSave, this.txtChengBanBuMen }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen }; controls.YellowControls = new Control[] { this.txtDeptName, this.txtUserName }; break; #endregion #region 处室承办 case ProcessConstString.StepName.RequestReportStepName.STEP_DIRECTOR: //获取任务的部门领导 this.txtBuMenLingDao.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; ; this.txtBuMenLingDaoID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; controls.EnableControls = new Control[] { this.btnJiaoBanKeshi, this.btnJiaoBanRenYuan, this.btnWanCheng, this.btnSave, this.TrBanLiYiJian, this.TrChenBan }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen }; break; #endregion #region 科室承办 case ProcessConstString.StepName.RequestReportStepName.STEP_CHIEF: if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(DateFormat); } //else //{ // if (DirectorDate != DateTime.MinValue) // { // this.txtBuMenLingDao.Visible = false; // this.lblDirector.Visible = true; // this.lblDirector.Text = OAUser.GetUserName(strDirector) + strNewLine + DirectorDate.ToString(ConstString.DateFormat.Normal); // } //} controls.EnableControls = new Control[] { this.btnJiaoBanRenYuan, this.btnWanCheng, this.btnSave, this.TrBanLiYiJian, this.TrChenBan }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen, this.ddlKeShiLingDao }; break; #endregion #region 人员承办 case ProcessConstString.StepName.RequestReportStepName.STEP_MEMBER: if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(DateFormat); } //else //{ // //老数据 // if (DirectorDate != DateTime.MinValue) // { // this.txtBuMenLingDao.Visible = false; // this.lblDirector.Visible = true; // this.lblDirector.Text = OAUser.GetUserName(strDirector) + strNewLine + DirectorDate.ToString(ConstString.DateFormat.Normal); // } //} if (entity.SectionDate != DateTime.MinValue) { this.ddlKeShiLingDao.Visible = false; this.lblSection.Visible = true; this.lblSection.Text = entity.SectionLeader + strNewLine + entity.SectionDate.ToString(DateFormat); } //else //{ // if (ChiefDate != DateTime.MinValue) // { // this.ddlKeShiLingDao.Visible = false; // this.lblSection.Visible = true; // this.lblSection.Text = OAUser.GetUserName(strChief) + strNewLine + ChiefDate.ToString(ConstString.DateFormat.Normal); // } //} controls.EnableControls = new Control[] { this.btnWanCheng, this.btnSave, this.TrBanLiYiJian, this.TrChenBan }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen, this.ddlKeShiLingDao, this.ddlChengBanRen }; break; #endregion #region 承办审核 case ProcessConstString.StepName.RequestReportStepName.STEP_CBVERIFY: this.btnWanChengGuiDang.Attributes.Add("onclick", "javascript: if(!checkFenFa()){return false;}else{DisableButtons();}"); controls.EnableControls = new Control[] { this.OASelectUC2, this.btnWanChengGuiDang, this.btnSave, this.TrChuanYue }; controls.DisEnableControls = new Control[] { this.ddlZhuSong, this.ddlBianZhiBuMen, this.txtChaoSong, this.txtZhuTi, this.txtNeiRong, this.ddlFuZeRen, this.txtHeGaoRen, this.txtTianJia }; controls.YellowControls = new Control[] { this.txtChuanYueRenYuan }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { ucAttachment.UCIsEditable = false; FormsMethod.SetControlAll(this); #region 已承办的显示在lable上 if (base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR || base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF || base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER) { if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(DateFormat); } //else //{ // //老数据 // if (DirectorDate != DateTime.MinValue) // { // this.txtBuMenLingDao.Visible = false; // this.lblDirector.Visible = true; // this.lblDirector.Text = OAUser.GetUserName(strDirector) + strNewLine + DirectorDate.ToString(ConstString.DateFormat.Normal); // } //} if (entity.SectionDate != DateTime.MinValue) { this.ddlKeShiLingDao.Visible = false; this.lblSection.Visible = true; this.lblSection.Text = entity.SectionLeader + strNewLine + entity.SectionDate.ToString(DateFormat); } //else //{ // if (ChiefDate != DateTime.MinValue) // { // this.ddlKeShiLingDao.Visible = false; // this.lblSection.Visible = true; // this.lblSection.Text = OAUser.GetUserName(strChief) + strNewLine + ChiefDate.ToString(ConstString.DateFormat.Normal); // } //} if (entity.MemberDate != DateTime.MinValue) { this.ddlChengBanRen.Visible = false; this.lblMember.Visible = true; this.lblMember.Text = entity.Contractor + strNewLine + entity.MemberDate.ToString(DateFormat); } //else //{ // if (MemberDate != DateTime.MinValue) // { // this.ddlChengBanRen.Visible = false; // this.lblMember.Visible = true; // this.lblMember.Text = OAUser.GetUserName(strMember) + strNewLine + MemberDate.ToString(ConstString.DateFormat.Normal); // } //} } #endregion switch (base.StepName) { #region 领导批示 case ProcessConstString.StepName.RequestReportStepName.STEPNAME_INSTRUCTION: this.TaTishi.Visible = false; this.TdYiJian.Visible = true; break; #endregion #region 秘书分发 case ProcessConstString.StepName.RequestReportStepName.STEP_MSFF: this.tbChuanYue.Visible = true; break; #endregion #region 处室承办 case ProcessConstString.StepName.RequestReportStepName.STEP_DIRECTOR: this.tbChuanYue.Visible = true; this.TrChenBan.Visible = true; if (entity.DirectorDate != DateTime.MinValue) { this.txtChengBanRiQi.Text = entity.DirectorDate.ToString(DateFormat); } break; #endregion #region 科室承办 case ProcessConstString.StepName.RequestReportStepName.STEP_CHIEF: this.tbChuanYue.Visible = true; this.TrChenBan.Visible = true; if (entity.SectionDate != DateTime.MinValue) { this.txtChengBanRiQi.Text = entity.SectionDate.ToString(DateFormat); } break; #endregion #region 人员承办 case ProcessConstString.StepName.RequestReportStepName.STEP_MEMBER: this.tbChuanYue.Visible = true; this.TrChenBan.Visible = true; if (entity.MemberDate != DateTime.MinValue) { this.txtChengBanRiQi.Text = entity.MemberDate.ToString(DateFormat); } break; #endregion #region 承办审核 case ProcessConstString.StepName.RequestReportStepName.STEP_CBVERIFY: this.TrChuanYue.Visible = true; //查看自己办理公办 if (base.EntryAction == "4") { this.btnZhuiJiaFenFa.Visible = true; } break; #endregion } if (base.IsCanDevolve) { this.btn_GuiDang.Visible = true; if (base.IsDevolve) { this.btn_GuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); #region 弹出窗口 //抄送 this.OASelectUC1.UCSelectType = "2"; this.OASelectUC1.UCDeptIDControl = this.txtChaoSongDeptID.ClientID; this.OASelectUC1.UCDeptUserIDControl = this.txtChaoSongID.ClientID; this.OASelectUC1.UCDeptAndUserControl = this.txtChaoSong.ClientID; this.OASelectUC1.UCTemplateName = base.TemplateName; this.OASelectUC1.UCFormName = "抄送"; //分发范围 this.OASelectUC2.UCSelectType = "2"; this.OASelectUC2.UCDeptIDControl = this.txtChuanYueDeptIDs.ClientID; this.OASelectUC2.UCDeptUserIDControl = this.txtChuanYueRenIDs.ClientID; this.OASelectUC2.UCDeptAndUserControl = this.txtChuanYueRenYuan.ClientID; this.OASelectUC2.UCTemplateName = base.TemplateName; this.OASelectUC2.UCFormName = "分发范围"; #endregion OAControl controls = new OAControl(); if (!base.IsPreview) { this.txtPiShiYiJian.ToolTip = "2000字符以内"; this.ddlBianZhiBuMen.ToolTip = "自己所属的处室"; FileTitle = "海南核电有限公司出差(培训)申请单"; } if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtBianHao.ToolTip = "提交后自动生成"; if (string.IsNullOrEmpty(base.WorkItemID)) { this.lbJs.Text = "<script>ShowMyDiv();</script>"; } controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTiJiaoShenHe, this.btnSave }; controls.YellowControls = new Control[] { this.txtChaoSong }; if (this.SubmitStatus == 1) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZhuGuanLingDao, ddlChuLingDao }; } else if (this.SubmitStatus == 2) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlChuLingDao }; } else if (this.SubmitStatus == 3) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlZhuGuanLingDao }; } else { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng }; } break; #endregion #region 处领导审核 case ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 主管领导审核 case ProcessConstString.StepName.FinanceStepName.STEP_ChargeLeader: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 总经理审核 case ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 订票处 case ProcessConstString.StepName.FinanceStepName.STEP_BookingOffice: controls.EnableControls = new Control[] { this.OASelectUC1, this.txtShangWu, this.btnDingPiao, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtChuChaiRenWu, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceStepName.STEP_FeedBack: FormsMethod.SetControlAll(this); controls.EnableControls = new Control[] { this.OASelectUC1, this.btnApplyComplete, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { //ucAttachment.UCIsEditable = false; FormsMethod.SetControlAll(this); } }
protected override void SetControlStatus() { B_DJGTSend entity = base.EntityData != null ? base.EntityData as B_DJGTSend : new B_DJGTSend(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); ucDeptCounterSignComments.UCTemplateName = base.TemplateName; ucDeptCounterSignComments.UCProcessID = base.ProcessID; ucDeptCounterSignComments.UCWorkItemID = base.WorkItemID; ucDeptCounterSignComments.UCStepName = "部门会签"; ucLeadCounterSignComments.UCTemplateName = base.TemplateName; ucLeadCounterSignComments.UCProcessID = base.ProcessID; ucLeadCounterSignComments.UCWorkItemID = base.WorkItemID; ucLeadCounterSignComments.UCStepName = "领导会签"; //主送 this.ucMainSender.UCSelectType = "2"; this.ucMainSender.UCDeptAndUserControl = this.txtMainSender.ClientID; this.ucMainSender.UCTemplateName = base.TemplateName; this.ucMainSender.UCFormName = "主送"; //抄送 this.ucCopySender.UCSelectType = "2"; this.ucCopySender.UCDeptAndUserControl = this.txtCopySender.ClientID; this.ucCopySender.UCTemplateName = base.TemplateName; this.ucCopySender.UCFormName = "抄送"; //部门会签 this.ucDeptCounterSigns.UCUserIDControl = this.wfDeptSignIDs.ClientID; this.ucDeptCounterSigns.UCUserNameControl = this.txtDeptSigners.ClientID; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.PartyBranchSign; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.PartyBranchSign; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.TradeUnionBranchSign; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.YouthLeagueBranchSign; break; } this.ucDeptCounterSigns.UCIsSingle = false; //领导会签 this.ucRole.UCUserIDControl = this.wfLeaderSignIDs.ClientID; this.ucRole.UCUserNameControl = this.txtLeadSigners.ClientID; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.PartySign; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.PartySign; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.TradeUnionSign; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.YouthLeagueSign; break; } this.ucRole.UCIsSingle = false; //传阅 this.ucOUCirculate.UCDeptIDControl = this.hDeptID.ClientID; this.ucOUCirculate.UCDeptNameControl = this.txtDeptName.ClientID; this.ucOUCirculate.UCRoleUserIDControl = this.hUserID.ClientID; this.ucOUCirculate.UCRoleUserNameControl = this.txtUserName.ClientID; this.ucOUCirculate.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.ucOUCirculate.UCSelectType = "0"; this.ucOUCirculate.UCDeptShowType = "1010"; txtLeadSigners.Attributes.Add("readOnly", "readOnly"); txtDeptSigners.Attributes.Add("readOnly", "readOnly"); OAControl controls = new OAControl(); if (!base.IsPreview) { //this.txtDocumentTitle.ToolTip = "100字符以内"; //this.txtSubjectWord.ToolTip = "100字符以内"; //this.txtComment.ToolTip = "2000字符以内"; //this.txtShareCount.ToolTip = "正整数"; //this.txtSheetCount.ToolTip = "正整数"; string strCheckDraftToolTip = string.Empty; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: strCheckDraftToolTip = "党纪审稿组"; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: strCheckDraftToolTip = "党纪审稿组"; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: strCheckDraftToolTip = "工会审稿组"; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: strCheckDraftToolTip = "团委审稿组"; break; } this.ddlCheckDrafter.ToolTip = string.IsNullOrEmpty(this.ddlType.SelectedValue) ? "请先选择发文类型" : strCheckDraftToolTip; switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //是否显示撤销按钮 this.btnCancel.Visible = this.wfIsDeny.Text == "True"; //考虑代理人 this.txtDrafter.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.wfDrafterID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //this.txtPhoneNum.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.OfficePhone : entity.PhoneNum; controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ddlType, this.RedSpanCheckDrafter, this.RedSpanTitle, this.RedSpanMainSender, this.ddlCheckDrafter, this.ddlHostDept, this.txtPhoneNum, this.btnSave, this.btnCheckDraft }; break; #endregion #region 审稿 case ProcessConstString.StepName.SendStepName.STEP_CHECK: controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ucDeptCounterSigns, this.RedSpanTitle, this.RedSpanMainSender, this.btnSave, this.btnDeptSign, this.btnVerify, this.btnBack }; controls.YellowControls = new Control[] { this.txtDeptSigners }; controls.DisEnableControls = new Control[] { this.ddlType }; break; #endregion #region 部门会签 case ProcessConstString.StepName.SendStepName.STEP_DEPT: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.txtSubjectWord, this.ddlType, this.txtMainSender, this.txtCopySender, this.txtMyPrompt, this.txtSendDate }; break; #endregion #region 核稿 case ProcessConstString.StepName.SendStepName.STEP_VERIFY: //获取任务的秘书 this.txtSecretaryChecker.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.wfVerifierID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ucRole, this.RedSpanTitle, this.RedSpanSubjectWord, this.RedSpanMainSender, this.ddlSigner, this.txtLeadSigners, this.btnSave, this.btnLeadSign, this.btnSign, this.btnBack }; controls.DisEnableControls = new Control[] { this.ddlType }; controls.YellowControls = new Control[] { this.txtLeadSigners }; break; #endregion #region 领导会签 case ProcessConstString.StepName.SendStepName.STEP_LEADER: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.ddlType, this.ddlType, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt, this.txtSendDate }; break; #endregion #region 签发 case ProcessConstString.StepName.SendStepName.STEP_SIGN: this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnDistribution, this.btnBackVerify }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.ddlType, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt, this.txtSendDate }; break; #endregion #region 分发 case ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE: if (entity.IsHaveChecked == true) { this.btnCompleteAll.Visible = true; this.btnCompleteAll.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); } controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.trChuanYue, this.RedSpan_No, this.RedSpan_Year, this.RedSpan_Num, this.RedSpanTitle, this.RedSpanMainSender, this.TdYearNum, this.txtDocumentYear, this.txtDocumentNum, this.txtDocumentNo, this.txtShareCount, this.txtSheetCount, this.txtTypist, this.txtReChecker, this.btnSave, this.btnCheck, this.ucOUCirculate }; controls.DisEnableControls = new Control[] { this.ddlType }; controls.YellowControls = new Control[] { this.txtDeptName, this.txtUserName }; break; #endregion #region 校对 case ProcessConstString.StepName.SendStepName.STEP_PROOF: controls.EnableControls = new Control[] { this.RedSpanTitle, this.RedSpanMainSender, this.TdYearNum, this.txtPhoneNum, this.btnSave, this.btnComplete, this.ucMainSender, this.ucCopySender }; controls.DisEnableControls = new Control[] { this.ddlType, this.txtLeadSigners, this.txtDeptSigners }; this.txtChecker.Text = entity.ReceiveUserName; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE) { this.trChuanYue.Visible = true; this.TdYearNum.Visible = true; this.ucOUCirculate.Visible = false; } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DEPT || base.StepName == ProcessConstString.StepName.SendStepName.STEP_LEADER || base.StepName == ProcessConstString.StepName.SendStepName.STEP_SIGN) { this.TdSign.Visible = true; } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_PROOF) { this.TdYearNum.Visible = true; } if (base.IsPreview && base.IsCanDevolve) { this.btn_GuiDang.Visible = true; if (base.IsDevolve) { this.btn_GuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceZDBX entity = base.EntityData != null ? base.EntityData as B_FinanceZDBX : new B_FinanceZDBX(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); OAControl controls = new OAControl(); if (!base.IsPreview) { FileTitle = "海南核电有限公司出差(培训)申请单"; } if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtDocumentNo.ToolTip = "提交后自动生成"; controls.EnableControls = new Control[] { this.btnTiJiaoShenHe, this.btnSave }; controls.YellowControls = new Control[] { this.txtChaoSong }; if (txtIsManager.Text == "1") { controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlYanShouRen }; } else { controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlChuLingDao }; } break; #endregion #region 验收 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_KeZhang: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlYanShouRen }; break; #endregion #region 处长审核 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_ChuZhang: if (txtIsManager.Text != "1") { Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtLeiJiBaoXiaoJinE.Text) ? "0" : txtLeiJiBaoXiaoJinE.Text); Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtYuSuanJinE.Text) ? "0" : txtYuSuanJinE.Text); Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate)); if ((FeeFa - FeeYu) / FeeYu > Rate) { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZongJingLi }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao, ddlZhuGuanLingDao, ddlJingShouRen }; } else if (FeeFa > FeeYu) { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZhuGuanLingDao }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao, ddlZongJingLi, ddlJingShouRen }; } else { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao, ddlZhuGuanLingDao, ddlZongJingLi }; } } else { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZongJingLi, ddlZhuGuanLingDao }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao }; } break; #endregion #region 领导审核 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_LingDao: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlJingShouRen }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen }; break; #endregion #region 总经理审核 case ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen }; break; #endregion #region 财务 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_Finance: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTuiHui, this.btnSave, this.btnShenHeWanCheng }; controls.DisEnableControls = new Control[] { this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen, ddlJingShouRen }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceStepName.STEP_FeedBack: FormsMethod.SetControlAll(this); controls.EnableControls = new Control[] { this.OASelectUC1, this.btnApplyComplete, this.btnSave, txtTianJia }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { //ucAttachment.UCIsEditable = false; FormsMethod.SetControlAll(this); } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceZDBX entity = base.EntityData != null ? base.EntityData as B_FinanceZDBX : new B_FinanceZDBX(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); OAControl controls = new OAControl(); if (!base.IsPreview) { FileTitle = "海南核电有限公司出差(培训)申请单"; } if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtDocumentNo.ToolTip = "提交后自动生成"; controls.EnableControls = new Control[] { this.btnTiJiaoShenHe, this.btnSave }; controls.YellowControls = new Control[] { this.txtChaoSong }; if (txtIsManager.Text == "1") { controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlYanShouRen }; } else { controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlChuLingDao }; } break; #endregion #region 验收 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_KeZhang: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlZongJingLi, ddlZhuGuanLingDao, ddlJingShouRen, ddlYanShouRen }; break; #endregion #region 处长审核 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_ChuZhang: if (txtIsManager.Text != "1") { Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtLeiJiBaoXiaoJinE.Text) ? "0" : txtLeiJiBaoXiaoJinE.Text); Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtYuSuanJinE.Text) ? "0" : txtYuSuanJinE.Text); Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate)); if ((FeeFa - FeeYu) / FeeYu > Rate) { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZongJingLi }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao,ddlZhuGuanLingDao,ddlJingShouRen }; } else if (FeeFa > FeeYu) { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZhuGuanLingDao }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao, ddlZongJingLi, ddlJingShouRen }; } else { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao, ddlZhuGuanLingDao ,ddlZongJingLi}; } } else { controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlZongJingLi, ddlZhuGuanLingDao }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, ddlYanShouRen, ddlChuLingDao }; } break; #endregion #region 领导审核 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_LingDao: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, ddlJingShouRen }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen }; break; #endregion #region 总经理审核 case ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtYuSuanJinE, this.txtLeiJiBaoXiaoJinE, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen }; break; #endregion #region 财务 case ProcessConstString.StepName.FinanceZDBXStepName.STEP_Finance: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTuiHui, this.btnSave, this.btnShenHeWanCheng }; controls.DisEnableControls = new Control[] { this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao, this.ddlYanShouRen, ddlJingShouRen }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceStepName.STEP_FeedBack: FormsMethod.SetControlAll(this); controls.EnableControls = new Control[] { this.OASelectUC1, this.btnApplyComplete, this.btnSave, txtTianJia }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { //ucAttachment.UCIsEditable = false; FormsMethod.SetControlAll(this); } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_WorkRelation entity = base.EntityData != null ? base.EntityData as B_WorkRelation : new B_WorkRelation(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); //抄送 this.OASelectUC1.UCSelectType = "2"; this.OASelectUC1.UCDeptIDControl = this.txtChaoSongDeptIDs.ClientID; this.OASelectUC1.UCDeptUserIDControl = this.txtChaoSongIDs.ClientID; this.OASelectUC1.UCDeptAndUserControl = this.txtChaoSong.ClientID; this.OASelectUC1.UCTemplateName = base.TemplateName; this.OASelectUC1.UCFormName = "抄送"; //核稿人 this.OASelectUC2.UCSelectType = "1"; this.OASelectUC2.UCDeptUserIDControl = this.txtHeGaoRenID.ClientID; this.OASelectUC2.UCDeptUserNameControl = this.txtHeGaoRen.ClientID; this.OASelectUC2.UCIsSingle = "1"; this.OASelectUC2.UCTemplateName = base.TemplateName; this.OASelectUC2.UCFormName = "核稿人"; if (this.ddlBianZhiBuMen.Items.Count > 0) { this.OASelectUC2.UCShowDeptID = OADept.GetChildDeptIDSConSelf(this.ddlBianZhiBuMen.SelectedValue, -1); } //承办传阅 this.OASelectUC3.UCSelectType = "1"; this.OASelectUC3.UCDeptUserIDControl = this.txtChuanYueRenYuanID.ClientID; this.OASelectUC3.UCDeptUserNameControl = this.txtChuanYueRenYuan.ClientID; this.OASelectUC3.UCIsSingle = "0"; this.OASelectUC3.UCTemplateName = base.TemplateName; this.OASelectUC3.UCFormName = "承办传阅"; if (this.ddlZhuSong.Items.Count > 0) { this.OASelectUC3.UCShowDeptID = OADept.GetChildDeptIDSConSelf(this.ddlZhuSong.SelectedValue, -1); } OAControl controls = new OAControl(); //if (!base.IsPreview) //{ // this.txtZhuTi.ToolTip = "50字符以内"; // this.txtNeiRong.ToolTip = "2000字符以内"; // this.ddlFuZeRen.ToolTip = "部门负责人、部门领导、大于副处长"; // this.ddlKeShiLingDao.ToolTip = "科室(部门负责人)"; // this.ddlChengBanRen.ToolTip = "处室承办(处室下所有人包括科室),科室承办(科室下所有人)"; // this.ddlBianZhiBuMen.ToolTip = "自己所属的处室"; // this.txtHeGaoRen.ToolTip = this.ddlBianZhiBuMen.Items.Count > 0 ? (this.ddlBianZhiBuMen.SelectedItem.Text + "的成员") : string.Empty; //} if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: //部门会签按钮不可编辑 //this.ucBuMenHuiQian.UCIsDisEnable = true; this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; controls.EnableControls = new Control[] { this.btnTiJiaoQianFa, this.btnTiJiaoHeGao, this.btnSave, this.OASelectUC1, this.OASelectUC2 }; controls.YellowControls = new Control[] { this.txtChaoSong, this.txtHeGaoRen }; break; #endregion #region 核稿 case ProcessConstString.StepName.WorkRelationStepName.STEP_CHECK: ucBuMenHuiQian.UCIsAllowDel = base.IdentityID == 0 ? false : true;//可勾选checkbox逻辑删除已会签信息 controls.EnableControls = new Control[] { this.btnTiJiaoQianFa, this.btnTuiHui, this.btnSave, this.OASelectUC1, this.btnDeptSign }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 部门会签 case ProcessConstString.StepName.WorkRelationStepName.STEP_DEPTSIGN: this.ucAttachment.UCIsEditable = false;//附件不可编辑 this.ucBuMenHuiQian.UCIsDisEnable = true; trYiJianHead.Visible = YiJianInfoList.Count > 0; rptComment.DataSource = YiJianInfoList; rptComment.DataBind(); controls.EnableControls = new Control[] { this.tdDeptSign }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen, this.ddlFuZeRen, this.txtTianJia, this.txtNeiRong, this.txtChaoSong,this.txtZhuTi,this.ddlZhuSong }; break; #endregion #region 签发 case ProcessConstString.StepName.WorkRelationStepName.STEP_SIGN: this.btnFenFa.Attributes.Add("onclick", "javascript: if(!checkChaoSong()){return false;}else{DisableButtons();}"); this.ucBuMenHuiQian.UCIsDisEnable = true; controls.EnableControls = new Control[] { this.btnFenFa, this.btnTuiHui, this.btnSave, this.OASelectUC1 }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen, this.ddlFuZeRen }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 处室承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR: //获取任务的部门领导 this.txtBuMenLingDao.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtBuMenLingDaoID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; this.ucBuMenHuiQian.UCIsDisEnable = true; //if (base.SubAction != ProcessConstString.SubmitAction.ACTION_COMPLETE && this.cbISChuanYue.Checked == true) //{ //} //this.btnWanCheng.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); controls.EnableControls = new Control[] {this.tbChenBanChuanYue, this.tbChenBan, this.trBanLiYiJian, this.btnJiaoBanKeShi,this.btnJiaoBanRenYuan, this.btnWanCheng, this.btnSave,this.OASelectUC3 }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen, this.ddlFuZeRen, this.txtChaoSong, this.txtZhuTi,this.txtNeiRong,this.ddlZhuSong,this.OASelectUC1}; controls.YellowControls = new Control[] { this.txtChuanYueRenYuan }; break; #endregion #region 科室承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF: if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = true; this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(ConstString.DateFormat.Long); } this.ucBuMenHuiQian.UCIsDisEnable = true; //if (this.cbISChuanYue.Checked == true) //{ // this.btnWanCheng.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); //} controls.EnableControls = new Control[] {this.tbChenBan,this.tbChenBanChuanYue, this.trBanLiYiJian, this.btnJiaoBanRenYuan, this.btnWanCheng, this.btnSave,this.OASelectUC3 }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen, this.ddlFuZeRen, this.txtChaoSong, this.txtZhuTi,this.txtNeiRong, this.ddlZhuSong,this.ddlKeShiLingDao}; controls.YellowControls = new Control[] { this.txtChuanYueRenYuan }; break; #endregion #region 人员承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER: if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = true; this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(ConstString.DateFormat.Long); } this.ucBuMenHuiQian.UCIsDisEnable = true; if (entity.SectionDate != DateTime.MinValue) { this.ddlKeShiLingDao.Visible = false; this.lblSection.Visible = true; this.lblSection.Text = entity.SectionLeader + strNewLine + entity.SectionDate.ToString(ConstString.DateFormat.Long); } //if (this.cbISChuanYue.Checked == true) //{ // this.btnWanCheng.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); //} controls.EnableControls = new Control[] {this.tbChenBan,tbChenBanChuanYue,this.trBanLiYiJian, this.btnWanCheng, this.btnSave,this.OASelectUC3 }; controls.DisEnableControls = new Control[] { this.txtHeGaoRen, this.ddlBianZhiBuMen, this.ddlFuZeRen, this.ddlZhuSong, this.txtChaoSong, this.txtZhuTi,this.txtNeiRong,this.ddlChengBanRen, this.ddlKeShiLingDao }; controls.YellowControls = new Control[] { this.txtChuanYueRenYuan }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { this.ucAttachment.UCIsEditable = false; this.ucBuMenHuiQian.UCIsDisEnable = true; FormsMethod.SetControlAll(this); #region 已承办的显示在lable上 if (base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR || base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF || base.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER) { if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = true; this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(ConstString.DateFormat.Long); } if (entity.SectionDate != DateTime.MinValue) { this.ddlKeShiLingDao.Visible = false; this.lblSection.Visible = true; this.lblSection.Text = entity.SectionLeader + strNewLine + entity.SectionDate.ToString(ConstString.DateFormat.Long); } if (entity.MemberDate != DateTime.MinValue) { this.ddlChengBanRen.Visible = false; this.lblMember.Visible = true; this.lblMember.Text = entity.Contractor + strNewLine + entity.MemberDate.ToString(ConstString.DateFormat.Long); } } #endregion switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: //this.pnlDealSign.Visible = true; break; #endregion #region 处室承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR: this.tbChenBanChuanYue.Visible = true; this.tbChenBan.Visible = true; this.txtChengBanRiQi.Text = entity.DirectorDate.ToString(ConstString.DateFormat.Long); break; #endregion #region 科室承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF: this.tbChenBanChuanYue.Visible = true; this.tbChenBan.Visible = true; this.txtChengBanRiQi.Text = entity.SectionDate.ToString(ConstString.DateFormat.Long); break; #endregion #region 人员承办 case ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER: this.tbChenBanChuanYue.Visible = true; this.tbChenBan.Visible = true; this.txtChengBanRiQi.Text = entity.MemberDate.ToString(ConstString.DateFormat.Long); break; #endregion #region 传阅 //yangzj 20110702 case ProcessConstString.StepName.STEP_CIRCULATE: this.tbChenBan.Visible = true; if (entity.DirectorDate != DateTime.MinValue) { this.txtBuMenLingDao.Visible = true; this.txtBuMenLingDao.Visible = false; this.lblDirector.Visible = true; this.lblDirector.Text = entity.DeptLeader + strNewLine + entity.DirectorDate.ToString(ConstString.DateFormat.Long); } if (entity.SectionDate != DateTime.MinValue) { this.ddlKeShiLingDao.Visible = false; this.lblSection.Visible = true; this.lblSection.Text = entity.SectionLeader + strNewLine + entity.SectionDate.ToString(ConstString.DateFormat.Long); } if (entity.MemberDate != DateTime.MinValue) { this.ddlChengBanRen.Visible = false; this.lblMember.Visible = true; this.lblMember.Text = entity.Contractor + strNewLine + entity.MemberDate.ToString(ConstString.DateFormat.Long); } break; #endregion } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_GS_WorkItems rentity = base.EntityData != null ? base.EntityData as B_GS_WorkItems : new B_GS_WorkItems(); //补偿老版本数据 if (rentity.DraftDate < base.OAStartTime) { if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR)//处室承办、兼容老版本 { if (string.IsNullOrEmpty(rentity.UnderTakeChief)) { ViewBase vb = OADept.GetDeptByDeptUser(rentity.UnderTakeDept, FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF, "", ""), 2); rentity.UnderTakeChief = vb != null && vb.Count > 0 ? (vb.GetItem(0) as FounderSoftware.ADIM.OU.BLL.Busi.Department).ID.ToString() : ""; rentity.UnderTakeChiefName = vb != null && vb.Count > 0 ? (vb.GetItem(0) as FounderSoftware.ADIM.OU.BLL.Busi.Department).Name : ""; } if (string.IsNullOrEmpty(rentity.UnderTakePeople)) { //ViewBase vb = OAUser.GetUserName(); string userid = FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER, "", ""); rentity.UnderTakePeople = userid; rentity.UnderTakePeopleName = OAUser.GetUserName(userid); } else { if (string.IsNullOrEmpty(rentity.UnderTakePeopleName)) { rentity.UnderTakePeopleName = OAUser.GetUserName(rentity.UnderTakePeople); } } if (!this.dllUnderDept.Items.Contains(new ListItem(rentity.UnderTakeChiefName, rentity.UnderTakeChief))) { this.dllUnderDept.Items.Add(new ListItem(rentity.UnderTakeChiefName, rentity.UnderTakeChief)); } if (!this.ddlUnderPeople.Items.Contains(new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople))) { this.ddlUnderPeople.Items.Add(new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople)); } } if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF) { ViewBase vb = OADept.GetDeptByDeptUser(rentity.UnderTakeDept, FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF, base.WorkItemID, ""), 2); rentity.UnderTakeChief = vb != null && vb.Count > 0 ? (vb.GetItem(0) as FounderSoftware.ADIM.OU.BLL.Busi.Department).ID.ToString() : ""; if (string.IsNullOrEmpty(rentity.UnderTakePeople)) { //ViewBase vb = OAUser.GetUserName(); string userid = FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER, "", ""); rentity.UnderTakePeople = userid; rentity.UnderTakePeopleName = OAUser.GetUserName(userid); } else { if (string.IsNullOrEmpty(rentity.UnderTakePeopleName)) { rentity.UnderTakePeopleName = OAUser.GetUserName(rentity.UnderTakePeople); } } if (!this.ddlUnderPeople.Items.Contains(new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople))) { this.ddlUnderPeople.Items.Add(new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople)); } } if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER) { string userid = FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER, base.WorkItemID, ""); rentity.UnderTakePeople = userid; rentity.UnderTakePeopleName = OAUser.GetUserName(userid); } } OAControl controls = new OAControl(); //附件 this.ucAttachment.UCTemplateName = base.TemplateName; this.ucAttachment.UCProcessID = base.ProcessID; this.ucAttachment.UCWorkItemID = base.WorkItemID; this.ucAttachment.UCTBID = base.IdentityID.ToString(); this.ucAttachment.UCIsEditable = true;///////////////////////////////////////////// false; //传阅控件初始化 this.ucCirculatePeople.UCDeptIDControl = this.txtCdeptID.ClientID; this.ucCirculatePeople.UCDeptNameControl = this.txtCirculateDeptName.ClientID; this.ucCirculatePeople.UCDeptUserIDControl = this.txtCPeopleID.ClientID; this.ucCirculatePeople.UCDeptUserNameControl = this.txtCirculatePeopleName.ClientID; this.ucCirculatePeople.UCSelectType = "2"; this.ucCirculatePeople.UCTemplateName = base.TemplateName; this.ucCirculatePeople.UCFormName = "分发范围"; //收文号 this.txtReceiveNo.Attributes.Add("readonly", "true"); //收文日期 this.txtReceiveDate.Attributes.Add("readonly", "true"); //原文号 this.txtSendLetterNo.Attributes.Add("readonly", "true"); //卷号 this.txtPreVolumeNo.Attributes.Add("readonly", "true"); //文件名称 this.txtDocumentTitle.Attributes.Add("readonly", "true"); switch (base.StepName) { #region 发起流程 case ProcessConstString.StepName.ReceiveStepName.STEP_INITIAL: controls.EnableControls = new Control[] { this.ddlOfficer, this.txtPromptEdit }; controls.DisEnableControls = new Control[] { this.txtOfficerComment, this.ddlLeadShip, this.txtLeadCommentView, this.txtUnderTakeComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtPrompt }; //绑定公司办主任 if (!this.IsPostBack) { OAUser.GetUserByRole(this.ddlOfficer, OUConstString.RoleName.COMPANY_CHIEF); if (!string.IsNullOrEmpty(rentity.Officer) && string.IsNullOrEmpty(rentity.OfficerName))//兼容老版本 { //绑定公司办领导 rentity.OfficerName = OAUser.GetUserName(rentity.Officer); } ListItem lt = new ListItem(rentity.OfficerName, rentity.Officer); if (!(this.ddlOfficer.Items.Contains(lt))) { this.ddlOfficer.Items.Add(lt); } this.ddlOfficer.SelectedValue = rentity.Officer; } this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_INSPECT; this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT; this.btnCommon2.Visible = true; if (!string.IsNullOrEmpty(base.WorkItemID) && base.EntryAction != "7")//如果是退回,发起节点可以启动撤销 { this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_CANCEL; this.btnCommon3.Visible = true; this.btnCommon3.OnClientClick = ""; this.btnCommon3.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); } break; #endregion #region 办公室批阅 case ProcessConstString.StepName.ReceiveStepName.STEP_OFFICE://办公室批阅 controls.EnableControls = new Control[] { this.txtOfficerComment, this.ddlLeadShip, this.txtPromptEdit }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtLeaderComment, this.txtLeadCommentView, this.txtUnderTakeUserName, this.txtUnderTakeDeptName, this.txtUnderTakeComment, this.txtPrompt }; //绑定公司领导 if (!this.IsPostBack) { OAUser.GetUserByRole(this.ddlLeadShip, OUConstString.RoleName.COMPANY_LEADER); if (!string.IsNullOrEmpty(rentity.LeaderShip) && string.IsNullOrEmpty(rentity.LeaderShipName))//兼容老版本 { //绑定公司领导 //this.ddlLeadShip.SelectedValue = rentity.LeaderShip; rentity.LeaderShipName = OAUser.GetUserName(rentity.LeaderShip); } ListItem lt = new ListItem(rentity.LeaderShipName, rentity.LeaderShip); if (!(this.ddlLeadShip.Items.Contains(lt))) { this.ddlLeadShip.Items.Add(lt); } this.ddlLeadShip.SelectedValue = rentity.LeaderShip; } this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_POSTIL; this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_SUBMIT; this.btnCommon2.Visible = true; this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_DENY; this.btnCommon3.Visible = true; this.btnCommon3.OnClientClick = ""; this.btnCommon3.Attributes.Add("onclick", "javascript: if(!confirm('确定退回到发起流程节点吗?')){return false;}else{DisableButtons();}"); this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT; this.btnCommon4.Visible = true; break; #endregion #region 收文处理中心 case ProcessConstString.StepName.ReceiveStepName.STEP_PROCESS_CENTER: controls.EnableControls = new Control[] { this.ddlLeadShip, this.txtPromptEdit };//待加传阅分发 controls.YellowControls = new Control[] { this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtCirculateDeptName, this.txtCirculatePeopleName }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.txtLeadCommentView, this.txtLeaderComment, this.txtUnderTakeComment, this.txtPrompt }; //承办 this.OASelectUC1.UCDeptIDControl = this.txtUnderTakeDeptID.ClientID; this.OASelectUC1.UCDeptNameControl = this.txtUnderTakeDeptName.ClientID; this.OASelectUC1.UCLevel = "1"; this.OASelectUC1.UCSelectType = "0"; this.OASelectUC1.UCDeptShowType = "1010"; this.OASelectUC1.UCIsSingle = "1"; this.OASelectUC1.Visible = true; this.OASelectUC2.Visible = true; this.OASelectUC2.UCIsSingle = "1"; this.OASelectUC2.UCSelectType = "1"; this.OASelectUC2.UCDeptUserIDControl = this.txtUnderTakeUserID.ClientID; this.OASelectUC2.UCDeptUserNameControl = this.txtUnderTakeUserName.ClientID; this.OASelectUC2.UCTemplateName = base.TemplateName; this.OASelectUC2.UCFormName = "承办人员"; this.ucCirculatePeople.Visible = true; //绑定公司领导 if (!this.IsPostBack) { OAUser.GetUserByRole(this.ddlLeadShip, OUConstString.RoleName.COMPANY_LEADER); if (!string.IsNullOrEmpty(rentity.LeaderShip) && string.IsNullOrEmpty(rentity.LeaderShipName))//兼容老版本 { //绑定公司领导 rentity.LeaderShipName = OAUser.GetUserName(rentity.LeaderShip); } ListItem lt = new ListItem(rentity.LeaderShipName, rentity.LeaderShip); if (!(this.ddlLeadShip.Items.Contains(lt))) { this.ddlLeadShip.Items.Add(lt); } this.ddlLeadShip.SelectedValue = rentity.LeaderShip; } this.divCirculates.Visible = true;//显示传阅层 this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_UNDERTAKE; this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_POSTIL; this.btnCommon2.Visible = true; this.btnDistribute.Text = ProcessConstString.SubmitAction.ReceiveBase.DISTRIBUTION; this.btnDistribute.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); this.btnDistribute.OnClientClick = ""; this.btnDistribute.Visible = true; this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_SUBMIT; this.btnCommon4.Visible = true; this.btnCommon5.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT; this.btnCommon5.Visible = true; break; #endregion #region 领导批示 case ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION:// controls.EnableControls = new Control[] { this.txtLeaderComment }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.ddlLeadShip, this.txtOfficerComment, this.txtUnderTakeComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtPrompt, this.txtPromptEdit, this.txtLeadCommentView }; this.tblPlot.Visible = true;//显示领导批示层 break; #endregion #region 处室承办 case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR:// controls.EnableControls = new Control[] { this.txtCirculateDeptName, this.txtCirculatePeopleName, this.txtPromptEdit, this.txtUnderComment, this.ddlUnderPeople, this.dllUnderDept }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtUnderTakeComment, this.txtPrompt, this.txtLeadCommentView }; if (!string.IsNullOrEmpty(rentity.UnderTakeDept) && !IsPostBack) { //根据部门(如果是科室获取处室ID)ID绑定科室 OADept.GetChildDept(this.dllUnderDept, rentity.UnderTakeDept, 2); ListItem lt = new ListItem(rentity.UnderTakeChiefName, rentity.UnderTakeChief); if (!(this.dllUnderDept.Items.Contains(lt))) { this.dllUnderDept.Items.Add(lt); } this.dllUnderDept.SelectedValue = rentity.UnderTakeChief; //绑定处室人员(如果是科室获取处室ID) OAUser.GetUserByDeptID(this.ddlUnderPeople, rentity.UnderTakeDept, -1); lt = new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople); if (!(this.ddlUnderPeople.Items.Contains(lt))) { this.ddlUnderPeople.Items.Add(lt); } this.ddlUnderPeople.SelectedValue = rentity.UnderTakePeople; } //如果是承办是人员禁止交办 this.dllUnderDept.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept); this.ddlUnderPeople.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept); this.lbldept.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept); this.lblmember.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept); this.divUndertake.Visible = true;//显示承办层 this.td1.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept); this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.ASSIGN_SECTION; this.btnCommon1.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept);//如果是承办是人员禁止交办 this.btnCommon2.Text = ProcessConstString.SubmitAction.ReceiveBase.ASSIGN_PEOPLE; this.btnCommon2.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDept);//如果是承办是人员禁止交办 this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_COMPLETE; this.btnCommon3.Visible = true; break; #endregion #region 科室承办 case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF:// controls.EnableControls = new Control[] { this.txtPromptEdit, this.ddlUnderPeople, this.txtUnderComment }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtUnderTakeComment, this.txtPrompt, this.txtLeadCommentView }; if (!string.IsNullOrEmpty(rentity.UnderTakeChief) && !IsPostBack) { //根据科室绑定科室人员(所有) OAUser.GetUserByDeptID(this.ddlUnderPeople, rentity.UnderTakeChief, -1); ListItem lt = new ListItem(rentity.UnderTakePeopleName, rentity.UnderTakePeople); if (!(this.ddlUnderPeople.Items.Contains(lt))) { this.ddlUnderPeople.Items.Add(lt); } this.ddlUnderPeople.SelectedValue = rentity.UnderTakePeople; } this.dllUnderDept.Visible = false; this.lbldept.Visible = false; this.divUndertake.Visible = true;//显示承办层 this.ddlUnderPeople.Visible = true;//如果是承办是人员禁止交办 this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.ASSIGN_PEOPLE; this.btnCommon1.Visible = this.ddlUnderPeople.Items.Count > 0;//如果是承办是人员禁止交办 this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_COMPLETE; this.btnCommon2.Visible = true; break; #endregion #region 人员承办 case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER:// controls.EnableControls = new Control[] { this.txtPromptEdit, this.txtUnderComment }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtUnderTakeComment, this.txtPrompt, this.txtLeadCommentView }; this.ddlUnderPeople.Visible = false; this.dllUnderDept.Visible = false; this.divUndertake.Visible = true; this.lbldept.Visible = false; this.lblmember.Visible = false; this.td1.Visible = false; this.btnCommon1.Text = ProcessConstString.SubmitAction.ACTION_COMPLETE; this.btnCommon1.Visible = true; break; #endregion #region 收文处理中心归档 case ProcessConstString.StepName.ReceiveStepName.STEP_DISTRIBUTION:// //补偿老版oa处室承办人数据 if (rentity.DraftDate < base.OAStartTime && string.IsNullOrEmpty(rentity.UnderTakeDeptLeaderID)) { rentity.UnderTakeDeptLeaderID = FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_DIRECTOR, "", ProcessConstString.StepStatus.STATUS_COMPLETED); } controls.EnableControls = new Control[] { this.txtPromptEdit }; controls.YellowControls = new Control[] { this.txtCirculateDeptName, this.txtCirculatePeopleName }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtPrompt, this.txtLeadCommentView }; this.ucAttachment.UCIsEditable = true; this.ucCirculatePeople.Visible = true; this.divCirculates.Visible = true;//显示传阅层 this.btnGuiDang.Visible = true; if (base.IsDevolve) { this.btnGuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } this.btnDistribute.Text = ProcessConstString.SubmitAction.ReceiveBase.DISTRIBUTION; this.btnDistribute.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); this.btnDistribute.OnClientClick = ""; this.btnDistribute.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_COMPLETE; this.btnCommon2.Visible = true; this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_DENY; this.btnCommon3.Attributes.Add("onclick", "javascript: if(!confirm('确定退回到处室承办节点吗?')){return false;}else{DisableButtons();}"); this.btnCommon3.OnClientClick = ""; this.btnCommon3.Visible = !string.IsNullOrEmpty(rentity.UnderTakeDeptLeaderID); this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT; this.btnCommon4.Visible = true; break; #endregion } #region 历史表单 if (base.IsPreview) { this.ucCommentList.UCDateTime = B_FormsData.GetPWSubDate(base.ProcessID, base.WorkItemID, base.TemplateName); controls.EnableControls = new Control[] { }; controls.YellowControls = new Control[] { }; controls.DisEnableControls = new Control[] { this.txtCirculateDeptName, this.txtCirculatePeopleName, this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtUnderTakeComment, this.txtPrompt, this.txtLeadCommentView, this.txtPromptEdit, this.txtUnderComment, this.ddlUnderPeople, this.dllUnderDept }; if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_DISTRIBUTION && rentity.CompanyWS == CurrentUserInfo.UserName)//rentity.ReceiveUserID) { controls.YellowControls = new Control[] { this.txtCirculateDeptName, this.txtCirculatePeopleName }; controls.DisEnableControls = new Control[] { this.ddlOfficer, this.txtOfficerComment, this.ddlLeadShip, this.txtLeaderComment, this.txtUnderTakeDeptName, this.txtUnderTakeUserName, this.txtUnderTakeComment, this.txtPrompt, this.txtLeadCommentView, this.txtPromptEdit, this.txtUnderComment, this.ddlUnderPeople, this.dllUnderDept }; this.btnCommon1.Text = ProcessConstString.SubmitAction.ReceiveBase.APPENDED_DISTRIBUTION; this.divCirculates.Visible = true;//显示传阅层 this.btnCommon1.Visible = true; this.ucCirculatePeople.Visible = true; this.btnGuiDang.Visible = false; } else { this.btnCommon1.Visible = false; this.ucCirculatePeople.Visible = false; this.btnDistribute.Visible = false; //this.btnCommon1.Visible = false; //this.ucCirculatePeople.Visible = false; } this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.btnCommon2.Visible = false; this.btnCommon3.Visible = false; this.btnCommon4.Visible = false; this.btnCommon5.Visible = false; this.btnComplete.Visible = false; this.btnGuiDang.Visible = false; this.btnInstructionSave.Visible = false; if ( base.IsCanDevolve && rentity.D_StepStatus != ProcessConstString.StepStatus.STATUS_REMOVED&&rentity.ReceiveUserID == CurrentUserInfo.UserName)//(base.IsCanDevolve) { this.btnGuiDang.Visible = true; if (base.IsDevolve) { this.btnGuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } this.ucAttachment.UCIsEditable = true; } #endregion controls.SetControls(); }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { OAControl controls = new OAControl(); String l_strStepName = base.StepName; if (base.IsPreview) { l_strStepName += "()"; } switch (l_strStepName) { case ProcessConstString.StepName.ReceiveStepName.STEP_INITIAL: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); this.btnSumitInspect.Visible = true; this.btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_PLOT: SetDropDownListDisabled(this.ddlPoliticalOfficer); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); this.btnSubmit.Visible = true; this.btnDeny.Visible = true; this.btnSubmitInstruct.Visible = true; this.btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_PROCESS_CENTER: //收文处理中心 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); this.ucUnderTakeDept.Visible = true; this.divCirculates.Visible = true; this.btnSubmit.Visible = true; ////////////////////////////////////////// this.btnSubmitInstruct.Visible = true; this.btnSaveDraft.Visible = true; this.btnSubmitUnderTake.Visible = true; this.btnCirculate.Visible = true; this.btnCirculate.Text = ProcessConstString.SubmitAction.ReceiveBase.DISTRIBUTION; this.txtCirculateDeptName.Attributes.Add("readonly", "readonly"); this.txtCirculatePeopleName.Attributes.Add("readonly", "readonly"); this.txtUnderTakeDeptName.Attributes.Add("readonly", "readonly"); break; case ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION: //领导批示 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); this.tblPlot.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR: //处室承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = true; trUnderTakeMember.Visible = true; this.btnSaveDraft.Visible = true; this.btnAssignChief.Visible = true; this.btnAssignMember.Visible = true; this.btnSubmit.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF: //科室承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = false; trUnderTakeMember.Visible = true; this.btnSaveDraft.Visible = true; this.btnAssignMember.Visible = true; this.btnSubmit.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER: //人员承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = false; trUnderTakeMember.Visible = false; btnSubmit.Visible = true; btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_DISTRIBUTION: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); this.txtCirculateDeptName.Attributes.Add("readonly", "readonly"); this.txtCirculatePeopleName.Attributes.Add("readonly", "readonly"); this.ucAttachment.UCIsEditable = true; this.divCirculates.Visible = true; btnSubmit.Visible = true; break; default: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); break; } controls.SetControls(); if (base.IsCanDevolve) { this.btnArchive.Visible = true; if (base.IsDevolve) { this.btnArchive.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); if (this.ddlType.SelectedValue == "出差") { FileTitle = "海南核电有限公司出差报销单"; } else { FileTitle = "海南核电有限公司培训报销单"; } OAControl controls = new OAControl(); if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.txtQiTaXiaoJi, this.txtBuTieXiaoJi, this.txtHeJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuBuJE, this.txtWeiWoPuRT, this.txtZaiTuRT, this.txtZaiTuJE, this.txtCaiWuJE, this.ddlCaiWu, this.ddlPeiXunChu, this.txtChangQiBuTie, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal2, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass, this.btnWanCheng, }; this.txtBianHao.ToolTip = "提交后生成"; if (entity.IsBack == true) { btnCancel.Visible = true; } break; #endregion #region 主管领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } else { this.btnGongSiLingDao.Visible = false; this.btnCaiWu.Visible = false; } break; #endregion #region 培训处 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnPeiXunChu, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 公司领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 财务 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlCaiWu, this.ddlPeiXunChu, }; controls.DisVisibleControls = new Control[] { this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.ucPrint, this.btnCancel, this.btnWanCheng, }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_FANKUI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlCaiWu, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, this.txtChangQiBuTie, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnSave, }; ucChuXingMingXi.UCIsDisEnable = true; this.chkIsYiXian.Enabled = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); if (this.ddlType.SelectedValue == "出差") { FileTitle = "海南核电有限公司出差报销单"; } else { FileTitle = "海南核电有限公司培训报销单"; } OAControl controls = new OAControl(); if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.txtQiTaXiaoJi, this.txtBuTieXiaoJi, this.txtHeJi, this.txtZhuQinRT,this.txtZhuQinJE,this.txtZhuSuJYRT,this.txtZhuSuJYJE, this.txtWeiWoPuBuJE,this.txtWeiWoPuRT,this.txtZaiTuRT,this.txtZaiTuJE, this.txtCaiWuJE,this.ddlCaiWu,this.ddlPeiXunChu,this.txtChangQiBuTie, this.txtZiXingTianShu2,this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal2, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass, this.btnWanCheng, }; this.txtBianHao.ToolTip = "提交后生成"; if (entity.IsBack == true) { btnCancel.Visible = true; } break; #endregion #region 主管领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao,this.txtNiGaoRen,this.txtNiGaoRiQi,this.txtBianHao, this.ddlZhiCheng,this.ddlBianZhiBuMen,this.ddlJieKuan,this.txtPhone,this.txtDanJuZhangShu, this.txtShiYou,this.txtZhuSuRT,this.txtZhuSuJE,this.txtTuoYunRT,this.txtTuoYunJE,this.txtQiTaRT, this.txtQiTaJE,this.txtQiTaXiaoJi,this.txtZhuQinRT,this.txtZhuQinJE,this.txtZhuSuJYRT,this.txtZhuSuJYJE, this.txtWeiWoPuRT,this.txtWeiWoPuBuJE,this.txtZaiTuRT,this.txtZaiTuJE,this.txtBuTieXiaoJi, this.txtHeJi,this.txtCaiWuJE,this.ddlBuMenZhuGuan, this.txtLiXiangHao,this.txtLiXiangJE,this.ddlYuSuanNei,this.txtChangQiBuTie, this.txtZiXingTianShu1,this.txtZiXingTianShu2,this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1,this.btnCal2, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass,this.btnCancel,this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } else { this.btnGongSiLingDao.Visible = false; this.btnCaiWu.Visible = false; } break; #endregion #region 培训处 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao,this.txtNiGaoRen,this.txtNiGaoRiQi,this.txtBianHao, this.ddlZhiCheng,this.ddlBianZhiBuMen,this.ddlJieKuan,this.txtPhone,this.txtDanJuZhangShu, this.txtShiYou,this.txtZhuSuRT,this.txtZhuSuJE,this.txtTuoYunRT,this.txtTuoYunJE,this.txtQiTaRT, this.txtQiTaJE,this.txtQiTaXiaoJi,this.txtZhuQinRT,this.txtZhuQinJE,this.txtZhuSuJYRT,this.txtZhuSuJYJE, this.txtWeiWoPuRT,this.txtWeiWoPuBuJE,this.txtZaiTuRT,this.txtZaiTuJE,this.txtBuTieXiaoJi, this.txtHeJi,this.txtCaiWuJE,this.ddlBuMenZhuGuan,this.ddlPeiXunChu, this.txtLiXiangHao,this.txtLiXiangJE,this.ddlYuSuanNei,this.txtChangQiBuTie, this.txtZiXingTianShu1,this.txtZiXingTianShu2,this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1,this.btnCal2, this.btnPeiXunChu, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass,this.btnCancel,this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 公司领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao,this.txtNiGaoRen,this.txtNiGaoRiQi,this.txtBianHao, this.ddlZhiCheng,this.ddlBianZhiBuMen,this.ddlJieKuan,this.txtPhone,this.txtDanJuZhangShu, this.txtShiYou,this.txtZhuSuRT,this.txtZhuSuJE,this.txtTuoYunRT,this.txtTuoYunJE,this.txtQiTaRT, this.txtQiTaJE,this.txtQiTaXiaoJi,this.txtZhuQinRT,this.txtZhuQinJE,this.txtZhuSuJYRT,this.txtZhuSuJYJE, this.txtWeiWoPuRT,this.txtWeiWoPuBuJE,this.txtZaiTuRT,this.txtZaiTuJE,this.txtBuTieXiaoJi, this.txtHeJi,this.txtCaiWuJE,this.ddlBuMenZhuGuan,this.ddlGSLingDao,this.ddlPeiXunChu, this.txtLiXiangHao,this.txtLiXiangJE,this.ddlYuSuanNei,this.txtChangQiBuTie, this.txtZiXingTianShu1,this.txtZiXingTianShu2,this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.ucPrint, this.btnCaiWuPass,this.btnCancel,this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 财务 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao,this.txtNiGaoRen,this.txtNiGaoRiQi,this.txtBianHao, this.ddlZhiCheng,this.ddlBianZhiBuMen,this.ddlJieKuan,this.txtPhone,this.txtDanJuZhangShu, this.txtShiYou, this.ddlBuMenZhuGuan,this.ddlGSLingDao,this.ddlCaiWu,this.ddlPeiXunChu, }; controls.DisVisibleControls = new Control[] { this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.ucPrint, this.btnCancel,this.btnWanCheng, }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_FANKUI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao,this.txtNiGaoRen,this.txtNiGaoRiQi,this.txtBianHao, this.ddlZhiCheng,this.ddlBianZhiBuMen,this.ddlJieKuan,this.txtPhone,this.txtDanJuZhangShu, this.txtShiYou,this.txtZhuSuRT,this.txtZhuSuJE,this.txtTuoYunRT,this.txtTuoYunJE,this.txtQiTaRT, this.txtQiTaJE,this.txtQiTaXiaoJi,this.txtZhuQinRT,this.txtZhuQinJE,this.txtZhuSuJYRT,this.txtZhuSuJYJE, this.txtWeiWoPuRT,this.txtWeiWoPuBuJE,this.txtZaiTuRT,this.txtZaiTuJE,this.txtBuTieXiaoJi, this.txtHeJi,this.txtCaiWuJE,this.ddlBuMenZhuGuan,this.ddlGSLingDao,this.ddlCaiWu,this.ddlPeiXunChu, this.txtLiXiangHao,this.txtLiXiangJE,this.ddlYuSuanNei, this.txtZiXingTianShu1,this.txtZiXingTianShu2,this.txtZiXingJinE,this.txtChangQiBuTie, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass,this.btnCancel,this.btnSave, }; ucChuXingMingXi.UCIsDisEnable = true; this.chkIsYiXian.Enabled = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); #region 弹出窗口 //抄送 this.OASelectUC1.UCSelectType = "2"; this.OASelectUC1.UCDeptIDControl = this.txtChaoSongDeptID.ClientID; this.OASelectUC1.UCDeptUserIDControl = this.txtChaoSongID.ClientID; this.OASelectUC1.UCDeptAndUserControl = this.txtChaoSong.ClientID; this.OASelectUC1.UCTemplateName = base.TemplateName; this.OASelectUC1.UCFormName = "抄送"; //分发范围 this.OASelectUC2.UCSelectType = "2"; this.OASelectUC2.UCDeptIDControl = this.txtChuanYueDeptIDs.ClientID; this.OASelectUC2.UCDeptUserIDControl = this.txtChuanYueRenIDs.ClientID; this.OASelectUC2.UCDeptAndUserControl = this.txtChuanYueRenYuan.ClientID; this.OASelectUC2.UCTemplateName = base.TemplateName; this.OASelectUC2.UCFormName = "分发范围"; #endregion OAControl controls = new OAControl(); if (!base.IsPreview) { this.txtPiShiYiJian.ToolTip = "2000字符以内"; this.ddlBianZhiBuMen.ToolTip = "自己所属的处室"; FileTitle = "海南核电有限公司出差(培训)申请单"; } if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtBianHao.ToolTip = "提交后自动生成"; if (string.IsNullOrEmpty(base.WorkItemID)) { this.lbJs.Text = "<script>ShowMyDiv();</script>"; } controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTiJiaoShenHe, this.btnSave }; controls.YellowControls = new Control[] { this.txtChaoSong }; if (this.SubmitStatus == 1) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZhuGuanLingDao, ddlChuLingDao }; } else if (this.SubmitStatus == 2) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlChuLingDao }; } else if (this.SubmitStatus == 3) { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlZhuGuanLingDao }; } else { controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng }; } break; #endregion #region 处领导审核 case ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 主管领导审核 case ProcessConstString.StepName.FinanceStepName.STEP_ChargeLeader: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 总经理审核 case ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager: controls.EnableControls = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian }; controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 订票处 case ProcessConstString.StepName.FinanceStepName.STEP_BookingOffice: controls.EnableControls = new Control[] { this.OASelectUC1, this.txtShangWu, this.btnDingPiao, this.btnTuiHui, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtChuChaiRenWu,this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceStepName.STEP_FeedBack: FormsMethod.SetControlAll(this); controls.EnableControls = new Control[] { this.OASelectUC1, this.btnApplyComplete, this.btnSave }; controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng }; controls.YellowControls = new Control[] { this.txtChaoSong }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { //ucAttachment.UCIsEditable = false; FormsMethod.SetControlAll(this); } }
protected override void SetControlStatus() { //txtInfo.ToolTip = "500字符以内"; //txtInfo2.ToolTip = "500字符以内"; //txtWriteExplain.ToolTip = "200字符以内"; ucFileControl.UCTemplateName = base.TemplateName; ucFileControl.UCProcessID = base.ProcessID; ucFileControl.UCWorkItemID = base.WorkItemID; ucFileControl.UCTBID = base.IdentityID.ToString(); txtSendDeptName.Attributes.Add("ReadOnly", "true"); txtSendUserName.Attributes.Add("ReadOnly", "true"); txtCirculateDeptName.Attributes.Add("ReadOnly", "true"); txtCirculateUserName.Attributes.Add("ReadOnly", "true"); OAControl controls = new OAControl(); switch (base.StepName) { case ProcessConstString.StepName.ProgramFile.STEP_WRITE: //编制 //选择分发部门、人员 ucSelectSender.UCSelectType = "2"; ucSelectSender.UCDeptIDControl = hfSendDeptID.ClientID; ucSelectSender.UCDeptNameControl = txtSendDeptName.ClientID; ucSelectSender.UCDeptUserIDControl = hfSendUserID.ClientID; ucSelectSender.UCDeptUserNameControl = txtSendUserName.ClientID; ucSelectSender.UCAllSelect = "1"; //选择校核人员 ucSelectAuditor.UCSelectType = "1"; ucSelectAuditor.UCIsSingle = "1"; ucSelectAuditor.UCDeptUserIDControl = wfCheckID.ClientID; ucSelectAuditor.UCDeptUserNameControl = txtCheckName.ClientID; //控件状态 needCheck.ForeColor = System.Drawing.Color.Red; needApprove.ForeColor = System.Drawing.Color.Red; ucBuMenHuiQian.UCIsAllowDel = base.IdentityID == 0 ? false : true;//可勾选checkbox逻辑删除已会签信息 if (!IsPostBack) { //工作程序(部门会签或领导会签) rdolstSignStyle.Visible = wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_WORK ? true : false; if (wfSort.Text != ConstString.ProgramFile.PROGRAM_SORT_MANAGE) { if (ucLDHuiQian.UCHQList.Count > 0) { rdolstSignStyle.SelectedIndex = 1; pnlDeptSign.Visible = false; pnlLeaderSign.Visible = true; }//存在领导会签 else { rdolstSignStyle.SelectedIndex = 0; pnlDeptSign.Visible = true; pnlLeaderSign.Visible = false; } }//部门级管理程序、工作程序 } controls.EnableControls = new Control[] { cbIsPrint, txtPages, txtName }; controls.DisEnableControls = new Control[] { btnSend, btnBack, btnArchive, txtCheckName, tdSignRegion };//pnlDealSign, pnlCommentInfo controls.YellowControls = new Control[] { txtCheckName }; //处理落实面板 pnlDealSign.Visible = this.pnlDeptComment.Visible || this.pnlLeaderComment.Visible || pnlQGComment.Visible || this.pnlApproveComment.Visible ? true : false; this.pnlPromptInfo.Visible = false;//校核、审核添加意见面板 break; case ProcessConstString.StepName.ProgramFile.STEP_CHECK: //校核 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, ddlApprove, divButtomBtns, btnDeptSign,btnLeaderSign,btnAuditApprove,txtPages,btnAuditCirculate}; needAudit.ForeColor = System.Drawing.Color.Red; pnlDealSign.Visible = false;//处理落实面板 pnlSend.Visible = false;//分发面板 pnlComments.Visible = false;//领导添加意见面板 //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; break; case ProcessConstString.StepName.ProgramFile.STEP_AUDIT: //审核 //非管理程序 并且经过部门会签,则显示传阅按钮 //btnAuditCirculate.Visible = wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_MANAGE ? false : true; pnlDealSign.Visible = false;//处理落实面板 pnlSend.Visible = false;//分发面板 pnlComments.Visible = false;//领导添加意见面板 //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; switch (wfSort.Text) { case ConstString.ProgramFile.PROGRAM_SORT_MANAGE: controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, btnDeptSign, btnLeaderSign, btnAuditApprove, txtPages,ddlApprove,ddlAudit,btnAuditCirculate }; break; case ConstString.ProgramFile.PROGRAM_SORT_DEPTMANAGE: controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages, ddlApprove, ddlAudit, btnAuditApprove, btnLeaderSign, btnAuditCirculate }; CheckBMHQStatus(); break; case ConstString.ProgramFile.PROGRAM_SORT_WORK: controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages, ddlApprove, ddlAudit, btnSubmit, btnAuditCirculate }; CheckLDHQStatus(); CheckBMHQStatus(); break; default: break; } break; case ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN: //部门会签 #region 协助会签区域相关设置 txtAssistInfo.Attributes.Add("ReadOnly", "true"); txtAssistInfo.CssClass = "textarea_blue"; txtAssignMember.Attributes.Add("ReadOnly", "true"); divAssign.Visible = true; pnlComments.Visible = true;//协助会签主区域 divAssignDeal.Visible = false;//协助会签按钮区域 if (base.IsPreview == false) { //选择交办人员 ucSelectAssign.UCSelectType = "1"; ucSelectAssign.UCIsSingle = "1"; ucSelectAssign.UCDeptUserIDControl = wfAssignUserID.ClientID; ucSelectAssign.UCDeptUserNameControl = txtAssignMember.ClientID; string strShowDeptID = string.Empty; if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName) { foreach (M_ProgramFile.DeptSign sign in ucBuMenHuiQian.UCHQList) { if (sign.ID == wfReceiveUserID.Text) { strShowDeptID += OADept.GetChildDeptIDSConSelf(sign.DeptID, -1) + ","; } } } else { foreach (M_ProgramFile.DeptSign sign in ucBuMenHuiQian.UCHQList) { if (sign.ID == CurrentUserInfo.UserName) { strShowDeptID += OADept.GetChildDeptIDSConSelf(sign.DeptID, -1) + ","; } } } strShowDeptID = strShowDeptID.Substring(0, strShowDeptID.Length - 1); ucSelectAssign.UCShowDeptID = strShowDeptID; }//非查看历史 #endregion this.ucFileControl.UCIsEditable = false;//附件不可编辑 //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.pnlDealSign.Visible = false;//处理落实面板 this.pnlSend.Visible = false;//分发面板 this.pnlPromptInfo.Visible = false;//校核、审核添加意见面板 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages,btnLeaderSign, btnDeptSign2,btnLeaderSign2,btnQGApprove,btnQGCirculate,btnQGBack,ddlApprove,ddlAudit}; break; case ProcessConstString.StepName.ProgramFile.STEP_ASSIST_SIGN://协助会签 #region 协助会签区域相关设置 pnlComments.Visible = false;//会签提交区域 divAssign.Visible = true; //协助会签主区域 trLeaderDeal.Visible = false;//协助会签交办选择区域 #endregion this.ucFileControl.UCIsEditable = false;//附件不可编辑 //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.pnlDealSign.Visible = false;//处理落实面板 this.pnlSend.Visible = false;//分发面板 this.pnlPromptInfo.Visible = false;//校核、审核添加意见面板 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages,btnLeaderSign, btnDeptSign2,btnLeaderSign2,btnQGApprove,btnQGCirculate,btnQGBack,ddlApprove,ddlAudit}; break; case ProcessConstString.StepName.ProgramFile.STEP_QG: //质保审查 if (!IsPostBack) { //处理落实面板(取决于批准落实面板状态) this.pnlDealSign.Visible = this.pnlApproveComment.Visible; //校核、审核添加意见面板 this.pnlPromptInfo.Visible = false; //分发 分发意见 this.txtSendComemnt.Visible = true; //pnlDistributeComment.Visible = true; //传阅控件属性设置 ucSelectCirculate.UCSelectType = "2"; ucSelectCirculate.UCAllSelect = "1"; ucSelectCirculate.UCDeptIDControl = hfCirculateDeptID.ClientID; ucSelectCirculate.UCDeptNameControl = txtCirculateDeptName.ClientID; ucSelectCirculate.UCDeptUserIDControl = hfCirculateUserID.ClientID; ucSelectCirculate.UCDeptUserNameControl = txtCirculateUserName.ClientID; CheckLDHQStatus();//领导会签按钮状态 CheckBMHQStatus();//部门会签按钮状态 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 if (wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_DEPTMANAGE) { btnSubmitFenFa.Visible = string.IsNullOrEmpty(lblApproveDate.Text) ? false : true;//提交分发按钮 controls.EnableControls = new Control[] { cbIsPrint, btnQGApprove, txtSendComemnt }; //20100505 huangqi des:修改为可选择批准人 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, btnDeptSign2, btnLeaderSign2, btnSubmits, txtPages, btnQGCirculate, ddlAudit }; pnlLeaderSign.Visible = false;//无领导会签 }//部门级管理程序 else { if (wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_MANAGE) { QualityCheck(); //质保审查节点按钮状态设置 CheckCirculateStatus();//设置传阅相关控件状态 }//管理程序 btnSubmitFenFa.Visible = string.IsNullOrEmpty(lblApproveDate.Text) ? false : true;//提交分发按钮 needApprove.ForeColor = System.Drawing.Color.Red; } } controls.EnableControls = new Control[] { cbIsPrint, txtSendComemnt }; //20100505 huangqi des:修改为可选择批准人 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages, ddlAudit }; this.btnQGApprove.Visible = true;////////////////////////杨子江,20110119 this.btnSubmit.Visible = false;//////////////////////////杨子江,20110119 this.btnSubmits.Visible = false;//////////////////////////杨子江,20110120 break; //btnDeptSign, btnLeaderSign, case ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN: //领导会签 this.ucFileControl.UCIsEditable = false; //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.pnlDealSign.Visible = false;//处理落实面板 this.pnlSend.Visible = false;//分发面板 this.pnlPromptInfo.Visible = false;//校核、审核添加意见面板 //ListItem temp = ddlApprove.Items.FindByText("孙云根"); //ddlApprove.Items.Remove(temp); controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages, btnLeaderSign, btnDeptSign2,btnLeaderSign2,btnQGApprove,btnQGCirculate,btnQGBack,ddlApprove,ddlAudit}; break; case ProcessConstString.StepName.ProgramFile.STEP_APPROVE: //批准 //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.pnlDealSign.Visible = false;//处理落实面板 this.pnlSend.Visible = false;//分发面板 this.pnlPromptInfo.Visible = false;//校核、审核添加意见面板 controls.DisEnableControls = new Control[] { ucSelectAuditor, ucSelectSender, txtCheckName, divButtomBtns, txtPages, btnLeaderSign, btnDeptSign2,btnLeaderSign2,btnQGApprove,btnQGCirculate,btnQGBack,ddlApprove,ddlAudit}; break; case ProcessConstString.StepName.ProgramFile.STEP_SEND: //分发 //选择分发部门、人员 ucSelectSender.UCSelectType = "2"; ucSelectSender.UCDeptIDControl = hfSendDeptID.ClientID; ucSelectSender.UCDeptNameControl = txtSendDeptName.ClientID; ucSelectSender.UCDeptUserIDControl = hfSendUserID.ClientID; ucSelectSender.UCDeptUserNameControl = txtSendUserName.ClientID; ucSelectSender.UCAllSelect = "1"; if (base.IsDevolve) { this.btnArchive.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableCtrls();}"); } //部门、领导会签 不可操作 this.ucBuMenHuiQian.UCIsDelInvisible = true;//被删已会签部门不可见 this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; needPages.ForeColor = System.Drawing.Color.Red; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.pnlDealSign.Visible = false;//处理落实面板 this.txtSendComemnt.Visible = true;//分发意见 //pnlDistributeComment.Visible = true; controls.EnableControls = new Control[] { txtPages }; controls.DisEnableControls = new Control[] { ucSelectAuditor, btnSubmitCheck, txtCheckName, tdSignRegion, ddlApprove, ddlAudit };//pnlDealSign, pnlPromptInfo //工作程序无质保节点,暂无回退 btnBack.Visible = wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_WORK ? false : true; break; case ProcessConstString.StepName.ProgramFile.STEP_CRICULATE://传阅 controls.DisEnableControls = new Control[] { tdSignRegion }; pnlDealSign.Visible = false; break; default: break; } //设置所有控件状态 controls.SetControls(); //工作程序 if (wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_WORK) { //设置radio选项 if (ucLDHuiQian.UCHQList.Count > 0) { rdolstSignStyle.SelectedIndex = 1; } pnlQGRegion.Visible = false;//工作程序不经过质保节点 } //是否查看历史 if (base.IsPreview) { FormsMethod.SetControlAll(this); this.ucFileControl.UCIsEditable = false; this.ucBuMenHuiQian.UCIsDisEnable = true; this.ucLDHuiQian.UCIsDisEnable = true; this.pnlDeptSign.Visible = ucBuMenHuiQian.UCHQList.Count != 0 ? true : false; this.pnlLeaderSign.Visible = ucLDHuiQian.UCHQList.Count != 0 ? true : false; this.ucSelectAssign.Visible = false; this.ucSelectAuditor.Visible = false; this.ucSelectCirculate.Visible = false; this.ucSelectSender.Visible = false; if (base.IsCanDevolve) { this.btnArchive.Visible = true; if (base.IsDevolve) { this.btnArchive.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableCtrls();}"); } } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { OAControl controls = new OAControl(); B_LetterReceive rentity = base.EntityData != null ? base.EntityData as B_LetterReceive : new B_LetterReceive(); //收文号 this.txtReceiveNo.Attributes.Add("readonly", "true"); //行文时间 this.txtReceiveTime.Attributes.Add("readonly", "true"); //紧急程度 this.txtUrgentDegree.Attributes.Add("readonly", "true"); //编码 this.txtFileEncoding.Attributes.Add("readonly", "true"); //来文单位 this.txtCommunicationUnit.Attributes.Add("readonly", "true"); //标题 this.txtDocumentTitle.Attributes.Add("readonly", "true"); //备注 this.txtRemark.Attributes.Add("readonly", "true"); //附件 this.ucAttachment.UCTemplateName = base.TemplateName; if (base.IdentityID.ToString() != "0") { this.ucAttachment.UCProcessID = base.ProcessID; this.ucAttachment.UCWorkItemID = base.WorkItemID; this.ucAttachment.UCTBID = base.IdentityID.ToString(); } //this.ucAttachment.UCIsEditable = false; //拟办人控件初始化 this.ucRole.UCIsSingle = true; this.ucRole.UCRoleName = OUConstString.RoleName.HANJIANNIBANZU; this.ucRole.UCUserNameControl = this.txtPlotMember.ClientID; this.ucRole.UCUserIDControl = this.txtPlotMemberID.ClientID; //传阅控件初始化 this.OASelectUC1.UCDeptTreeUserIDControl = this.txtCirculateDeptID.ClientID; this.OASelectUC1.UCDeptNameControl = this.txtCirculateDeptName.ClientID; this.OASelectUC1.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.OASelectUC1.UCRoleUserIDControl = this.txtCirculateLeaderID.ClientID; this.OASelectUC1.UCRoleUserNameControl = this.txtCirculateLeader.ClientID; this.OASelectUC1.UCLevel = "2"; this.OASelectUC1.UCSelectType = "0"; this.OASelectUC1.UCDeptShowType = "1010"; //承办 this.OASelectUC2.UCDeptIDControl = this.txtUnderTakeID.ClientID; this.OASelectUC2.UCDeptNameControl = this.txtUnderTake.ClientID; this.OASelectUC2.UCLevel = "1"; this.OASelectUC2.UCSelectType = "0"; this.OASelectUC2.UCDeptShowType = "1010"; this.OASelectUC2.UCIsSingle = "1"; //协办 this.OASelectUC3.UCDeptNameControl = this.txtAssistance.ClientID; this.OASelectUC3.UCDeptIDControl = this.txtAssistID.ClientID; this.OASelectUC3.UCLevel = "2"; this.OASelectUC3.UCSelectType = "0"; this.OASelectUC3.UCDeptShowType = "1000"; this.OASelectUC5.UCSelectType = "1"; this.OASelectUC5.UCDeptUserIDControl = this.txtAssignPersonID.ClientID; this.OASelectUC5.UCDeptUserNameControl = this.txtUDPeople.ClientID; this.OASelectUC5.UCIsSingle = "1"; //传阅控件初始化 this.OASelectUC6.UCDeptUserNameControl = txtCirculatePerson.ClientID; this.OASelectUC6.UCDeptUserIDControl = txtCirculatePersonID.ClientID; this.OASelectUC6.UCShowDeptID = OADept.GetDeptIDByUser(rentity.ReceiveUserID); this.OASelectUC6.UCSelectType = "1"; this.OASelectUC6.UCTemplateName = base.TemplateName.Replace("新版",""); this.OASelectUC6.UCFormName = "传阅"; switch (base.StepName) { #region 发起流程 case ProcessConstString.StepName.LetterReceiveStepName.STEP_INITIAL:// controls.EnableControls = new Control[] { this.txtCirculateComment, }; controls.YellowControls = new Control[] { this.txtCirculatePerson, this.txtPlotMember, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance }; controls.DisEnableControls = new Control[] { this.txtPlotTime, this.ddlLeadShip, this.txtPlotComment, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUnderTakeComment, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeader, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtUDPeopleTime }; this.ucAttachment.UCIsEditable = true; //动作初始化 this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_TJNB;//提交拟办 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_TJCB;//提交承办 this.btnCommon2.Visible = true; this.btnCommon2.OnClientClick = ""; this.btnCommon2.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{if(!checkUnderDept()){return false;}else{DisableButtons();}};"); this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon3.Visible = true; if (!string.IsNullOrEmpty(base.WorkItemID) && base.EntryAction != "7") { this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_CANCEL;//撤销 this.btnCommon4.OnClientClick = ""; this.btnCommon4.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); this.btnCommon4.Visible = true; } this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; break; #endregion #region 拟办 case ProcessConstString.StepName.LetterReceiveStepName.STEP_CHECK:// if (!this.IsPostBack) { //绑定公司领导 OAUser.GetUserByRole(this.ddlLeadShip, OUConstString.RoleName.COMPANY_LEADER); ListItem lt = new ListItem(rentity.LeaderShipName, rentity.LeaderShip); if (!(this.ddlLeadShip.Items.Contains(lt))) { this.ddlLeadShip.Items.Add(lt); } this.ddlLeadShip.SelectedValue = rentity.LeaderShip; } controls.EnableControls = new Control[] { this.ddlLeadShip, this.ddlLeadShip, this.txtCirculateComment, this.txtPlotComment }; controls.YellowControls = new Control[] { this.txtCirculatePerson, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance }; controls.DisEnableControls = new Control[] { this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUnderTakeComment, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeader, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtUDPeopleTime }; this.ucRole.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; //动作初始化 this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_TJLDPS;//领导批示 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_TJCB;//提交承办 this.btnCommon2.Visible = true; this.btnCommon2.OnClientClick = ""; this.btnCommon2.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{if(!checkUnderDept()){return false;}else{DisableButtons();}};"); this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_DENY;//退回 this.btnCommon3.Visible = true; this.btnCommon3.OnClientClick = ""; this.btnCommon3.Attributes.Add("onclick", "javascript: if(!confirm('确定退回到发起流程节点吗?')){return false;}else{DisableButtons();}"); this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon4.Visible = true; break; #endregion #region 领导批示 case ProcessConstString.StepName.LetterReceiveStepName.STEP_INSTRUCTION:// controls.EnableControls = new Control[] { this.txtLeaderComment }; controls.DisEnableControls = new Control[] { this.ddlLeadShip, this.txtPlotComment, this.txtCirculatePerson, this.txtUnderTakeComment, this.txtCirculateComment, this.txtUDPeople, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance }; this.tblPlot.Visible = true; this.OASelectUC1.Visible = false; this.ucRole.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; this.OASelectUC6.Visible = false; this.btnInstructionSave.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT; this.btnComplete.Text = ProcessConstString.SubmitAction.ACTION_SUBMIT; break; #endregion #region 协办 case ProcessConstString.StepName.LetterReceiveStepName.STEP_HELP_DIRECTOR:// controls.EnableControls = new Control[] { this.txtCirculateComment }; controls.YellowControls = new Control[] { this.txtCirculatePerson}; controls.DisEnableControls = new Control[] { this.ddlLeadShip, this.txtPlotComment, this.txtUDPeople, this.txtUnderTakeComment, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance, this.txtUDPeopleTime }; this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发,不用了。 this.btnCommon1.Visible = false; this.btnCY.Visible = true; this.btnCY.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发 this.btnCommon2.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_COMPLETE;//承办完成 this.btnCommon2.Visible = true; this.divCirculatePerson.Visible = true; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; this.ucRole.Visible = false; break; #endregion #region 处室承办 case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_DIRECTOR:// controls.EnableControls = new Control[] { this.txtUnderTakeComment, this.txtCirculateComment }; controls.YellowControls = new Control[] { this.txtUDSectionLeader, this.txtUDPeople, this.txtCirculatePerson }; controls.DisEnableControls = new Control[] { this.txtPlotComment, this.ddlLeadShip, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance,this.txtUDPeopleTime }; //承办科室 this.OASelectUC4.UCShowDeptID = OADept.GetChildDeptIDSConSelf(rentity.UnderTakeID, -1); this.OASelectUC4.UCLevel = "2"; this.OASelectUC4.UCDeptShowType = "1000"; this.OASelectUC4.UCSelectType = "0"; this.OASelectUC4.UCIsSingle = "1"; this.OASelectUC4.UCDeptTreeUserIDControl = this.txtAssignID.ClientID; this.OASelectUC4.UCDeptTreeUserNameControl = this.txtUDSectionLeader.ClientID; this.OASelectUC4.UCDeptIDControl = this.txtShiefID.ClientID; this.divCirculatePerson.Visible = true; this.OASelectUC5.UCShowDeptID = OADept.GetChildDeptIDSConSelf(rentity.UnderTakeID, -1); this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_JBKS;//交办科室 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_JBRY;//交办人员 this.btnCommon2.Visible = true; this.btnCommon3.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发,不用了。 this.btnCommon3.Visible = false; this.btnCY.Visible = true; this.btnCY.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发 this.btnCommon4.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_COMPLETE;//承办完成 this.btnCommon4.Visible = true; this.btnCommon5.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon5.Visible = true; this.ucRole.Visible = false; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; break; #endregion #region 科室承办 case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_CHIEF:// controls.EnableControls = new Control[] { this.txtUnderTakeComment, this.txtCirculateComment }; controls.YellowControls = new Control[] { this.txtUDPeople, this.txtCirculatePerson }; controls.DisEnableControls = new Control[] { this.ddlLeadShip, this.txtPlotComment, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance, this.txtUDPeopleTime }; //补偿老版的科室 if (rentity.DraftDate < base.OAStartTime) { ViewBase vb = OADept.GetDeptByDeptUser(rentity.UnderTakeID, rentity.ReceiveUserID, 2); rentity.UDSection = vb != null && vb.Count > 0 ? vb.GetFieldVals("ID", ",") : ""; } this.txtUDDeptLeader.Visible = false; this.lblchushi.Visible = true; this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_JBRY;//交办人员 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发,不用了。 this.btnCommon2.Visible = false; this.btnCY.Visible = true; this.btnCY.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF;//分发 this.btnCommon3.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_COMPLETE;//承办完成 this.btnCommon3.Visible = true; this.btnCommon4.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon4.Visible = true; this.OASelectUC5.UCShowDeptID = OADept.GetChildDeptIDSConSelf(rentity.UDSection, -1); this.divCirculatePerson.Visible = true; this.ucRole.Visible = false; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; break; #endregion #region 人员承办 case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_MEMBER:// controls.EnableControls = new Control[] { this.txtUnderTakeComment, this.txtCirculateComment }; controls.YellowControls = new Control[] { this.txtCirculatePerson }; controls.DisEnableControls = new Control[] { this.ddlLeadShip, this.txtPlotComment, this.txtUDPeople, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance, this.txtUDPeopleTime }; this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_COMPLETE;//承办完成 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon2.Visible = true; this.ucRole.Visible = false; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; if (!string.IsNullOrEmpty(rentity.UDSectionLeadName)) { this.txtUDSectionLeader.Visible = false; OASelectUC4.Visible = false; this.lblkeshi.Visible = true; } this.txtUDDeptLeader.Visible = false; this.lblchushi.Visible = true; break; #endregion #region 函件管理员处理 case ProcessConstString.StepName.LetterReceiveStepName.STEP_LETTER_ADMIN:// //补偿老版oa处室承办人数据 if (rentity.DraftDate < base.OAStartTime && string.IsNullOrEmpty(rentity.UnderTakeLeaders)) { rentity.UnderTakeLeaders = FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_DIRECTOR, "", ProcessConstString.StepStatus.STATUS_COMPLETED); } controls.EnableControls = new Control[] { this.txtUnderTakeComment, this.txtCirculateComment }; controls.YellowControls = new Control[] { this.txtCirculatePerson }; controls.DisEnableControls = new Control[] { this.txtUnderTakeComment, this.ddlLeadShip, this.txtPlotComment, this.txtUDPeople, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance, this.txtUDPeopleTime }; this.ucAttachment.UCIsEditable = true; //this.divCirculatePerson.Visible = true; this.btnCommon1.Text = ProcessConstString.SubmitAction.ACTION_SUBMIT;//提交 this.btnCommon1.Visible = true; this.btnCommon2.Text = ProcessConstString.SubmitAction.ACTION_DENY;//退回 this.btnCommon2.Visible = !string.IsNullOrEmpty(rentity.UnderTakeLeaders); this.btnCommon2.OnClientClick = ""; this.btnCommon2.Attributes.Add("onclick", "javascript: if(!confirm('确定退回到处室承办节点吗?')){return false;}else{DisableButtons();}"); this.btnCommon3.Text = ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT;//保存 this.btnCommon3.Visible = true; this.btnGuidang.Visible = true; if (base.IsDevolve) { this.btnGuidang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } //this.btnCommon4.Text = ProcessConstString.StepAction.LetterReceiveAction.ACTION_GD;//归档 //this.btnCommon4.Visible = true; this.ucRole.Visible = false; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; if (!string.IsNullOrEmpty(rentity.UDSectionLeadName)) { this.txtUDSectionLeader.Visible = false; this.OASelectUC4.Visible = false; this.lblkeshi.Visible = true; } if (!string.IsNullOrEmpty(rentity.UDSectionPeopleName)) { this.txtUDPeople.Visible = false; OASelectUC5.Visible = false; this.lblrenyuan.Visible = true; } if (!string.IsNullOrEmpty(rentity.UDDeptLeadName)) { this.txtUDDeptLeader.Visible = false; this.lblchushi.Visible = true; } break; #endregion #region Circulate case ProcessConstString.StepName.LetterReceiveStepName.STEP_CIRCULATE:// //this.ucAttachment.UCIsEditable = false; break; #endregion } #region 历史表单 if (base.IsPreview) { this.ucCommentList.UCDateTime = B_FormsData.GetPWSubDate(base.ProcessID, base.WorkItemID, base.TemplateName); controls.EnableControls = new Control[] { }; controls.YellowControls = new Control[] { }; controls.DisEnableControls = new Control[] { this.txtPlotComment, this.ddlLeadShip, this.txtPlotMember, this.txtCirculateLeader, this.txtUnderTake, this.txtAssistance, this.txtCirculateDeptName, this.txtCirculatePerson, this.txtUnderTakeComment, this.txtCirculateComment, this.txtUDPeople, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance, this.txtUDPeopleTime }; //if ((base.StepName == ProcessConstString.StepName.LetterReceiveStepName.STEP_LETTER_ADMIN && rentity.LetterAdmin == rentity.ReceiveUserID) || (rentity.DraftDate < base.OAStartTime && FormsMethod.GetReceiveUserID(base.ProcessID, ProcessConstString.StepName.LetterReceiveStepName.STEP_LETTER_ADMIN, "", ProcessConstString.StepStatus.STATUS_COMPLETED) == rentity.ReceiveUserID)) //{ // //来文单位 // this.ucCompany.UCNameControl = this.txtCommunicationUnit.ClientID; // this.ucCompany.Visible = true; // //紧急程度设置 // this.txtUrgentDegree.Visible = false; // this.ddlJinJi.Visible = true; // //收文时间 // this.txtReceiveTime.Visible = false; // this.txtReceiveDate.Visible = true; // controls.EnableControls = new Control[] { this.txtCirculateComment, this.txtReceiveNo, this.txtFileEncoding, this.txtDocumentTitle, this.ddlJinJi, this.txtRemark }; // controls.YellowControls = new Control[] { this.txtCirculatePerson, this.txtReceiveDate, this.txtCommunicationUnit }; // controls.DisEnableControls = new Control[] { this.txtPlotComment, this.ddlLeadShip, this.txtPlotMember, this.txtCirculateLeader, this.txtUnderTake, this.txtAssistance, this.txtCirculateDeptName, this.txtUnderTakeComment, this.txtUDPeople, this.txtUDSectionLeader, this.txtPlotMember, this.txtPlotTime, this.txtLeadShipName, this.txtLeadShipTime, this.txtLSComment, this.txtAssign, this.txtUDDeptLeader, this.txtUDDeptLeaderTime, this.txtUDSectionLeaderTime, this.txtUDPeople, this.txtCirculateLeader, this.txtUnderTake, this.txtCirculateDeptName, this.txtAssistance }; // this.divCirculatePerson.Visible = true; // this.btnCommon1.Text = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF2; // this.ucAttachment.UCIsAgain = "0"; // //this.divCirculatePerson.Visible = true; // this.btnCommon1.Visible = false; // this.OASelectUC6.Visible = true; //} //else //{ this.btnCommon1.Visible = false; this.OASelectUC6.Visible = false; //} if (base.StepName == ProcessConstString.StepName.LetterReceiveStepName.STEP_INSTRUCTION) { this.txtLeaderComment.Attributes.Add("readonly", "true"); this.btnInstructionSave.Visible = false; this.btnComplete.Visible = false; } this.btnCY.Visible = false; this.ucRole.Visible = false; this.btnGuidang.Visible = false; this.OASelectUC1.Visible = false; this.OASelectUC2.Visible = false; this.OASelectUC3.Visible = false; this.OASelectUC4.Visible = false; this.OASelectUC5.Visible = false; //this.OASelectUC6.Visible = false; this.btnCommon2.Visible = false; this.btnCommon3.Visible = false; this.btnCommon4.Visible = false; this.btnCommon5.Visible = false; //this.ucAttachment.UCIsEditable = false; //yangzj 20110630 if (base.IsCanDevolve) { this.btnGuidang.Visible = true; if (base.IsDevolve) { this.btnGuidang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } #endregion controls.SetControls(); }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { btnSetNo.Visible = false; btnCheck.Visible = false; lblPages.Visible = false; lblOurRef.Visible = false; ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); OAControl controls = new OAControl(); OAControl controlsCommon = new OAControl(); controlsCommon.DisEnableControls = new Control[] { txtSignDate,txtHuiQianRenDates,txtHeGaoRenDate,txtNiGaoRenDate }; controlsCommon.DisVisibleControls = new Control[] { //btnSetNo,btnCheck }; if (IsPreview == false) { //给于用户提示 txtSubject.ToolTip = "200字符以内"; txtSubject.MaxLength = 200; txtQianFaRen.ToolTip = "公司领导"; txtHuiQianRen.ToolTip = "函件会签组"; txtSignDate.ToolTip = "签发后自动生成"; txtHeGaoRenDate.ToolTip = "核稿后自动生成"; txtHuiQianRenDates.ToolTip = "会签后自动生成"; txtNiGaoRenDate.ToolTip = "拟稿后自动生成"; #region 弹出选择 //签发人 UCQianFa.UCRoleName = "函件签发组"; UCQianFa.UCUserIDControl = wfQianFaRenID.ClientID; UCQianFa.UCUserNameControl = txtQianFaRen.ClientID; UCQianFa.UCIsSingle = true; //会签人 UCHuiQian.UCRoleName = "函件会签组"; UCHuiQian.UCUserIDControl = wfHuiQianRenIDs.ClientID; UCHuiQian.UCUserNameControl = txtHuiQianRen.ClientID; UCHuiQian.UCIsSingle = false; //抄送部门 UCDeptcc.UCDeptIDControl = txtccDeptIDs.ClientID; UCDeptcc.UCDeptNameControl = txtccDept.ClientID; UCDeptcc.UCDeptShowType = "1010"; UCDeptcc.UCSelectType = "0"; UCDeptcc.UCLevel = "2"; UCDeptcc.UCALLChecked = "1"; //抄送领导 UCccLingDao.UCIsSingle = false; UCccLingDao.UCRoleName = "公司领导"; UCccLingDao.UCUserIDControl = txtccLeaderIDs.ClientID; UCccLingDao.UCUserNameControl = txtccLeader.ClientID; //主送单位 UCCompany.UCNoControl = txtCompanyID.ClientID; UCCompany.UCNameControl = txtCompany.ClientID; UCCompany.UCIsSingle = true; //抄送单位 UCCompanycs.UCNameControl = txtccCompany.ClientID; UCCompanycs.UCIsSingle = false; ////UCCompanycc.UCNameControl = txtccCompany.ClientID; //////UCCompanycc.UCIsSingle = false; #endregion switch (base.StepName) { #region 发起函件 case ProcessConstString.StepName.LetterSend.发起函件: wfFaQiRen.Text = CurrentUserInfo.DisplayName; wfFaQiRenID.Text = CurrentUserInfo.UserName; drpSendDept.ToolTip = "我所属的处室"; lblYiJian.Text = "备注"; //核稿人 HeGaoRen(); controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo,drpSendDept, txtSubject,txtContent,txtTo }; controls.YellowControls = new Control[] { txtHeGaoRen, txtQianFaRen,txtHuiQianRen,txtCompany,txtccDept,txtccLeader,txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef, }; if (string.IsNullOrEmpty(base.WorkItemID)) { controls.DisVisibleControls = new Control[] { btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnQianFa,btnWanCheng,btnCancel,btnBack }; } else //是被退回的 可撤销流程 { if (base.IsFromDraft == false) { controls.DisVisibleControls = new Control[] { btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnQianFa,btnWanCheng,btnBack }; btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); } else { controls.DisVisibleControls = new Control[] { btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnQianFa,btnWanCheng,btnBack,btnCancel }; } } break; #endregion #region 核稿 case ProcessConstString.StepName.LetterSend.核稿: controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo,drpSendDept, txtSubject,txtContent,txtTo,txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef,txtHeGaoRen,drpSendDept }; controls.YellowControls = new Control[] { txtQianFaRen,txtHuiQianRen,txtCompany,txtccDept,txtccLeader }; controls.DisVisibleControls = new Control[] { UCHeGao, btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnQianFa,btnWanCheng,btnCancel,btnSubmitHeGao }; break; #endregion #region 会签 case ProcessConstString.StepName.LetterSend.会签: ucAttachment.UCIsEditable = false; btnSumitQianFa.Text = "同意"; controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo, txtSubject,txtContent,txtTo,txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef,txtHeGaoRen,drpSendDept,txtHuiQianRen,txtQianFaRen, }; controls.YellowControls = new Control[] { txtQianFaRen,txtHuiQianRen,txtCompany,txtccDept,txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian,UCHeGao, btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnCancel,btnSubmitHeGao,btnSubmitHuiQian,btnWanCheng,btnQianFa }; break; #endregion #region 签发 case ProcessConstString.StepName.LetterSend.签发: controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo, txtSubject,txtContent,txtTo,txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef,txtHeGaoRen,drpSendDept,txtHuiQianRen,txtQianFaRen, }; controls.YellowControls = new Control[] { txtCompany,txtccDept,txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian,UCHeGao,UCQianFa, btnAddFenfa,btnCheck,btnGD,btnSencondFenfa,btnSetNo,btnCancel,btnSubmitHeGao,btnSubmitHuiQian,btnSumitQianFa,btnWanCheng }; btnQianFa.ToolTip = "提交给函件管理员:" + OAUser.GetUserByRoleName("函件管理员")[1]; break; #endregion #region 函件分发 case ProcessConstString.StepName.LetterSend.函件分发: btnSetNo.Visible = true; btnCheck.Visible = true; lblPages.Visible = true; lblOurRef.Visible = true; drpHanJian.SelectedIndexChanged += new EventHandler(drpHanJian_SelectedIndexChanged); txtCompanyID.TextChanged += new EventHandler(txtCompanyID_TextChanged); if (base.IsDevolve) { this.btnGD.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo, txtSubject,txtContent,txtOurRef,txtTo,txtccCompany }; controls.DisEnableControls = new Control[] { txtHeGaoRen,drpSendDept,txtHuiQianRen,txtQianFaRen, }; controls.YellowControls = new Control[] { txtCompany,txtccDept,txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian,UCHeGao,UCQianFa, btnAddFenfa,btnSencondFenfa,btnCancel,btnSubmitHeGao,btnSubmitHuiQian,btnSumitQianFa,btnQianFa }; break; #endregion case ProcessConstString.StepName.LetterSend.二次分发: break; default: break; } controlsCommon.SetControls(); controls.SetControls(); } //历史表单 else { EntityLetterSend entity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend(); ucAttachment.UCIsEditable = false; controls.DisEnableControls = new Control[] { txtOurRef,txtHeGaoRen,drpSendDept,txtHuiQianRen,txtQianFaRen, chkJinJi, chkHuiZhi,txtPages,drpHanJian,txtYourRef,txtEquipmentCode,txtContractNo, txtSubject,txtContent,txtTo, txtCompany,txtccCompany,txtccDept,txtccLeader,txtComment, }; controls.DisVisibleControls = new Control[] { UCHeGao,UCHuiQian,UCQianFa,UCCompany,UCCompanycc,UCccLingDao,UCDeptcc, btnSubmitHeGao,btnSubmitHuiQian,btnSumitQianFa,btnSave,btnSencondFenfa,btnSetNo,btnWanCheng,btnGD,btnCancel,btnQianFa,btnBack,btnAddFenfa }; controlsCommon.SetControls(); controls.SetControls(); switch (base.StepName) { #region 发起函件 case ProcessConstString.StepName.LetterSend.发起函件: break; #endregion #region 核稿 case ProcessConstString.StepName.LetterSend.核稿: break; #endregion #region 会签 case ProcessConstString.StepName.LetterSend.会签: break; #endregion #region 签发 case ProcessConstString.StepName.LetterSend.签发: break; #endregion #region 函件分发 case ProcessConstString.StepName.LetterSend.函件分发: if (entity.ReceiveUserID == CurrentUserInfo.UserName) //自己办理的公办才允许追加分发 { btnAddFenfa.Visible = true; btnSencondFenfa.Visible = true; //抄送部门 UCDeptcc.UCDeptIDControl = txtccDeptIDs.ClientID; UCDeptcc.UCDeptNameControl = txtccDept.ClientID; UCDeptcc.UCDeptShowType = "1010"; UCDeptcc.UCSelectType = "0"; UCDeptcc.UCLevel = "2"; //抄送领导 UCccLingDao.UCIsSingle = false; UCccLingDao.UCRoleName = "公司领导"; UCccLingDao.UCUserIDControl = txtccLeaderIDs.ClientID; UCccLingDao.UCUserNameControl = txtccLeader.ClientID; UCDeptcc.Visible = true; UCccLingDao.Visible = true; base.StepName = "二次分发"; btnSencondFenfa.Visible = true; btnAddFenfa.Visible = true; ucAttachment.UCIsAgain = "1"; } break; #endregion default: break; } if (base.IsCanDevolve) { this.btnGD.Visible = true; if (base.IsDevolve) { this.btnGD.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { btnSetNo.Visible = false; btnCheck.Visible = false; lblPages.Visible = false; lblOurRef.Visible = false; ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); OAControl controls = new OAControl(); OAControl controlsCommon = new OAControl(); controlsCommon.DisEnableControls = new Control[] { txtSignDate, txtHuiQianRenDates, txtHeGaoRenDate, txtNiGaoRenDate }; controlsCommon.DisVisibleControls = new Control[] { //btnSetNo,btnCheck }; if (IsPreview == false) { //给于用户提示 txtSubject.ToolTip = "200字符以内"; txtSubject.MaxLength = 200; txtQianFaRen.ToolTip = "公司领导"; txtHuiQianRen.ToolTip = "函件会签组"; txtSignDate.ToolTip = "签发后自动生成"; txtHeGaoRenDate.ToolTip = "核稿后自动生成"; txtHuiQianRenDates.ToolTip = "会签后自动生成"; txtNiGaoRenDate.ToolTip = "拟稿后自动生成"; #region 弹出选择 //签发人 UCQianFa.UCRoleName = "函件签发组"; UCQianFa.UCUserIDControl = wfQianFaRenID.ClientID; UCQianFa.UCUserNameControl = txtQianFaRen.ClientID; UCQianFa.UCIsSingle = true; //会签人 UCHuiQian.UCRoleName = "函件会签组"; UCHuiQian.UCUserIDControl = wfHuiQianRenIDs.ClientID; UCHuiQian.UCUserNameControl = txtHuiQianRen.ClientID; UCHuiQian.UCIsSingle = false; //抄送部门 UCDeptcc.UCDeptIDControl = txtccDeptIDs.ClientID; UCDeptcc.UCDeptNameControl = txtccDept.ClientID; UCDeptcc.UCDeptShowType = "1010"; UCDeptcc.UCSelectType = "0"; UCDeptcc.UCLevel = "2"; UCDeptcc.UCALLChecked = "1"; //抄送领导 UCccLingDao.UCIsSingle = false; UCccLingDao.UCRoleName = "公司领导"; UCccLingDao.UCUserIDControl = txtccLeaderIDs.ClientID; UCccLingDao.UCUserNameControl = txtccLeader.ClientID; //主送单位 UCCompany.UCNoControl = txtCompanyID.ClientID; UCCompany.UCNameControl = txtCompany.ClientID; UCCompany.UCIsSingle = true; //抄送单位 UCCompanycs.UCNameControl = txtccCompany.ClientID; UCCompanycs.UCIsSingle = false; ////UCCompanycc.UCNameControl = txtccCompany.ClientID; //////UCCompanycc.UCIsSingle = false; #endregion switch (base.StepName) { #region 发起函件 case ProcessConstString.StepName.LetterSend.发起函件: wfFaQiRen.Text = CurrentUserInfo.DisplayName; wfFaQiRenID.Text = CurrentUserInfo.UserName; drpSendDept.ToolTip = "我所属的处室"; lblYiJian.Text = "备注"; //核稿人 HeGaoRen(); controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, drpSendDept, txtSubject, txtContent, txtTo }; controls.YellowControls = new Control[] { txtHeGaoRen, txtQianFaRen, txtHuiQianRen, txtCompany, txtccDept, txtccLeader, txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef, }; if (string.IsNullOrEmpty(base.WorkItemID)) { controls.DisVisibleControls = new Control[] { btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnQianFa, btnWanCheng, btnCancel, btnBack }; } else //是被退回的 可撤销流程 { if (base.IsFromDraft == false) { controls.DisVisibleControls = new Control[] { btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnQianFa, btnWanCheng, btnBack }; btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); } else { controls.DisVisibleControls = new Control[] { btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnQianFa, btnWanCheng, btnBack, btnCancel }; } } break; #endregion #region 核稿 case ProcessConstString.StepName.LetterSend.核稿: controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, drpSendDept, txtSubject, txtContent, txtTo, txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef, txtHeGaoRen, drpSendDept }; controls.YellowControls = new Control[] { txtQianFaRen, txtHuiQianRen, txtCompany, txtccDept, txtccLeader }; controls.DisVisibleControls = new Control[] { UCHeGao, btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnQianFa, btnWanCheng, btnCancel, btnSubmitHeGao }; break; #endregion #region 会签 case ProcessConstString.StepName.LetterSend.会签: ucAttachment.UCIsEditable = false; btnSumitQianFa.Text = "同意"; controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, txtSubject, txtContent, txtTo, txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef, txtHeGaoRen, drpSendDept, txtHuiQianRen, txtQianFaRen, }; controls.YellowControls = new Control[] { txtQianFaRen, txtHuiQianRen, txtCompany, txtccDept, txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian, UCHeGao, btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnCancel, btnSubmitHeGao, btnSubmitHuiQian, btnWanCheng, btnQianFa }; break; #endregion #region 签发 case ProcessConstString.StepName.LetterSend.签发: controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, txtSubject, txtContent, txtTo, txtccCompany }; controls.DisEnableControls = new Control[] { txtOurRef, txtHeGaoRen, drpSendDept, txtHuiQianRen, txtQianFaRen, }; controls.YellowControls = new Control[] { txtCompany, txtccDept, txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian, UCHeGao, UCQianFa, btnAddFenfa, btnCheck, btnGD, btnSencondFenfa, btnSetNo, btnCancel, btnSubmitHeGao, btnSubmitHuiQian, btnSumitQianFa, btnWanCheng }; btnQianFa.ToolTip = "提交给函件管理员:" + OAUser.GetUserByRoleName("函件管理员")[1]; break; #endregion #region 函件分发 case ProcessConstString.StepName.LetterSend.函件分发: btnSetNo.Visible = true; btnCheck.Visible = true; lblPages.Visible = true; lblOurRef.Visible = true; drpHanJian.SelectedIndexChanged += new EventHandler(drpHanJian_SelectedIndexChanged); txtCompanyID.TextChanged += new EventHandler(txtCompanyID_TextChanged); if (base.IsDevolve) { this.btnGD.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } controls.EnableControls = new Control[] { chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, txtSubject, txtContent, txtOurRef, txtTo, txtccCompany }; controls.DisEnableControls = new Control[] { txtHeGaoRen, drpSendDept, txtHuiQianRen, txtQianFaRen, }; controls.YellowControls = new Control[] { txtCompany, txtccDept, txtccLeader }; controls.DisVisibleControls = new Control[] { UCHuiQian, UCHeGao, UCQianFa, btnAddFenfa, btnSencondFenfa, btnCancel, btnSubmitHeGao, btnSubmitHuiQian, btnSumitQianFa, btnQianFa }; break; #endregion case ProcessConstString.StepName.LetterSend.二次分发: break; default: break; } controlsCommon.SetControls(); controls.SetControls(); } //历史表单 else { EntityLetterSend entity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend(); ucAttachment.UCIsEditable = false; controls.DisEnableControls = new Control[] { txtOurRef, txtHeGaoRen, drpSendDept, txtHuiQianRen, txtQianFaRen, chkJinJi, chkHuiZhi, txtPages, drpHanJian, txtYourRef, txtEquipmentCode, txtContractNo, txtSubject, txtContent, txtTo, txtCompany, txtccCompany, txtccDept, txtccLeader, txtComment, }; controls.DisVisibleControls = new Control[] { UCHeGao, UCHuiQian, UCQianFa, UCCompany, UCCompanycc, UCccLingDao, UCDeptcc, btnSubmitHeGao, btnSubmitHuiQian, btnSumitQianFa, btnSave, btnSencondFenfa, btnSetNo, btnWanCheng, btnGD, btnCancel, btnQianFa, btnBack, btnAddFenfa }; controlsCommon.SetControls(); controls.SetControls(); switch (base.StepName) { #region 发起函件 case ProcessConstString.StepName.LetterSend.发起函件: break; #endregion #region 核稿 case ProcessConstString.StepName.LetterSend.核稿: break; #endregion #region 会签 case ProcessConstString.StepName.LetterSend.会签: break; #endregion #region 签发 case ProcessConstString.StepName.LetterSend.签发: break; #endregion #region 函件分发 case ProcessConstString.StepName.LetterSend.函件分发: if (entity.ReceiveUserID == CurrentUserInfo.UserName) //自己办理的公办才允许追加分发 { btnAddFenfa.Visible = true; btnSencondFenfa.Visible = true; //抄送部门 UCDeptcc.UCDeptIDControl = txtccDeptIDs.ClientID; UCDeptcc.UCDeptNameControl = txtccDept.ClientID; UCDeptcc.UCDeptShowType = "1010"; UCDeptcc.UCSelectType = "0"; UCDeptcc.UCLevel = "2"; //抄送领导 UCccLingDao.UCIsSingle = false; UCccLingDao.UCRoleName = "公司领导"; UCccLingDao.UCUserIDControl = txtccLeaderIDs.ClientID; UCccLingDao.UCUserNameControl = txtccLeader.ClientID; UCDeptcc.Visible = true; UCccLingDao.Visible = true; base.StepName = "二次分发"; btnSencondFenfa.Visible = true; btnAddFenfa.Visible = true; ucAttachment.UCIsAgain = "1"; } break; #endregion default: break; } if (base.IsCanDevolve) { this.btnGD.Visible = true; if (base.IsDevolve) { this.btnGD.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { OAControl controls = new OAControl(); String l_strStepName = base.StepName; if (base.IsPreview) { l_strStepName += "()"; } switch (l_strStepName) { case ProcessConstString.StepName.ReceiveStepName.STEP_INITIAL: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); this.btnSumitInspect.Visible = true; this.btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_PLOT: SetDropDownListDisabled(this.ddlPoliticalOfficer); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); this.btnSubmit.Visible = true; this.btnDeny.Visible = true; this.btnSubmitInstruct.Visible = true; this.btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_PROCESS_CENTER: //收文处理中心 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); this.ucUnderTakeDept.Visible = true; this.divCirculates.Visible = true; this.btnSubmit.Visible = true;////////////////////////////////////////// this.btnSubmitInstruct.Visible = true; this.btnSaveDraft.Visible = true; this.btnSubmitUnderTake.Visible = true; this.btnCirculate.Visible = true; this.btnCirculate.Text = ProcessConstString.SubmitAction.ReceiveBase.DISTRIBUTION; this.txtCirculateDeptName.Attributes.Add("readonly", "readonly"); this.txtCirculatePeopleName.Attributes.Add("readonly", "readonly"); this.txtUnderTakeDeptName.Attributes.Add("readonly", "readonly"); break; case ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION: //领导批示 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); this.tblPlot.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR: //处室承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = true; trUnderTakeMember.Visible = true; this.btnSaveDraft.Visible = true; this.btnAssignChief.Visible = true; this.btnAssignMember.Visible = true; this.btnSubmit.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF: //科室承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = false; trUnderTakeMember.Visible = true; this.btnSaveDraft.Visible = true; this.btnAssignMember.Visible = true; this.btnSubmit.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER: //人员承办 SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); trUnderTakeDept.Visible = false; trUnderTakeSection.Visible = false; trUnderTakeMember.Visible = false; btnSubmit.Visible = true; btnSaveDraft.Visible = true; break; case ProcessConstString.StepName.ReceiveStepName.STEP_DISTRIBUTION: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); this.txtCirculateDeptName.Attributes.Add("readonly", "readonly"); this.txtCirculatePeopleName.Attributes.Add("readonly", "readonly"); this.ucAttachment.UCIsEditable = true; this.divCirculates.Visible = true; btnSubmit.Visible = true; break; default: SetControlReadonly(this.txtPoliticalOfficerComment); SetDropDownListDisabled(this.ddlPoliticalOfficer); SetDropDownListDisabled(this.ddlLeadShip); SetControlReadonly(this.txtUnderTakeDeptName); SetControlReadonly(this.txtUnderTakeCommentEdit); SetControlReadonly(this.txtPromptEdit); break; } controls.SetControls(); if (base.IsCanDevolve) { this.btnArchive.Visible = true; if (base.IsDevolve) { this.btnArchive.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceHWBX entity = base.EntityData != null ? base.EntityData as B_FinanceHWBX : new B_FinanceHWBX(); //base.StepName = "审核"; OAControl controls = new OAControl(); if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, this.ddlShenQianRen, ddlShenHe, ddlShenPi, ddlCaiWu }; controls.DisVisibleControls = new Control[] { this.btnTongYi, this.btnBack, this.btnShenPi, this.btnShenHe, this.btnCaiWu, this.btnShenQian, this.btnWanCheng }; this.txtDocumentNo.ToolTip = "提交后生成"; if (entity.IsBack == true) { btnCancel.Visible = true; } break; #endregion #region 验收 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_YANSHOU: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, ddlShenHe, ddlShenPi, ddlCaiWu, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi, this.btnShenHe, this.btnCaiWu, this.btnYanShou, this.btnTongYi, this.btnCancel, this.btnWanCheng }; break; #endregion #region 立项审签 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_LIXIANGSHENQIAN: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo, this.txtShouKuanYinHang, this.ddlShenQianRen, ddlShenPi, ddlCaiWu, this.txtDanJuZhangShu, this.ddlBianZhiBuMen, this.txtYongTu, this.txtShouKuanDanWei, this.txtShouKuanZhangHao, this.txtBaoXiaoJinE, this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenQian, this.btnShenPi, this.btnCaiWu, this.btnYanShou, this.btnTongYi, this.btnCancel, this.btnWanCheng }; break; #endregion #region 审核 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENHE: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, this.ddlShenQianRen, ddlShenHe, this.ddlBianZhiBuMen, this.ddlYanShouRen, //this.txtDanJuZhangShu,this.txtYongTu,this.txtShouKuanDanWei, this.txtShouKuanYinHang, //this.txtShouKuanZhangHao,this.txtBaoXiaoJinE,this.txtBaoXiaoJinEDaXie, }; controls.DisVisibleControls = new Control[] { this.btnShenHe, this.btnShenQian, this.btnYanShou, this.btnTongYi, this.btnCancel, this.btnWanCheng }; break; #endregion #region 审批 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENPI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtShouKuanYinHang, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, this.ddlShenQianRen, ddlShenHe, ddlShenPi, this.txtDanJuZhangShu, this.ddlBianZhiBuMen, this.txtYongTu, this.txtShouKuanDanWei, this.txtShouKuanZhangHao, this.txtBaoXiaoJinE, this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi, this.btnShenHe, this.btnShenQian, this.btnYanShou, this.btnTongYi, this.btnCancel, this.btnWanCheng }; break; #endregion #region 财务审核 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_CAIWUSHENHE: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, this.ddlShenQianRen, ddlShenHe, ddlShenPi, ddlCaiWu, this.txtDanJuZhangShu, this.ddlBianZhiBuMen, this.txtYongTu, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi, this.btnShenHe, this.btnCaiWu, this.btnShenQian, this.btnYanShou, this.btnCancel, this.btnWanCheng }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_FANKUI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtShouKuanYinHang, this.txtDocumentNo, txtLiXiangHao, txtLiXiangJinE, txtLiXiangLeiJiJinE, this.ddlShenQianRen, ddlShenHe, ddlShenPi, ddlCaiWu, this.txtDanJuZhangShu, this.ddlBianZhiBuMen, this.txtYongTu, this.txtShouKuanDanWei, this.txtShouKuanZhangHao, this.txtBaoXiaoJinE, this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnSave, this.btnShenPi, this.btnShenHe, this.btnCaiWu, this.btnBack, this.btnTongYi, this.btnShenQian, this.btnYanShou, this.btnCancel }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); } }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceHWBX entity = base.EntityData != null ? base.EntityData as B_FinanceHWBX : new B_FinanceHWBX(); //base.StepName = "审核"; OAControl controls = new OAControl(); if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, this.ddlShenQianRen,ddlShenHe,ddlShenPi,ddlCaiWu }; controls.DisVisibleControls = new Control[] { this.btnTongYi,this.btnBack,this.btnShenPi,this.btnShenHe,this.btnCaiWu,this.btnShenQian,this.btnWanCheng }; this.txtDocumentNo.ToolTip = "提交后生成"; if (entity.IsBack == true) { btnCancel.Visible = true; } break; #endregion #region 验收 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_YANSHOU: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, ddlShenHe,ddlShenPi,ddlCaiWu, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi,this.btnShenHe,this.btnCaiWu,this.btnYanShou,this.btnTongYi,this.btnCancel,this.btnWanCheng }; break; #endregion #region 立项审签 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_LIXIANGSHENQIAN: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtDocumentNo,this.txtShouKuanYinHang, this.ddlShenQianRen,ddlShenPi,ddlCaiWu, this.txtDanJuZhangShu,this.ddlBianZhiBuMen,this.txtYongTu, this.txtShouKuanDanWei,this.txtShouKuanZhangHao,this.txtBaoXiaoJinE,this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenQian,this.btnShenPi,this.btnCaiWu,this.btnYanShou,this.btnTongYi,this.btnCancel,this.btnWanCheng }; break; #endregion #region 审核 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENHE: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, this.ddlShenQianRen,ddlShenHe, this.ddlBianZhiBuMen, this.ddlYanShouRen, //this.txtDanJuZhangShu,this.txtYongTu,this.txtShouKuanDanWei, this.txtShouKuanYinHang, //this.txtShouKuanZhangHao,this.txtBaoXiaoJinE,this.txtBaoXiaoJinEDaXie, }; controls.DisVisibleControls = new Control[] { this.btnShenHe, this.btnShenQian,this.btnYanShou,this.btnTongYi,this.btnCancel,this.btnWanCheng }; break; #endregion #region 审批 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENPI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtShouKuanYinHang, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, this.ddlShenQianRen,ddlShenHe,ddlShenPi, this.txtDanJuZhangShu,this.ddlBianZhiBuMen,this.txtYongTu, this.txtShouKuanDanWei,this.txtShouKuanZhangHao,this.txtBaoXiaoJinE,this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi, this.btnShenHe, this.btnShenQian,this.btnYanShou,this.btnTongYi,this.btnCancel,this.btnWanCheng }; break; #endregion #region 财务审核 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_CAIWUSHENHE: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, this.ddlShenQianRen,ddlShenHe,ddlShenPi,ddlCaiWu, this.txtDanJuZhangShu,this.ddlBianZhiBuMen,this.txtYongTu, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnShenPi,this.btnShenHe,this.btnCaiWu, this.btnShenQian,this.btnYanShou,this.btnCancel,this.btnWanCheng }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceHWBXStepName.STEP_FANKUI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen,this.txtNiGaoRiQi, this.txtShouKuanYinHang, this.txtDocumentNo,txtLiXiangHao,txtLiXiangJinE,txtLiXiangLeiJiJinE, this.ddlShenQianRen,ddlShenHe,ddlShenPi,ddlCaiWu, this.txtDanJuZhangShu,this.ddlBianZhiBuMen,this.txtYongTu, this.txtShouKuanDanWei,this.txtShouKuanZhangHao,this.txtBaoXiaoJinE,this.txtBaoXiaoJinEDaXie, this.ddlYanShouRen, }; controls.DisVisibleControls = new Control[] { this.btnSave, this.btnShenPi,this.btnShenHe,this.btnCaiWu,this.btnBack,this.btnTongYi, this.btnShenQian,this.btnYanShou,this.btnCancel }; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); } }
protected override void SetControlStatus() { B_DJGTSend entity = base.EntityData != null ? base.EntityData as B_DJGTSend : new B_DJGTSend(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); ucDeptCounterSignComments.UCTemplateName = base.TemplateName; ucDeptCounterSignComments.UCProcessID = base.ProcessID; ucDeptCounterSignComments.UCWorkItemID = base.WorkItemID; ucDeptCounterSignComments.UCStepName = "部门会签"; ucLeadCounterSignComments.UCTemplateName = base.TemplateName; ucLeadCounterSignComments.UCProcessID = base.ProcessID; ucLeadCounterSignComments.UCWorkItemID = base.WorkItemID; ucLeadCounterSignComments.UCStepName = "领导会签"; //主送 this.ucMainSender.UCSelectType = "2"; this.ucMainSender.UCDeptAndUserControl = this.txtMainSender.ClientID; this.ucMainSender.UCTemplateName = base.TemplateName; this.ucMainSender.UCFormName = "主送"; //抄送 this.ucCopySender.UCSelectType = "2"; this.ucCopySender.UCDeptAndUserControl = this.txtCopySender.ClientID; this.ucCopySender.UCTemplateName = base.TemplateName; this.ucCopySender.UCFormName = "抄送"; //部门会签 this.ucDeptCounterSigns.UCUserIDControl = this.wfDeptSignIDs.ClientID; this.ucDeptCounterSigns.UCUserNameControl = this.txtDeptSigners.ClientID; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.PartyBranchSign; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.PartyBranchSign; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.TradeUnionBranchSign; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: this.ucDeptCounterSigns.UCRoleName = OUConstString.RoleName.YouthLeagueBranchSign; break; } this.ucDeptCounterSigns.UCIsSingle = false; //领导会签 this.ucRole.UCUserIDControl = this.wfLeaderSignIDs.ClientID; this.ucRole.UCUserNameControl = this.txtLeadSigners.ClientID; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.PartySign; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.PartySign; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.TradeUnionSign; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: this.ucRole.UCRoleName = OUConstString.RoleName.YouthLeagueSign; break; } this.ucRole.UCIsSingle = false; //传阅 this.ucOUCirculate.UCDeptIDControl = this.hDeptID.ClientID; this.ucOUCirculate.UCDeptNameControl = this.txtDeptName.ClientID; this.ucOUCirculate.UCRoleUserIDControl = this.hUserID.ClientID; this.ucOUCirculate.UCRoleUserNameControl = this.txtUserName.ClientID; this.ucOUCirculate.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.ucOUCirculate.UCSelectType = "0"; this.ucOUCirculate.UCDeptShowType = "1010"; txtLeadSigners.Attributes.Add("readOnly", "readOnly"); txtDeptSigners.Attributes.Add("readOnly", "readOnly"); OAControl controls = new OAControl(); if (!base.IsPreview) { //this.txtDocumentTitle.ToolTip = "100字符以内"; //this.txtSubjectWord.ToolTip = "100字符以内"; //this.txtComment.ToolTip = "2000字符以内"; //this.txtShareCount.ToolTip = "正整数"; //this.txtSheetCount.ToolTip = "正整数"; string strCheckDraftToolTip = string.Empty; switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: strCheckDraftToolTip = "党纪审稿组"; break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: strCheckDraftToolTip = "党纪审稿组"; break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: strCheckDraftToolTip = "工会审稿组"; break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: strCheckDraftToolTip = "团委审稿组"; break; } this.ddlCheckDrafter.ToolTip = string.IsNullOrEmpty(this.ddlType.SelectedValue) ? "请先选择发文类型" : strCheckDraftToolTip; switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //是否显示撤销按钮 this.btnCancel.Visible = this.wfIsDeny.Text == "True"; //考虑代理人 this.txtDrafter.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.wfDrafterID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //this.txtPhoneNum.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.OfficePhone : entity.PhoneNum; controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ddlType, this.RedSpanCheckDrafter,this.RedSpanTitle, this.RedSpanMainSender, this.ddlCheckDrafter, this.ddlHostDept, this.txtPhoneNum, this.btnSave, this.btnCheckDraft }; break; #endregion #region 审稿 case ProcessConstString.StepName.SendStepName.STEP_CHECK: controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ucDeptCounterSigns, this.RedSpanTitle, this.RedSpanMainSender, this.btnSave,this.btnDeptSign, this.btnVerify, this.btnBack }; controls.YellowControls = new Control[] { this.txtDeptSigners }; controls.DisEnableControls = new Control[] { this.ddlType }; break; #endregion #region 部门会签 case ProcessConstString.StepName.SendStepName.STEP_DEPT: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.txtSubjectWord,this.ddlType, this.txtMainSender, this.txtCopySender, this.txtMyPrompt ,this.txtSendDate}; break; #endregion #region 核稿 case ProcessConstString.StepName.SendStepName.STEP_VERIFY: //获取任务的秘书 this.txtSecretaryChecker.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.wfVerifierID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; controls.EnableControls = new Control[] {this.ucMainSender, this.ucCopySender, this.ucRole,this.RedSpanTitle, this.RedSpanSubjectWord, this.RedSpanMainSender,this.ddlSigner, this.txtLeadSigners, this.btnSave, this.btnLeadSign, this.btnSign, this.btnBack }; controls.DisEnableControls = new Control[] { this.ddlType }; controls.YellowControls = new Control[] { this.txtLeadSigners }; break; #endregion #region 领导会签 case ProcessConstString.StepName.SendStepName.STEP_LEADER: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle,this.ddlType, this.ddlType, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt,this.txtSendDate }; break; #endregion #region 签发 case ProcessConstString.StepName.SendStepName.STEP_SIGN: this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnDistribution, this.btnBackVerify }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.ddlType, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt,this.txtSendDate}; break; #endregion #region 分发 case ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE: if (entity.IsHaveChecked == true) { this.btnCompleteAll.Visible = true; this.btnCompleteAll.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); } controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender,this.trChuanYue,this.RedSpan_No, this.RedSpan_Year, this.RedSpan_Num, this.RedSpanTitle,this.RedSpanMainSender, this.TdYearNum, this.txtDocumentYear, this.txtDocumentNum, this.txtDocumentNo, this.txtShareCount, this.txtSheetCount, this.txtTypist, this.txtReChecker, this.btnSave, this.btnCheck,this.ucOUCirculate }; controls.DisEnableControls = new Control[] { this.ddlType }; controls.YellowControls = new Control[] { this.txtDeptName, this.txtUserName }; break; #endregion #region 校对 case ProcessConstString.StepName.SendStepName.STEP_PROOF: controls.EnableControls = new Control[] { this.RedSpanTitle, this.RedSpanMainSender, this.TdYearNum, this.txtPhoneNum, this.btnSave, this.btnComplete,this.ucMainSender, this.ucCopySender }; controls.DisEnableControls = new Control[] { this.ddlType, this.txtLeadSigners, this.txtDeptSigners }; this.txtChecker.Text = entity.ReceiveUserName; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE) { this.trChuanYue.Visible = true; this.TdYearNum.Visible = true; this.ucOUCirculate.Visible = false; } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DEPT || base.StepName == ProcessConstString.StepName.SendStepName.STEP_LEADER || base.StepName == ProcessConstString.StepName.SendStepName.STEP_SIGN) { this.TdSign.Visible = true; } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_PROOF) { this.TdYearNum.Visible = true; } if (base.IsPreview && base.IsCanDevolve) { this.btn_GuiDang.Visible = true; if (base.IsDevolve) { this.btn_GuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }
protected override void SetControlStatus() { EntitySend entity = base.EntityData != null ? base.EntityData as EntitySend : new EntitySend(); //附件 ucAttachment.UCTemplateName = base.TemplateName; ucAttachment.UCProcessID = base.ProcessID; ucAttachment.UCWorkItemID = base.WorkItemID; ucAttachment.UCTBID = base.IdentityID.ToString(); //设置意见用户控件的属性 ucDeptCounterSignComments.UCTemplateName = base.TemplateName; ucDeptCounterSignComments.UCProcessID = base.ProcessID; ucDeptCounterSignComments.UCWorkItemID = base.WorkItemID; ucDeptCounterSignComments.UCStepName = "部门会签"; ucLeadCounterSignComments.UCTemplateName = base.TemplateName; ucLeadCounterSignComments.UCProcessID = base.ProcessID; ucLeadCounterSignComments.UCWorkItemID = base.WorkItemID; ucLeadCounterSignComments.UCStepName = "领导会签"; //主送 this.ucMainSender.UCSelectType = "2"; this.ucMainSender.UCTemplateName = base.TemplateName; this.ucMainSender.UCFormName = "主送"; this.ucMainSender.UCDeptAndUserControl = this.txtMainSender.ClientID; //抄送 this.ucCopySender.UCSelectType = "2"; this.ucCopySender.UCDeptAndUserControl = this.txtCopySender.ClientID; this.ucCopySender.UCTemplateName = base.TemplateName; this.ucCopySender.UCFormName = "抄送"; //部门会签 this.ucDeptCounterSigns.UCSelectType = "0"; this.ucDeptCounterSigns.UCDeptIDControl = this.txtCounterSignDept.ClientID; this.ucDeptCounterSigns.UCDeptNameControl = this.txtDeptSigners.ClientID; this.ucDeptCounterSigns.UCDeptTreeUserIDControl = this.txtCounterSignDeptLeaders.ClientID; this.ucDeptCounterSigns.UCLevel = "1"; this.ucDeptCounterSigns.UCDeptShowType = "1000"; //会签领导 this.ucRole.UCUserIDControl = this.txtComCounterSignLeaders.ClientID; this.ucRole.UCUserNameControl = this.txtLeadSigners.ClientID; this.ucRole.UCRoleName = ConstString.RoleName.COMPANY_LEADER; this.ucRole.UCIsSingle = false; //传阅 this.ucOUCirculate.UCDeptIDControl = this.hDeptID.ClientID; this.ucOUCirculate.UCDeptNameControl = this.txtDeptName.ClientID; this.ucOUCirculate.UCRoleUserIDControl = this.hUserID.ClientID; this.ucOUCirculate.UCRoleUserNameControl = this.txtUserName.ClientID; this.ucOUCirculate.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.ucOUCirculate.UCSelectType = "0"; this.ucOUCirculate.UCDeptShowType = "1010"; //追加分发 this.ucOUCirculateAppend.UCDeptIDControl = this.hDeptID1.ClientID; this.ucOUCirculateAppend.UCDeptNameControl = this.txtDeptName1.ClientID; this.ucOUCirculateAppend.UCRoleUserIDControl = this.hUserID1.ClientID; this.ucOUCirculateAppend.UCRoleUserNameControl = this.txtUserName1.ClientID; this.ucOUCirculateAppend.UCRole = OUConstString.RoleName.COMPANY_LEADER; this.ucOUCirculateAppend.UCSelectType = "0"; this.ucOUCirculateAppend.UCDeptShowType = "1010"; //发文卡 this.ucSendCard.UCTemplateName = base.TemplateName; this.ucSendCard.UCProcessID = base.ProcessID; this.ucSendCard.UCWorkItemID = base.WorkItemID; this.ucSendCard.UCStepName = "发文卡"; txtLeadSigners.Attributes.Add("readOnly", "readOnly"); txtDeptSigners.Attributes.Add("readOnly", "readOnly"); OAControl controls = new OAControl(); //if (!base.IsPreview) //{ // this.txtDocumentTitle.ToolTip = "100字符以内"; // this.txtSubjectWord.ToolTip = "100字符以内"; // this.txtComment.ToolTip = "2000字符以内"; // this.ddlVerifier.ToolTip = "负责人+处级以上+部门领导"; // this.txtShareCount.ToolTip = "正整数"; // this.txtSheetCount.ToolTip = "正整数"; //} if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //是否显示撤销按钮 this.btnCancel.Visible = this.txtIsDeny.Text == "True"; //考虑代理人 this.txtDrafter.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtDrafterID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //this.txtPhoneNum.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.OfficePhone : entity.PhoneNum; controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.RedSpanCheckDrafter,this.RedSpanTitle, this.RedSpanMainSender, this.ddlVerifier, this.ddlHostDept, this.txtPhoneNum, this.btnSave, this.btnCheckDraft }; break; #endregion #region 审稿 case ProcessConstString.StepName.SendStepName.STEP_CHECK: controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ucDeptCounterSigns, this.RedSpanTitle, this.RedSpanMainSender, this.btnSave,this.btnDeptSign, this.btnVerify, this.btnBack }; controls.YellowControls = new Control[] { this.txtDeptSigners }; break; #endregion #region 部门会签 case ProcessConstString.StepName.SendStepName.STEP_DEPT: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt ,this.txtSendDate}; break; #endregion #region 核稿 case ProcessConstString.StepName.SendStepName.STEP_VERIFY: //获取任务的秘书 this.txtSecretaryChecker.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtVerifierID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.ucRole,this.RedSpanTitle, this.RedSpanSubjectWord, this.RedSpanMainSender,this.ddlSigner, this.txtLeadSigners, this.btnSave, this.btnZhuRenSign, this.btnLeadSign, this.btnSign, this.btnBack }; //controls.DisEnableControls = new Control[] { this.txtMainSender, this.txtCopySender }; controls.YellowControls = new Control[] { this.txtLeadSigners }; break; #endregion #region 主任核稿 case ProcessConstString.StepName.SendStepName.STEP_ZRVERIFY: controls.EnableControls = new Control[] { this.ucMainSender, this.ucCopySender, this.RedSpanTitle, this.RedSpanSubjectWord, this.RedSpanMainSender, this.btnSave, this.btnComplete }; //controls.DisEnableControls = new Control[] { this.txtMainSender, this.txtCopySender }; //处长副处长 this.txtDirectorChecker.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtDirectorCheckerID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; break; #endregion #region 领导会签 case ProcessConstString.StepName.SendStepName.STEP_LEADER: this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnSaveSign, this.btnCompleteSign }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt,this.txtSendDate }; break; #endregion #region 签发 case ProcessConstString.StepName.SendStepName.STEP_SIGN: this.txtSendDate.Enabled = false; controls.EnableControls = new Control[] { this.TdSign, this.btnDistribution, this.btnBackVerify }; controls.DisEnableControls = new Control[] { this.ddlUrgentDegree, this.txtDocumentTitle, this.txtSubjectWord, this.txtMainSender, this.txtCopySender, this.txtMyPrompt,this.txtSendDate}; break; #endregion #region 分发 case ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE: //controls.EnableControls = new Control[] {this.RedSpan_No, this.RedSpan_Year, // this.RedSpan_Num, this.RedSpanTitle,this.RedSpanMainSender, this.TdYearNum, this.txtDocumentYear, // this.txtDocumentNum, this.txtDocumentNo, this.txtShareCount, this.txtSheetCount, this.txtTypist, // this.txtReChecker, this.btnSave, this.btnCheck,this.ucOUCirculate }; controls.EnableControls = new Control[] {this.RedSpan_No, this.RedSpan_Year, this.RedSpan_Num, this.RedSpanTitle,this.RedSpanMainSender, this.TdYearNum, this.txtDocumentYear, this.txtDocumentNum, this.txtDocumentNo, this.txtShareCount, this.txtSheetCount, this.txtTypist, this.txtReChecker, this.btnSave, this.btnCheck,this.ucOUCirculate,this.ucMainSender,this.ucCopySender};//2010-4-29 //controls.DisEnableControls = new Control[] { this.txtMainSender, this.txtCopySender }; controls.YellowControls = new Control[] { this.txtDeptName, this.txtUserName }; if (entity.IsSubmitCheck) { this.btnCompleteAll.Attributes.Add("onclick", "javascript: if(!checkChuanYue()){return false;}else{DisableButtons();}"); this.btnCompleteAll.Visible = true; this.trChuanYue.Visible = true; } else { this.trChuanYue.Visible = false; } break; #endregion #region 校对 case ProcessConstString.StepName.SendStepName.STEP_PROOF: controls.EnableControls = new Control[] { this.RedSpanTitle, this.RedSpanMainSender, this.TdYearNum, this.txtPhoneNum, this.btnSave, this.btnComplete ,this.ucMainSender,this.ucCopySender}; this.txtChecker.Text = entity.ReceiveUserName; break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); this.ucAttachment.UCIsEditable = false; this.txtSendDate.Enabled = false; if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE) { this.trChuanYue.Visible = true; this.TdYearNum.Visible = true; this.ucOUCirculate.Visible = false; //查看自己 if (entity.ReceiveUserID == CurrentUserInfo.UserName) { this.btnAddFenFa.Attributes.Add("onclick", "javascript: if(!checkJiXuChuanYue()){return false;}else{DisableButtons();}"); this.btnAddFenFa.Visible = true; this.ucSendCard.Visible = true; this.trAddFenFa.Visible = true; controls.YellowControls = new Control[] { this.txtUserName1, this.txtDeptName1 }; controls.SetControls(); } } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_DEPT || base.StepName == ProcessConstString.StepName.SendStepName.STEP_LEADER || base.StepName == ProcessConstString.StepName.SendStepName.STEP_SIGN) { this.TdSign.Visible = true; } if (base.StepName == ProcessConstString.StepName.SendStepName.STEP_PROOF) { this.TdYearNum.Visible = true; } if (base.IsCanDevolve) { this.btn_GuiDang.Visible = true; if (base.IsDevolve) { this.btn_GuiDang.Attributes.Add("onclick", "javascript: if(!confirm('该流程已经归档,是否重新归档?')){return false;}else{DisableButtons();}"); } } } }