columns.js 2.01 KB
Newer Older
TZW's avatar
TZW committed
1
function getcolumns(ifs) {
wuhao's avatar
wuhao committed
2
  return [
TZW's avatar
TZW committed
3
    { title: '工段代码', dataIndex: 'sectionCode', key: 'sectionCode' },
wuhao's avatar
wuhao committed
4
    {
TZW's avatar
TZW committed
5 6 7 8
      title: '工段名称',
      dataIndex: 'sectionName',
      key: 'sectionName',
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
wuhao's avatar
wuhao committed
9 10
    },
    {
TZW's avatar
TZW committed
11 12
      title: '所属工厂',
      dataIndex: 'factoryName',
TZW's avatar
TZW committed
13
      search: false,
TZW's avatar
TZW committed
14
      width: 180,
TZW's avatar
TZW committed
15 16 17
      key: 'factoryId',
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
TZW's avatar
TZW committed
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
      fieldProps: {
        disabled: ifs,
      },
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
    },
    {
      title: '所属车间',
      dataIndex: 'shopName',
      width: 180,
      search: false,
      key: 'shopId',
      fieldProps: {
        disabled: ifs,
      },
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
      options: {
        path: '/auth/sysShop/getShopSelectionByFactory',
        linkParams: {
          factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
        },
      },
    },
    {
      title: '所属工厂',
      dataIndex: 'factoryName',
      width: 180,
      key: 'factoryId',
TZW's avatar
TZW committed
46 47 48
      fieldProps: {
        showSearch: true,
      },
TZW's avatar
TZW committed
49 50 51 52
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
      hideInTable: true,
      hideInForm: true,
TZW's avatar
TZW committed
53
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
wuhao's avatar
wuhao committed
54 55
    },
    {
TZW's avatar
TZW committed
56 57
      title: '所属车间',
      dataIndex: 'shopName',
TZW's avatar
TZW committed
58
      width: 180,
TZW's avatar
TZW committed
59
      key: 'shopId',
TZW's avatar
TZW committed
60 61
      hideInTable: true,
      hideInForm: true,
TZW's avatar
TZW committed
62 63 64
      fieldProps: {
        showSearch: true,
      },
TZW's avatar
TZW committed
65 66
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
TZW's avatar
TZW committed
67
      options: {
TZW's avatar
TZW committed
68
        path: '/auth/sysShop/getAllShopSelection',
TZW's avatar
TZW committed
69
        params: {},
TZW's avatar
TZW committed
70
      },
wuhao's avatar
wuhao committed
71 72 73 74 75
    },
  ];
}

export default getcolumns;