zs
2025-04-29 716eeb4b87efbdc5b149410bbea4c1f35ac116ac
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
80
81
82
83
84
85
86
export const columns = [
  {
    type: 'seq',
    width: 60,
    title: '序号',
  },
  {
    field: 'materialCode',
    title: '物料编码',
  },
  {
    field: 'materialName',
    title: '物料名称',
  },
  {
    field: 'purchaseType',
    title: '采购类型',
    formatter: ({ cellValue }) => {
      // You'll need to map the enum values to display text
      const purchaseTypeMap = {
        0: '类型1',
        1: '类型2',
        // Add all enum values
      }
      return purchaseTypeMap[cellValue] || cellValue
    },
  },
  {
    field: 'materialType',
    title: '物料类型',
    formatter: ({ cellValue }) => {
      // Map material type enum to display text
      const materialTypeMap = {
        0: '类型A',
        1: '类型B',
        // Add all enum values
      }
      return materialTypeMap[cellValue] || cellValue
    },
  },
  {
    field: 'primaryUnit',
    title: '主单位',
  },
  {
    field: 'standard',
    title: '规格/标准',
  },
  {
    field: 'outerDiameter',
    title: '外径(mm)',
  },
  {
    field: 'wallThickness',
    title: '壁厚(mm)',
  },
  {
    field: 'materialQuality',
    title: '材质',
  },
  {
    field: 'length',
    title: '长度(m)',
  },
  {
    field: 'isMainBranch',
    title: '主支管',
    formatter: ({ cellValue }) => (cellValue ? '是' : '否'),
  },
  {
    field: 'factory',
    title: '生产工厂',
  },
  {
    field: 'certification',
    title: '证书编号',
  },
  {
    field: 'sort',
    title: '排序',
  },
  {
    field: 'remark',
    title: '备注',
  },
]