| | |
| | | import { h } from 'vue' |
| | | import { ElProgress, ElTag } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue' |
| | | import { getWaveActionList } from './wavePage.helpers' |
| | | |
| | | export function createWaveTableColumns({ handleActionClick }) { |
| | | export function createWaveTableColumns({ 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: 'code', |
| | | label: '波次单号', |
| | | label: translate('pages.orders.wave.table.code'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'typeLabel', |
| | | label: '波次类型', |
| | | label: translate('pages.orders.wave.table.type'), |
| | | width: 110 |
| | | }, |
| | | { |
| | | prop: 'exceStatusText', |
| | | label: '波次状态', |
| | | label: translate('pages.orders.wave.table.exceStatus'), |
| | | width: 120, |
| | | formatter: (row) => |
| | | h( |
| | |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '应盘数量', |
| | | label: translate('pages.orders.wave.table.anfme'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '执行数量', |
| | | label: translate('pages.orders.wave.table.workQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'qty', |
| | | label: '已盘数量', |
| | | label: translate('pages.orders.wave.table.qty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'orderNum', |
| | | label: '单据数量', |
| | | label: translate('pages.orders.wave.table.orderNum'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'progress', |
| | | label: '进度', |
| | | label: translate('pages.orders.wave.table.progress'), |
| | | width: 160, |
| | | formatter: (row) => |
| | | h(ElProgress, { |
| | |
| | | }, |
| | | { |
| | | prop: 'createTimeText', |
| | | label: '创建时间', |
| | | label: translate('pages.orders.wave.table.createTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: translate('pages.orders.wave.table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'statusLabel', |
| | | label: '状态', |
| | | label: translate('pages.orders.wave.table.status'), |
| | | width: 100, |
| | | formatter: (row) => |
| | | h( |
| | |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: translate('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: getWaveActionList(row), |
| | | list: getWaveActionList(row, translate), |
| | | onClick: (item) => handleActionClick(item, row) |
| | | }) |
| | | } |
| | | ] |
| | | } |
| | | |
| | | export function createWavePreviewItemColumns() { |
| | | export function createWavePreviewItemColumns(t) { |
| | | const translate = typeof t === 'function' ? t : $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.wave.preview.waveCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'orderCode', |
| | | label: '单据编码', |
| | | label: translate('pages.orders.wave.preview.orderCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: '物料编码', |
| | | label: translate('pages.orders.wave.preview.matnrCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: '物料名称', |
| | | label: translate('pages.orders.wave.preview.maktx'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'batch', |
| | | label: '批次', |
| | | label: translate('pages.orders.wave.preview.batch'), |
| | | minWidth: 130, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'unit', |
| | | label: '单位', |
| | | label: translate('pages.orders.wave.preview.unit'), |
| | | width: 90 |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '应配数量', |
| | | label: translate('pages.orders.wave.preview.anfme'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '已配数量', |
| | | label: translate('pages.orders.wave.preview.workQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'stockQty', |
| | | label: '库存数量', |
| | | label: translate('pages.orders.wave.preview.stockQty'), |
| | | width: 110, |
| | | align: 'right' |
| | | }, |
| | | { |
| | | prop: 'splrBatch', |
| | | label: '供应商批次', |
| | | label: translate('pages.orders.wave.preview.splrBatch'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'stockLocsText', |
| | | label: '库位', |
| | | label: translate('pages.orders.wave.preview.stockLocs'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | } |
| | | ] |
| | | } |
| | | |
| | | export function createWaveDetailItemColumns() { |
| | | return createWavePreviewItemColumns() |
| | | export function createWaveDetailItemColumns(t) { |
| | | return createWavePreviewItemColumns(t) |
| | | } |