import AutoTable from '@/components/AutoTable/mtable'; function getcolumns(setdrawer) { const columns = [ { title: '供应商编号', dataIndex: 'supplierNo', key: 'supplierNo', editable: false, }, { title: '供应商名称', dataIndex: 'supplierName', key: 'supplierName', editable: false, }, { title: '更换周期(天)', dataIndex: 'replaceCycle', key: 'replaceCycle', hideInSearch: true, valueType: 'digit', fieldProps: { defaultValue:0, precision: 0, }, formItemProps: { rules: [ { required: true, message: '此项为必填项', }, ], }, }, ]; return { columns: [ { title: '设备型号', dataIndex: 'equipmentModelName', key: 'equipmentModelId', colProps: { span: 8, }, formItemProps: { rules: [ { required: true, message: '此项为必填项', }, ], }, valueType: 'select', mode: 'radio', fieldProps: { showSearch: true, dropdownMatchSelectWidth: 100, }, options: { path: '/asset/equipmentModel/query/selection', params: {}, }, }, { title: '安装部位', dataIndex: 'installPosition', colProps: { span: 8, }, key: 'installPosition', formItemProps: { rules: [ { required: true, message: '此项为必填项', }, ], }, }, { dataIndex: 'sparePartId', valueType: 'select', title: '选择寿命件', colProps: { span: 8, }, key: 'sparePartId', hideInDescriptions: true, hideInSearch: true, hideInTable: true, options: { path: '/sparepart/sparePart/queryLifeSelect', params: {}, }, formItemProps: { rules: [ { required: true, message: '此项为必填项', }, ], }, }, { title: '备件料号', dataIndex: 'sparePartNo', key: 'sparePartNo', hideInForm: true, }, { title: '备件名称', dataIndex: 'sparePartName', key: 'sparePartName', span: 3, hideInForm: true, }, { title: '备件更换周期', dataIndex: 'supplierList', key: 'supplierList', valueType: 'formSelectList', colProps: { span: 24, }, span: 3, columns, hideInSearch: true, hideInTable: true, path: '/sparepart/sparePartSupplier/queryList', params: { status: 1 }, rowName: 'supplierList', render: (text, row) => { console.log(row); return ; }, }, ], pathconfig: { enableadd: true, enableedit: true, enabledelete: true, enabledetail: true, add: '/sparepart/lifePieceStandard/save', edit: '/sparepart/lifePieceStandard/save', list: '/sparepart/lifePieceStandard/queryList', delete: '/sparepart/lifePieceStandard/deleteById', detail: '/sparepart/lifePieceStandard/queryDetails', }, }; } export default getcolumns;