一个经典的创建职位申请/审批流程
虽然只是对现有系统的扩充,但是总觉得这样写的代码不够美....但又不知道更好该怎么设计
protected void SetFormView(Enumerator.ApprovalResult approvalResult) { switch (approvalResult) { case Enumerator.ApprovalResult.Pending: SelectDictionaryItemsCity.Enabled = false; SelectDictionaryItemsProvince.Enabled = false; if (IsHR) { //待审核状态 trHRInfo.Visible = true; PnAppraval.Visible = true; trApprovalRemark.Visible = true; txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = false; } else { //非HR trHRInfo.Visible = false; trApprovalRemark.Visible = false; PnAppraval.Visible = txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = false; } break; case Enumerator.ApprovalResult.Reject: SelectDictionaryItemsCity.Enabled = false; SelectDictionaryItemsProvince.Enabled = false; //已拒绝状态 trHRInfo.Visible = false; trApprovalRemark.Visible = true; txtApprovalRemark.Enabled = false; PnAppraval.Visible = txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = false; break; case Enumerator.ApprovalResult.Return: //待重新提交状态 if (IsHR) { trHRInfo.Visible = false; trApprovalRemark.Visible = true; txtApprovalRemark.Enabled = false; PnAppraval.Visible = false; txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = false; } else { trHRInfo.Visible = false; trApprovalRemark.Visible = true; txtApprovalRemark.Enabled = false; PnAppraval.Visible = false; txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = true; } break; case Enumerator.ApprovalResult.Waiting: //待提交状态 trHRInfo.Visible = false; trApprovalRemark.Visible = false; PnAppraval.Visible = false; txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = true; break; case Enumerator.ApprovalResult.Approved: SelectDictionaryItemsCity.Enabled = false; SelectDictionaryItemsProvince.Enabled = false; //已拒绝状态 trHRInfo.Visible = false; trApprovalRemark.Visible = true; txtApprovalRemark.Enabled = false; PnAppraval.Visible = txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = false; break; default: //默认状态 trHRInfo.Visible = false; trApprovalRemark.Visible = false; PnAppraval.Visible = false; txtRemark.Enabled = btnSave.Visible = PnSubmit.Visible = true; break; } }
创建职位申请
经理申请流程:
-
列表
只能看到自己提交的单子
-
新建/保存
保存后效果在这里看是一样的,只是打开方式和职位信息后面有个(已保存)
-
查看已提交
-
查看已通过
-
查看已退回
-
查看已拒绝
HR审批流程:
-
列表
HR 不能删除任何单据
列表显示所有已提交状态的单据和 当前登录人已审核过的单据
-
创建
创建功能待定
-
审批单据
-
查看已通过/查看已退回/查看已拒绝
可查看 不可编辑