zhou zhou
15 小时以前 50e95b985a72fcec4a93a2470e9efdfb2620148a
rsf-design/src/views/orders/delivery-item/deliveryItemTable.columns.js
@@ -1,119 +1,120 @@
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 createDeliveryItemTableColumns({ handleActionClick } = {}) {
export function createDeliveryItemTableColumns({ handleActionClick, 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: 'deliveryCode',
      label: '交接单号',
      label: t('pages.orders.deliveryItem.table.deliveryCode'),
      minWidth: 160,
      showOverflowTooltip: true,
      formatter: (row) => row.deliveryCode || '--'
    },
    {
      prop: 'deliveryId',
      label: '主单ID',
      label: t('pages.orders.deliveryItem.table.deliveryId'),
      width: 110,
      align: 'right',
      formatter: (row) => row.deliveryId ?? '--'
    },
    {
      prop: 'platItemId',
      label: '平台行号',
      label: t('pages.orders.deliveryItem.table.platItemId'),
      minWidth: 130,
      showOverflowTooltip: true,
      formatter: (row) => row.platItemId || '--'
    },
    {
      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: 'fieldsIndex',
      label: '动态字段索引',
      label: t('pages.orders.deliveryItem.table.fieldsIndex'),
      minWidth: 150,
      showOverflowTooltip: true,
      formatter: (row) => row.fieldsIndex || '--'
    },
    {
      prop: 'unit',
      label: '单位',
      label: t('table.unit'),
      width: 90,
      align: 'center',
      formatter: (row) => row.unit || '--'
    },
    {
      prop: 'anfme',
      label: '数量',
      label: t('table.quantity'),
      width: 110,
      align: 'right',
      formatter: (row) => row.anfme ?? '--'
    },
    {
      prop: 'workQty',
      label: '执行数量',
      label: t('pages.orders.deliveryItem.table.workQty'),
      width: 110,
      align: 'right',
      formatter: (row) => row.workQty ?? '--'
    },
    {
      prop: 'qty',
      label: '已出数量',
      label: t('pages.orders.deliveryItem.table.qty'),
      width: 110,
      align: 'right',
      formatter: (row) => row.qty ?? '--'
    },
    {
      prop: 'nromQty',
      label: '标准包装',
      label: t('pages.orders.deliveryItem.table.nromQty'),
      width: 110,
      align: 'right',
      formatter: (row) => row.nromQty ?? '--'
    },
    {
      prop: 'printQty',
      label: '打印数量',
      label: t('pages.orders.deliveryItem.table.printQty'),
      width: 110,
      align: 'right',
      formatter: (row) => row.printQty ?? '--'
    },
    {
      prop: 'splrName',
      label: '供应商名称',
      label: t('pages.orders.deliveryItem.table.supplierName'),
      minWidth: 180,
      showOverflowTooltip: true,
      formatter: (row) => row.splrName || '--'
    },
    {
      prop: 'splrCode',
      label: '供应商编码',
      label: t('pages.orders.deliveryItem.table.supplierCode'),
      minWidth: 140,
      showOverflowTooltip: true,
      formatter: (row) => row.splrCode || '--'
    },
    {
      prop: 'splrBatch',
      label: '供应商批次',
      label: t('table.supplierBatch'),
      minWidth: 140,
      showOverflowTooltip: true,
      formatter: (row) => row.splrBatch || '--'
    },
    {
      prop: 'status',
      label: '状态',
      label: t('table.status'),
      width: 96,
      align: 'center',
      formatter: (row) =>
@@ -121,14 +122,14 @@
    },
    {
      prop: 'memo',
      label: '备注',
      label: t('table.memo'),
      minWidth: 180,
      showOverflowTooltip: true,
      formatter: (row) => row.memo || '--'
    },
    {
      prop: 'operation',
      label: '操作',
      label: t('table.operation'),
      width: 92,
      fixed: 'right',
      formatter: (row) =>