| | |
| | | import { h } from 'vue' |
| | | import { ElTag } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue' |
| | | |
| | | export function createWaveItemTableColumns({ handleActionClick }) { |
| | | export function createWaveItemTableColumns({ handleActionClick, t }) { |
| | | const translate = typeof t === 'function' ? t : $t |
| | | return [ |
| | | { type: 'selection', width: 48, align: 'center' }, |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: translate('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'waveCode', |
| | | label: '波次单号', |
| | | label: translate('pages.orders.waveItem.table.waveCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'orderCode', |
| | | label: '单据编码', |
| | | label: translate('pages.orders.waveItem.table.orderCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: '物料编码', |
| | | label: translate('pages.orders.waveItem.table.matnrCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: '物料名称', |
| | | label: translate('pages.orders.waveItem.table.maktx'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'batch', |
| | | label: '批次', |
| | | label: translate('pages.orders.waveItem.table.batch'), |
| | | minWidth: 130, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'splrBatch', |
| | | label: '供应商批次', |
| | | label: translate('pages.orders.waveItem.table.splrBatch'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'unit', |
| | | label: '单位', |
| | | label: translate('pages.orders.waveItem.table.unit'), |
| | | width: 90 |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '应配数量', |
| | | label: translate('pages.orders.waveItem.table.anfme'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '已配数量', |
| | | label: translate('pages.orders.waveItem.table.workQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'stockQty', |
| | | label: '库存数量', |
| | | label: translate('pages.orders.waveItem.table.stockQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'fieldsIndex', |
| | | label: '动态字段索引', |
| | | label: translate('pages.orders.waveItem.table.fieldsIndex'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'exceStatusText', |
| | | label: '执行状态', |
| | | label: translate('pages.orders.waveItem.table.exceStatus'), |
| | | width: 120, |
| | | formatter: (row) => |
| | | h( |
| | |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: translate('pages.orders.waveItem.table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | label: translate('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: [ |
| | | { |
| | | key: 'view', |
| | | label: '查看详情', |
| | | label: translate('pages.orders.waveItem.actions.view'), |
| | | icon: 'ri:eye-line' |
| | | } |
| | | ], |
| | |
| | | } |
| | | |
| | | export function createWaveItemDetailColumns() { |
| | | const translate = $t |
| | | return [ |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: translate('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'waveCode', |
| | | label: '波次单号', |
| | | label: translate('pages.orders.waveItem.table.waveCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'orderCode', |
| | | label: '单据编码', |
| | | label: translate('pages.orders.waveItem.table.orderCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: '物料编码', |
| | | label: translate('pages.orders.waveItem.table.matnrCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: '物料名称', |
| | | label: translate('pages.orders.waveItem.table.maktx'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'batch', |
| | | label: '批次', |
| | | label: translate('pages.orders.waveItem.table.batch'), |
| | | minWidth: 130, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'splrBatch', |
| | | label: '供应商批次', |
| | | label: translate('pages.orders.waveItem.table.splrBatch'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'unit', |
| | | label: '单位', |
| | | label: translate('pages.orders.waveItem.table.unit'), |
| | | width: 90 |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '应配数量', |
| | | label: translate('pages.orders.waveItem.table.anfme'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '已配数量', |
| | | label: translate('pages.orders.waveItem.table.workQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'stockQty', |
| | | label: '库存数量', |
| | | label: translate('pages.orders.waveItem.table.stockQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'stockLocsText', |
| | | label: '库位', |
| | | label: translate('pages.orders.waveItem.table.stockLocs'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | } |