spring
2026-07-03 081f242ea3c019f4eddd0fe342c5cf6189da1468
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
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: "code",
      label: "归档编号",
      component: "Input",
      componentProps: { placeholder: "请输入归档编号" },
    },
    {
      fieldName: "projectCode",
      label: "任务编码",
      component: "Input",
      componentProps: { placeholder: "请输入任务编码" },
    },
    {
      fieldName: "productCode",
      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: "code",
      title: "归档编号",
      minWidth: 130,
      slots: { default: "code" },
    },
    { field: "projectCode", title: "任务编码", minWidth: 120 },
    { field: "projectName", title: "任务名称", minWidth: 140 },
    { field: "productCode", title: "产品编码", minWidth: 120 },
    { field: "productName", title: "产品名称", minWidth: 140 },
    { field: "version", title: "版本号", minWidth: 90 },
    {
      field: "archiveStatus",
      title: "归档状态",
      minWidth: 100,
      cellRender: {
        name: "CellDict",
        props: { type: DICT_TYPE.MES_PD_ARCHIVE_STATUS },
      },
    },
    { field: "documentCount", title: "资料数", minWidth: 80 },
    { field: "archiverName", title: "归档人", minWidth: 100 },
    {
      field: "archiveTime",
      title: "归档时间",
      minWidth: 160,
      formatter: "formatDateTime",
    },
  ];
}