BaseShipArchiveRelateCustomer.data.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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: '开始日期(start date)',
  10. align:"center",
  11. dataIndex: 'startDate',
  12. key: 'startDate'
  13. },
  14. {
  15. title: '客户(customer)',
  16. align:"center",
  17. dataIndex: 'customerId',
  18. key: 'customerId'
  19. },
  20. {
  21. title: '船名(ship name)',
  22. align:"center",
  23. dataIndex: 'name',
  24. key: 'name'
  25. },
  26. ];
  27. //查询数据
  28. export const searchFormSchema: FormSchema[] = [
  29. ];
  30. //表单数据
  31. export const formSchema: FormSchema[] = [
  32. {
  33. label: '主表主键(船舶档案)',
  34. field: 'headId',
  35. component: 'Input',
  36. show: false
  37. },
  38. {
  39. label: 'IMO',
  40. field: 'imo',
  41. component: 'Input',
  42. dynamicDisabled:true,
  43. },
  44. {
  45. label: '名称(name)',
  46. field: 'name',
  47. component: 'Input',
  48. },
  49. {
  50. label: '客户(customer)',
  51. field: 'customerId',
  52. component: 'Input',
  53. show: ({ values }) => {
  54. return isShow;
  55. }
  56. },
  57. {
  58. label: '开始日期(start date)',
  59. field: 'startDate',
  60. component: 'DatePicker',
  61. componentProps: {
  62. showTime: false,
  63. valueFormat: 'YYYY-MM-DD'
  64. },
  65. show: ({ values }) => {
  66. return isShow;
  67. }
  68. },
  69. // TODO 主键隐藏字段,目前写死为ID
  70. {
  71. label: '',
  72. field: 'id',
  73. component: 'Input',
  74. show: false
  75. },
  76. ];
  77. // 高级查询数据
  78. export const superQuerySchema = {
  79. status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
  80. headId: {title: '主表主键(船舶档案)',order: 2,view: 'text', type: 'string',},
  81. imo: {title: '唯一编号',order: 3,view: 'text', type: 'string',},
  82. name: {title: '名称',order: 4,view: 'text', type: 'string',},
  83. customerId: {title: '客户',order: 5,view: 'text', type: 'string',},
  84. startDate: {title: '开始日期',order: 6,view: 'datetime', type: 'string',},
  85. };
  86. /**
  87. * 流程表单调用这个方法获取formSchema
  88. * @param param
  89. */
  90. export function getBpmFormSchema(_formData): FormSchema[]{
  91. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  92. return formSchema;
  93. }
  94. let isShow = true;
  95. export function getFIle(st){
  96. if(st == 1){
  97. isShow = false;
  98. }else{
  99. isShow = true;
  100. }
  101. }