四零语境后端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.1 KiB

1 month ago
  1. import {BasicColumn} from '/@/components/Table';
  2. import {FormSchema} from '/@/components/Table';
  3. import { rules} from '/@/utils/helper/validator';
  4. import { render } from '/@/utils/common/renderUtils';
  5. import { getWeekMonthQuarterYear } from '/@/utils';
  6. //列表数据
  7. export const columns: BasicColumn[] = [
  8. {
  9. title: '优惠券名称',
  10. align:"center",
  11. dataIndex: 'name'
  12. },
  13. {
  14. title: '面额',
  15. align:"center",
  16. dataIndex: 'money'
  17. },
  18. {
  19. title: '有效期',
  20. align:"center",
  21. dataIndex: 'endTime'
  22. },
  23. {
  24. title: '发放数量',
  25. align:"center",
  26. dataIndex: 'count'
  27. },
  28. {
  29. title: '已使用数量',
  30. align:"center",
  31. dataIndex: 'quantityused'
  32. },
  33. ];
  34. //查询数据
  35. export const searchFormSchema: FormSchema[] = [
  36. ];
  37. //表单数据
  38. export const formSchema: FormSchema[] = [
  39. {
  40. label: '优惠券名称',
  41. field: 'name',
  42. component: 'Input',
  43. },
  44. {
  45. label: '面额',
  46. field: 'money',
  47. component: 'InputNumber',
  48. },
  49. {
  50. label: '有效期',
  51. field: 'endTime',
  52. component: 'DatePicker',
  53. componentProps: {
  54. showTime: true,
  55. valueFormat: 'YYYY-MM-DD HH:mm:ss'
  56. },
  57. },
  58. {
  59. label: '发放数量',
  60. field: 'count',
  61. component: 'Input',
  62. },
  63. {
  64. label: '已使用数量',
  65. field: 'quantityused',
  66. component: 'Input',
  67. },
  68. // TODO 主键隐藏字段,目前写死为ID
  69. {
  70. label: '',
  71. field: 'id',
  72. component: 'Input',
  73. show: false
  74. },
  75. ];
  76. // 高级查询数据
  77. export const superQuerySchema = {
  78. name: {title: '优惠券名称',order: 0,view: 'text', type: 'string',},
  79. money: {title: '面额',order: 1,view: 'number', type: 'number',},
  80. endTime: {title: '有效期',order: 2,view: 'datetime', type: 'string',},
  81. count: {title: '发放数量',order: 3,view: 'text', type: 'string',},
  82. quantityused: {title: '已使用数量',order: 4,view: 'text', type: 'string',},
  83. };
  84. /**
  85. * formSchema
  86. * @param param
  87. */
  88. export function getBpmFormSchema(_formData): FormSchema[]{
  89. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  90. return formSchema;
  91. }