contract.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. 'use strict';
  2. /**
  3. * 合同管理
  4. *
  5. * @author ELlisran
  6. * @date 2019/10/20
  7. * @version
  8. */
  9. // 类型
  10. const type = {
  11. expenses: 1,
  12. income: 2,
  13. };
  14. const typeMap = {
  15. 1: 'expenses',
  16. 2: 'income',
  17. };
  18. const typeName = {
  19. 1: '支付',
  20. 2: '回款',
  21. };
  22. const colSet = {
  23. [type.expenses]: [
  24. { name: '累计应付', field: 'yf_price', fixed: ['alias'] },
  25. { name: '应付进度', field: 'stackedBar', fixed: ['alias'] },
  26. { name: '累计实付', field: 'sf_price', fixed: ['alias'] },
  27. { name: '实付进度', field: 'stackedBarSf', fixed: ['alias'] },
  28. { name: '备注1', field: 'remark', fixed: [] },
  29. { name: '备注2', field: 'remark2', fixed: [] },
  30. { name: '计算1', field: 'calc', fixed: [] },
  31. { name: '计算2', field: 'calc2', fixed: [] },
  32. ],
  33. [type.income]: [
  34. { name: '累计回款', field: 'yf_price', fixed: ['alias'] },
  35. { name: '回款进度', field: 'stackedBar', fixed: ['alias'] },
  36. { name: '累计实回', field: 'sf_price', fixed: ['alias'] },
  37. { name: '实回进度', field: 'stackedBarSf', fixed: ['alias'] },
  38. { name: '备注1', field: 'remark', fixed: [] },
  39. { name: '备注2', field: 'remark2', fixed: [] },
  40. { name: '计算1', field: 'calc', fixed: [] },
  41. { name: '计算2', field: 'calc2', fixed: [] },
  42. ],
  43. };
  44. const defaultColSet = {
  45. [type.expenses]: [
  46. { field: 'yf_price', show: 1 },
  47. { field: 'stackedBar', show: 1 },
  48. { field: 'sf_price', show: 0 },
  49. { field: 'stackedBarSf', show: 0 },
  50. { field: 'remark', show: 0, alias: '文本框1' },
  51. { field: 'remark2', show: 0, alias: '文本框2' },
  52. { field: 'calc', show: 0, alias: '计算1' },
  53. { field: 'calc2', show: 0, alias: '计算2' },
  54. ],
  55. [type.income]: [
  56. { field: 'yf_price', show: 1 },
  57. { field: 'stackedBar', show: 1 },
  58. { field: 'sf_price', show: 0 },
  59. { field: 'stackedBarSf', show: 0 },
  60. { field: 'remark', show: 0, alias: '文本框1' },
  61. { field: 'remark2', show: 0, alias: '文本框2' },
  62. { field: 'calc', show: 0, alias: '计算1' },
  63. { field: 'calc2', show: 0, alias: '计算2' },
  64. ],
  65. };
  66. module.exports = {
  67. type,
  68. typeMap,
  69. typeName,
  70. colSet,
  71. defaultColSet,
  72. };