• 一个经典的创建职位申请/审批流程


    一个经典的创建职位申请/审批流程

    虽然只是对现有系统的扩充,但是总觉得这样写的代码不够美....但又不知道更好该怎么设计

         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;
                }
            }
       
    

     

    创建职位申请

    经理申请流程:

    1. 列表

      只能看到自己提交的单子

    1. 新建/保存

      保存后效果在这里看是一样的,只是打开方式和职位信息后面有(已保存)

    1. 查看已提交

    1. 查看已通过

    1. 查看已退回

    1. 查看已拒绝

    HR审批流程:

    1. 列表

    HR 不能删除任何单据

    列表显示所有已提交状态的单据和 当前登录人已审核过的单据

    1. 创建

    创建功能待定

    1. 审批单据

    1. 查看已通过/查看已退回/查看已拒绝

    可查看 不可编辑

  • 相关阅读:
    SQL的四种连接(内连接,外连接)
    MySQL连表操作之一对多
    [转]Mysql连表之多对多
    Hibernate笔记二
    Hibernate框架报错:org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.mikey.hibernate.domain.Person.pid
    Hibernate框架:org.hibernate.exception.SQLGrammarException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java92)
    [转]网络编程三要素
    Hibernate笔记一
    JavaScript高级特征之面向对象笔记
    Myeclipse创建HTML文件中文显示乱码问题
  • 原文地址:https://www.cnblogs.com/Qbit/p/2494008.html
Copyright © 2020-2023  润新知