| | |
| | | import { h } from 'vue' |
| | | import { ElTag } from 'element-plus' |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | import { $t } from '@/locales' |
| | | |
| | | export function createTransferItemTableColumns({ handleView } = {}) { |
| | | export function createTransferItemTableColumns({ handleView, t = $t } = {}) { |
| | | 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: 'transferId', |
| | | label: '调拨单ID', |
| | | label: t('pages.orders.transferItem.table.transferId'), |
| | | width: 110, |
| | | align: 'right', |
| | | formatter: (row) => row.transferId ?? '--' |
| | | }, |
| | | { |
| | | prop: 'transferCode', |
| | | label: '调拨单号', |
| | | label: t('pages.orders.transferItem.table.transferCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.transferCode || '--' |
| | | }, |
| | | { |
| | | prop: 'matnrCode', |
| | | label: '物料编码', |
| | | label: t('table.materialCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.matnrCode || '--' |
| | | }, |
| | | { |
| | | prop: 'maktx', |
| | | label: '物料名称', |
| | | label: t('table.materialName'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.maktx || '--' |
| | | }, |
| | | { |
| | | prop: 'spec', |
| | | label: '规格', |
| | | label: t('pages.orders.transferItem.table.spec'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.spec || '--' |
| | | }, |
| | | { |
| | | prop: 'model', |
| | | label: '型号', |
| | | label: t('pages.orders.transferItem.table.model'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.model || '--' |
| | | }, |
| | | { |
| | | prop: 'batch', |
| | | label: '批次', |
| | | label: t('table.batch'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.batch || '--' |
| | | }, |
| | | { |
| | | prop: 'unit', |
| | | label: '单位', |
| | | label: t('table.unit'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.unit || '--' |
| | | }, |
| | | { |
| | | prop: 'anfme', |
| | | label: '数量', |
| | | label: t('table.quantity'), |
| | | width: 100, |
| | | align: 'right', |
| | | formatter: (row) => row.anfme ?? '--' |
| | | }, |
| | | { |
| | | prop: 'workQty', |
| | | label: '执行数量', |
| | | label: t('pages.orders.transferItem.table.workQty'), |
| | | width: 110, |
| | | align: 'right', |
| | | formatter: (row) => row.workQty ?? '--' |
| | | }, |
| | | { |
| | | prop: 'qty', |
| | | label: '已完成数量', |
| | | label: t('pages.orders.transferItem.table.qty'), |
| | | width: 120, |
| | | align: 'right', |
| | | formatter: (row) => row.qty ?? '--' |
| | | }, |
| | | { |
| | | prop: 'splrCode', |
| | | label: '供应商编码', |
| | | label: t('pages.orders.transferItem.table.supplierCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.splrCode || '--' |
| | | }, |
| | | { |
| | | prop: 'splrName', |
| | | label: '供应商名称', |
| | | label: t('pages.orders.transferItem.table.supplierName'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.splrName || '--' |
| | | }, |
| | | { |
| | | prop: 'fieldsIndex', |
| | | label: '字段索引', |
| | | label: t('pages.orders.transferItem.table.fieldsIndex'), |
| | | minWidth: 130, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.fieldsIndex || '--' |
| | | }, |
| | | { |
| | | prop: 'platItemId', |
| | | label: '平台行号', |
| | | label: t('pages.orders.transferItem.table.platItemId'), |
| | | minWidth: 130, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.platItemId || '--' |
| | | }, |
| | | { |
| | | prop: 'platOrderCode', |
| | | label: '客户订单号', |
| | | label: t('pages.orders.transferItem.table.platOrderCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.platOrderCode || '--' |
| | | }, |
| | | { |
| | | prop: 'platWorkCode', |
| | | label: '工单号', |
| | | label: t('pages.orders.transferItem.table.platWorkCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.platWorkCode || '--' |
| | | }, |
| | | { |
| | | prop: 'projectCode', |
| | | label: '项目号', |
| | | label: t('pages.orders.transferItem.table.projectCode'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.projectCode || '--' |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: t('table.status'), |
| | | width: 96, |
| | | align: 'center', |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: t('table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.updateTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: t('table.operation'), |
| | | width: 96, |
| | | fixed: 'right', |
| | | align: 'center', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |