function getcolumns(ifs) {
  return [
    {
      title: '车间代码',
      dataIndex: 'shopCode',
      width: 180,
      key: 'shopCode',
      formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
    },
    {
      title: '车间名称',
      dataIndex: 'shopName',
      width: 180,
      key: 'shopName',
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
    },
    {
      width: 180,
      title: '所属工厂',
      dataIndex: 'factoryName',
      key: 'factoryId',
      valueType: 'select',
      search: false,
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      fieldProps: {
        disabled: ifs,
      },
    },
    {
      width: 180,
      title: '所属工厂',
      dataIndex: 'factoryName',
      key: 'factoryId',
      valueType: 'select',
      options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
      formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
      hideInForm: true,
      hideInTable: true,
    },
  ];
}

export default getcolumns;
