| | |
| | | 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' |
| | | import WaveOrderRelaPanel from './modules/wave-order-rela-panel.vue' |
| | | |
| | | export function createWaveTableColumns({ handleActionClick }) { |
| | | export function createWaveTableColumns({ handleActionClick, t }) { |
| | | const translate = typeof t === 'function' ? t : $t |
| | | return [ |
| | | { |
| | | type: 'expand', |
| | | width: 56, |
| | | formatter: (row) => ({ |
| | | render() { |
| | | return h(WaveOrderRelaPanel, { |
| | | waveId: row.id |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | { type: 'selection', width: 48, align: 'center' }, |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: translate('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'id', |
| | | label: translate('table.id'), |
| | | width: 90, |
| | | 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: 'groupQty', |
| | | label: translate('pages.orders.wave.table.groupQty'), |
| | | 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: 'updateByText', |
| | | label: translate('table.updateBy'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'createByText', |
| | | label: translate('table.createBy'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'statusLabel', |
| | | label: '状态', |
| | | label: translate('pages.orders.wave.table.status'), |
| | | width: 100, |
| | | formatter: (row) => |
| | | h( |
| | |
| | | ) |
| | | }, |
| | | { |
| | | prop: 'memo', |
| | | label: translate('table.memo'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 220, |
| | | 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) |
| | | } |
| | | |
| | | export function createWaveOrderRelaColumns(t) { |
| | | const translate = typeof t === 'function' ? t : $t |
| | | return [ |
| | | { type: 'globalIndex', label: translate('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'asnCode', |
| | | label: translate('pages.orders.wave.rela.asnCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: translate('table.materialCode'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: translate('table.materialName'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'splrBatch', |
| | | label: translate('table.supplierBatch'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'platOrderCode', |
| | | label: translate('pages.orders.wave.rela.platOrderCode'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'spec', |
| | | label: translate('pages.orders.wave.rela.spec'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'model', |
| | | label: translate('pages.orders.wave.rela.model'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { prop: 'anfme', label: translate('table.quantity'), width: 100, align: 'right' }, |
| | | { prop: 'stockUnit', label: translate('table.unit'), width: 90, align: 'center' }, |
| | | { |
| | | prop: 'splrName', |
| | | label: translate('table.supplier'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true |
| | | } |
| | | ] |
| | | } |