| | |
| | | import { h } from 'vue' |
| | | import { ElTag } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue' |
| | | import { getTransferActionList } from './transferPage.helpers.js' |
| | | |
| | | export function createTransferTableColumns({ handleActionClick } = {}) { |
| | | return [ |
| | | { type: 'selection', width: 48, align: 'center' }, |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'code', |
| | | label: '调拨单号', |
| | | label: $t('pages.orders.transfer.search.code'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.code || '--' |
| | | }, |
| | | { |
| | | prop: 'typeLabel', |
| | | label: '调拨类型', |
| | | label: $t('pages.orders.transfer.search.type'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.typeLabel || '--' |
| | | }, |
| | | { |
| | | prop: 'sourceText', |
| | | label: '来源', |
| | | label: $t('pages.orders.transfer.search.source'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'orgWareName', |
| | | label: '源仓库', |
| | | label: $t('pages.orders.transfer.search.orgWareName'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.orgWareName || '--' |
| | | }, |
| | | { |
| | | prop: 'tarWareName', |
| | | label: '目标仓库', |
| | | label: $t('pages.orders.transfer.search.tarWareName'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.tarWareName || '--' |
| | | }, |
| | | { |
| | | prop: 'orgAreaName', |
| | | label: '源库区', |
| | | label: $t('pages.orders.transfer.search.orgAreaName'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.orgAreaName || '--' |
| | | }, |
| | | { |
| | | prop: 'tarAreaName', |
| | | label: '目标库区', |
| | | label: $t('pages.orders.transfer.search.tarAreaName'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.tarAreaName || '--' |
| | | }, |
| | | { |
| | | prop: 'exceStatusText', |
| | | label: '执行状态', |
| | | label: $t('pages.orders.transfer.search.exceStatus'), |
| | | minWidth: 120, |
| | | formatter: (row) => |
| | | h(ElTag, { type: row.exceStatusTagType || 'info', effect: 'light' }, () => row.exceStatusText || '--') |
| | | }, |
| | | { |
| | | prop: 'statusText', |
| | | label: '状态', |
| | | label: $t('pages.orders.transfer.search.status'), |
| | | width: 96, |
| | | align: 'center', |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: $t('table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.updateTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'createTimeText', |
| | | label: '创建时间', |
| | | label: $t('table.createTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.createTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'memo', |
| | | label: '备注', |
| | | label: $t('pages.orders.transfer.search.memo'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.memo || '--' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: $t('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | |
| | | |
| | | export function createTransferOrderTableColumns() { |
| | | return [ |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'code', |
| | | label: '关联单号', |
| | | label: $t('pages.orders.transfer.detail.relatedCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.code || '--' |
| | | }, |
| | | { |
| | | prop: 'poCode', |
| | | label: '调拨单号', |
| | | label: $t('pages.orders.transfer.detail.code'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.poCode || '--' |
| | | }, |
| | | { |
| | | prop: 'typeLabel', |
| | | label: '单据类型', |
| | | label: $t('pages.orders.transfer.detail.type'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.typeLabel || '--' |
| | | }, |
| | | { |
| | | prop: 'wkTypeLabel', |
| | | label: '业务类型', |
| | | label: $t('pages.orders.transfer.detail.wkType'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.wkTypeLabel || '--' |
| | | }, |
| | | { |
| | | prop: 'exceStatusText', |
| | | label: '执行状态', |
| | | label: $t('pages.orders.transfer.detail.exceStatus'), |
| | | minWidth: 120, |
| | | formatter: (row) => |
| | | h(ElTag, { type: row.exceStatusTagType || 'info', effect: 'light' }, () => row.exceStatusText || '--') |
| | | }, |
| | | { |
| | | prop: 'statusText', |
| | | label: '状态', |
| | | label: $t('pages.orders.transfer.detail.status'), |
| | | width: 96, |
| | | align: 'center', |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '数量', |
| | | label: $t('table.quantity'), |
| | | width: 110, |
| | | align: 'right', |
| | | formatter: (row) => row.anfme ?? '--' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '执行数量', |
| | | label: $t('pages.orders.transfer.detail.workQty'), |
| | | width: 110, |
| | | align: 'right', |
| | | formatter: (row) => row.workQty ?? '--' |
| | | }, |
| | | { |
| | | prop: 'qty', |
| | | label: '已完成数量', |
| | | label: $t('pages.orders.transfer.detail.qty'), |
| | | width: 110, |
| | | align: 'right', |
| | | formatter: (row) => row.qty ?? '--' |
| | | }, |
| | | { |
| | | prop: 'stationId', |
| | | label: '站点', |
| | | label: $t('pages.orders.transfer.detail.stationId'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.stationId || '--' |
| | | }, |
| | | { |
| | | prop: 'businessTimeText', |
| | | label: '业务时间', |
| | | label: $t('pages.orders.transfer.detail.businessTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.businessTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'createTimeText', |
| | | label: '创建时间', |
| | | label: $t('table.createTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.createTimeText || '--' |