shenpi.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. safe_inspection: 11,
  22. safe_payment: 12,
  23. // 成本报审相关审批流程,占用13-15,请勿重复使用
  24. // cost_stage_ledger: 13,
  25. // cost_stage_book: 14,
  26. // cost_stage_analysis: 15,
  27. };
  28. const sp_other_type = {
  29. financial: 8,
  30. };
  31. const cost_sp_type = {
  32. cost_stage_ledger: 13,
  33. cost_stage_book: 14,
  34. cost_stage_analysis: 15,
  35. };
  36. // const sp_name = [];
  37. // sp_name[sp_type.advance] = '预付款审批';
  38. // sp_name[sp_type.ledger] = '台账审批';
  39. // sp_name[sp_type.revise] = '台账修订';
  40. // sp_name[sp_type.stage] = '计量期审批';
  41. // sp_name[sp_type.change] = '工程变更审批';
  42. // sp_name[sp_type.material] = '材料调差审批';
  43. const sp_lc = [
  44. { code: 'advance', type: sp_type.advance, name: '预付款审批' },
  45. { code: 'ledger', type: sp_type.ledger, name: '台账审批' },
  46. { code: 'revise', type: sp_type.revise, name: '台账修订' },
  47. { code: 'stage', type: sp_type.stage, name: '计量期审批' },
  48. { code: 'settle', type: sp_type.settle, name: '结算期审批' },
  49. { code: 'change', type: sp_type.change, name: '工程变更审批' },
  50. { code: 'material', type: sp_type.material, name: '材料调差审批' },
  51. // { code: 'financial', type: sp_type.financial, name: '资金支付审批' },
  52. { code: 'phasePay', type: sp_type.phasePay, name: '合同支付审批' },
  53. { code: 'inspection', type: sp_type.inspection, name: '质量巡检审批' },
  54. { code: 'safe_payment', type: sp_type.safe_payment, name: '安全计量审批' },
  55. { code: 'safe_inspection', type: sp_type.safe_inspection, name: '安全巡检审批' },
  56. ];
  57. const cost_sp_lc = [
  58. { code: 'cost_stage_ledger', type: cost_sp_type.cost_stage_ledger, name: '成本报审' },
  59. { code: 'cost_stage_book', type: cost_sp_type.cost_stage_book, name: '财务账面' },
  60. { code: 'cost_stage_analysis', type: cost_sp_type.cost_stage_analysis, name: '成本分析' },
  61. ];
  62. const sp_status = {
  63. sqspr: 1, // 授权审批人
  64. gdspl: 2, // 固定审批流
  65. gdzs: 3, // 固定终审
  66. };
  67. const sp_status_list = [];
  68. sp_status_list[sp_status.sqspr] = { status: sp_status.sqspr, name: '授权审批人', msg: '由上报人设置审批流程' };
  69. sp_status_list[sp_status.gdspl] = { status: sp_status.gdspl, name: '固定审批流', msg: '审批流程固定,上报人只能按照设置好的审批流程进行' };
  70. sp_status_list[sp_status.gdzs] = { status: sp_status.gdzs, name: '固定终审', msg: '结束审批流为固定人,终审前的审批流程由上报人设置,即授权审批人' };
  71. const change_type = {
  72. change: true,
  73. changeProject: false,
  74. changeApply: false,
  75. changePlan: false,
  76. };
  77. const change_type_list = [
  78. { code: 'change', name: '工程变更' },
  79. { code: 'changeProject', name: '变更立项' },
  80. { code: 'changeApply', name: '变更申请' },
  81. { code: 'changePlan', name: '变更方案' },
  82. ];
  83. module.exports = {
  84. sp_type,
  85. sp_other_type,
  86. cost_sp_type,
  87. sp_lc,
  88. cost_sp_lc,
  89. sp_status,
  90. sp_status_list,
  91. change_type,
  92. change_type_list,
  93. };