columns.js 1.18 KB
Newer Older
TZW's avatar
TZW committed
1
function getcolumns(ifs) {
wuhao's avatar
wuhao committed
2 3
  return [
    {
TZW's avatar
TZW committed
4 5
      title: '车间代码',
      dataIndex: 'shopCode',
TZW's avatar
TZW committed
6
      width: 180,
TZW's avatar
TZW committed
7 8
      key: 'shopCode',
      formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
wuhao's avatar
wuhao committed
9 10
    },
    {
TZW's avatar
TZW committed
11 12
      title: '车间名称',
      dataIndex: 'shopName',
TZW's avatar
TZW committed
13
      width: 180,
TZW's avatar
TZW committed
14 15
      key: 'shopName',
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
wuhao's avatar
wuhao committed
16 17
    },
    {
TZW's avatar
TZW committed
18
      width: 180,
TZW's avatar
TZW committed
19
      title: '所属工厂',
TZW's avatar
TZW committed
20
      dataIndex: 'factoryName',
TZW's avatar
TZW committed
21
      key: 'factoryId',
TZW's avatar
TZW committed
22
      valueType: 'select',
TZW's avatar
TZW committed
23
      search: false,
TZW's avatar
TZW committed
24
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
TZW's avatar
TZW committed
25
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
TZW's avatar
TZW committed
26 27 28
      fieldProps: {
        disabled: ifs,
      },
wuhao's avatar
wuhao committed
29
    },
TZW's avatar
TZW committed
30 31 32 33 34 35 36 37 38 39 40
    {
      width: 180,
      title: '所属工厂',
      dataIndex: 'factoryName',
      key: 'factoryId',
      valueType: 'select',
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      hideInForm: true,
      hideInTable: true,
    },
wuhao's avatar
wuhao committed
41 42 43 44
  ];
}

export default getcolumns;