| | |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const state = reactive({ |
| | |
| | | }; |
| | | |
| | | state.columns = [ |
| | | { |
| | | title: '#ID', |
| | | dataIndex: 'id', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('id'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_mat.tag_id', '所属归类'), |
| | | dataIndex: 'tagId$', |
| | |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('deadTime'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_mat.safeStockLimit', '安全库存上限'), |
| | | dataIndex: 'safeStockLimit', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('safeStockLimit'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_mat.safeStockMinimum', '安全库存下限'), |
| | | dataIndex: 'safeStockMinimum', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('safeStockMinimum'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_mat.validity', '有效期'), |
| | | dataIndex: 'validity', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('validity'), |
| | | }, |
| | | |
| | | { |
| | |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns"> |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" @resizeColumn="handleResizeColumn"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | <template v-if="column.dataIndex === 'oper'"> |
| | | <div style="display: flex;justify-content: space-evenly;"> |