columns.js 2.17 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: 'productionLineCode', key: 'productionLineCode', width: 180 },
wuhao's avatar
wuhao committed
4
    {
TZW's avatar
TZW committed
5 6 7
      title: '产线名称',
      dataIndex: 'productionLineName',
      key: 'productionLineName',
TZW's avatar
TZW committed
8
      width: 180,
TZW's avatar
TZW committed
9
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
wuhao's avatar
wuhao committed
10 11
    },
    {
TZW's avatar
TZW committed
12 13
      title: '所属工厂',
      dataIndex: 'factoryName',
TZW's avatar
TZW committed
14
      fieldProps: {
TZW's avatar
TZW committed
15
        showSearch: true,
TZW's avatar
TZW committed
16
      },
TZW's avatar
TZW committed
17 18
      key: 'factoryId',
      width: 180,
TZW's avatar
TZW committed
19 20 21
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
wuhao's avatar
wuhao committed
22 23
    },
    {
TZW's avatar
TZW committed
24 25
      title: '所属车间',
      dataIndex: 'shopName',
TZW's avatar
TZW committed
26
      key: 'shopId',
TZW's avatar
TZW committed
27
      fieldProps: {
TZW's avatar
TZW committed
28
        showSearch: true,
TZW's avatar
TZW committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
      },
      width: 180,
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
      options: {
        path: '/auth/sysShop/getShopSelectionByFactory',
        linkParams: {
          factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
        },
      },
    },
    {
      title: '所属工厂',
      dataIndex: 'factoryName',
      key: 'factoryId',
      width: 180,
      hideInTable: true,
TZW's avatar
TZW committed
46
      search: false,
TZW's avatar
TZW committed
47 48 49 50 51 52 53 54 55 56 57 58 59
      hideInForm: true,
      fieldProps: {
        disabled: ifs,
      },
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
    },
    {
      title: '所属车间',
      dataIndex: 'shopName',
      key: 'shopId',
      hideInTable: true,
TZW's avatar
TZW committed
60
      search: false,
TZW's avatar
TZW committed
61 62 63 64
      hideInForm: true,
      fieldProps: {
        disabled: ifs,
      },
TZW's avatar
TZW committed
65
      width: 180,
TZW's avatar
TZW committed
66 67
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      valueType: 'select',
TZW's avatar
TZW committed
68 69 70 71 72 73
      options: {
        path: '/auth/sysShop/getShopSelectionByFactory',
        linkParams: {
          factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
        },
      },
wuhao's avatar
wuhao committed
74 75 76 77 78
    },
  ];
}

export default getcolumns;