gaoluyang
昨天 b64a0deae5b5d33f9e20671a68936b27f0b9b00b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 
import { DICT_TYPE } from '#/packages/constants/src';
import { getDictOptions } from '#/packages/effects/hooks/src';
 
export function useGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'archiveCode',
      label: '归档编号',
      component: 'Input',
      componentProps: { placeholder: '请输入归档编号' },
    },
    {
      fieldName: 'productCode',
      label: '产品编码',
      component: 'Input',
      componentProps: { placeholder: '请输入产品编码' },
    },
    {
      fieldName: 'productName',
      label: '产品名称',
      component: 'Input',
      componentProps: { placeholder: '请输入产品名称' },
    },
    {
      fieldName: 'archiveStatus',
      label: '归档状态',
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_TYPE.MES_PD_ARCHIVE_STATUS, 'number'),
        placeholder: '请选择归档状态',
      },
    },
  ];
}
 
export function useGridColumns(): VxeTableGridOptions['columns'] {
  return [
    {
      field: 'archiveCode',
      title: '归档编号',
      minWidth: 130,
      slots: { default: 'archiveCode' },
    },
    { field: 'productCode', title: '产品编码', minWidth: 120 },
    { field: 'productName', title: '产品名称', minWidth: 140 },
    { field: 'taskCode', title: '任务编码', minWidth: 130 },
    { field: 'taskName', title: '任务名称', minWidth: 160 },
    { field: 'archiveCount', title: '归档数量', minWidth: 90 },
    {
      field: 'archiveStatus',
      title: '归档状态',
      minWidth: 100,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.MES_PD_ARCHIVE_STATUS },
      },
    },
    { field: 'archiverNickname', title: '归档人', minWidth: 100 },
    {
      field: 'archiveTime',
      title: '归档时间',
      minWidth: 160,
      formatter: 'formatDateTime',
    },
    { field: 'updaterNickname', title: '更新人', minWidth: 100 },
    {
      field: 'updateTime',
      title: '更新时间',
      minWidth: 160,
      formatter: 'formatDateTime',
    },
 
 
  ];
}