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

export default getcolumns;