shenpi.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. 'use strict';
  2. /**
  3. * 审批流程设置
  4. *
  5. * @author ELlisran
  6. * @date 2020/10/20
  7. * @version
  8. */
  9. // 审批类型
  10. const sp_type = {
  11. advance: 1,
  12. ledger: 2,
  13. revise: 3,
  14. stage: 4,
  15. settle: 7,
  16. change: 5,
  17. material: 6,
  18. // financial: 8, // 资金支付审批流程设置不出现在这里,但请别用8这个类型控制审批流程,因为数据库我用了8来表示资金支付固定审批流
  19. phasePay: 9,
  20. inspection: 10,
  21. };
  22. const sp_other_type = {
  23. financial: 8,
  24. };
  25. // const sp_name = [];
  26. // sp_name[sp_type.advance] = '预付款审批';
  27. // sp_name[sp_type.ledger] = '台账审批';
  28. // sp_name[sp_type.revise] = '台账修订';
  29. // sp_name[sp_type.stage] = '计量期审批';
  30. // sp_name[sp_type.change] = '工程变更审批';
  31. // sp_name[sp_type.material] = '材料调差审批';
  32. const sp_lc = [
  33. { code: 'advance', type: sp_type.advance, name: '预付款审批' },
  34. { code: 'ledger', type: sp_type.ledger, name: '台账审批' },
  35. { code: 'revise', type: sp_type.revise, name: '台账修订' },
  36. { code: 'stage', type: sp_type.stage, name: '计量期审批' },
  37. { code: 'settle', type: sp_type.settle, name: '结算期审批' },
  38. { code: 'change', type: sp_type.change, name: '工程变更审批' },
  39. { code: 'material', type: sp_type.material, name: '材料调差审批' },
  40. // { code: 'financial', type: sp_type.financial, name: '资金支付审批' },
  41. { code: 'phasePay', type: sp_type.phasePay, name: '合同支付审批' },
  42. { code: 'inspection', type: sp_type.inspection, name: '质量巡检审批' },
  43. ];
  44. const sp_status = {
  45. sqspr: 1, // 授权审批人
  46. gdspl: 2, // 固定审批流
  47. gdzs: 3, // 固定终审
  48. };
  49. const sp_status_list = [];
  50. sp_status_list[sp_status.sqspr] = { status: sp_status.sqspr, name: '授权审批人', msg: '由上报人设置审批流程' };
  51. sp_status_list[sp_status.gdspl] = { status: sp_status.gdspl, name: '固定审批流', msg: '审批流程固定,上报人只能按照设置好的审批流程进行' };
  52. sp_status_list[sp_status.gdzs] = { status: sp_status.gdzs, name: '固定终审', msg: '结束审批流为固定人,终审前的审批流程由上报人设置,即授权审批人' };
  53. const change_type = {
  54. change: true,
  55. changeProject: false,
  56. changeApply: false,
  57. changePlan: false,
  58. };
  59. const change_type_list = [
  60. { code: 'change', name: '工程变更' },
  61. { code: 'changeProject', name: '变更立项' },
  62. { code: 'changeApply', name: '变更申请' },
  63. { code: 'changePlan', name: '变更方案' },
  64. ];
  65. module.exports = {
  66. sp_type,
  67. sp_other_type,
  68. sp_lc,
  69. sp_status,
  70. sp_status_list,
  71. change_type,
  72. change_type_list,
  73. };