| | |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | import { $t } from '@/locales' |
| | | |
| | | export function createFreezeTableColumns({ enabledFields = [] }) { |
| | | const dynamicColumns = enabledFields.map((field) => ({ |
| | |
| | | return [ |
| | | { |
| | | type: 'globalIndex', |
| | | label: '序号', |
| | | label: $t('table.index'), |
| | | width: 72, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | prop: 'locCode', |
| | | label: '库位编码', |
| | | label: $t('pages.manager.freeze.table.locCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'wareArea', |
| | | label: '库区', |
| | | label: $t('pages.manager.freeze.table.wareArea'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: '物料编码', |
| | | label: $t('pages.manager.freeze.table.matnrCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: '物料名称', |
| | | label: $t('pages.manager.freeze.table.maktx'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'batch', |
| | | label: '批次', |
| | | label: $t('pages.manager.freeze.table.batch'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'trackCode', |
| | | label: '追踪码', |
| | | label: $t('pages.manager.freeze.table.trackCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'unit', |
| | | label: '单位', |
| | | label: $t('table.unit'), |
| | | width: 100 |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '可用数量', |
| | | label: $t('pages.manager.freeze.table.anfme'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'qty', |
| | | label: '库存数量', |
| | | label: $t('pages.manager.freeze.table.qty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '执行中数量', |
| | | label: $t('pages.manager.freeze.table.workQty'), |
| | | width: 120, |
| | | align: 'right' |
| | | }, |
| | | ...dynamicColumns, |
| | | { |
| | | prop: 'statusText', |
| | | label: '状态', |
| | | label: $t('table.status'), |
| | | width: 100 |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: $t('table.updateTime'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'action', |
| | | label: '详情', |
| | | label: $t('common.actions.detail'), |
| | | width: 100, |
| | | fixed: 'right', |
| | | useSlot: true, |