zhou zhou
2 天以前 50e95b985a72fcec4a93a2470e9efdfb2620148a
rsf-design/src/views/manager/loc-preview/index.vue
@@ -41,6 +41,7 @@
<script setup>
  import { computed, onMounted, reactive, ref } from 'vue'
  import { useI18n } from 'vue-i18n'
  import { useTableColumns } from '@/hooks/core/useTableColumns'
  import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
  import {
@@ -62,6 +63,7 @@
  } from './locPreviewPage.helpers'
  defineOptions({ name: 'LocPreview' })
  const { t } = useI18n()
  const loading = ref(false)
  const detailLoading = ref(false)
@@ -87,30 +89,30 @@
  const searchItems = computed(() => [
    {
      label: '关键字',
      label: t('pages.manager.locPreview.search.condition'),
      key: 'condition',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入库位编码/条码'
        placeholder: t('pages.manager.locPreview.search.conditionPlaceholder')
      }
    },
    {
      label: '库位编码',
      label: t('pages.manager.locPreview.search.code'),
      key: 'code',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入库位编码'
        placeholder: t('pages.manager.locPreview.search.codePlaceholder')
      }
    },
    {
      label: '条码',
      label: t('pages.manager.locPreview.search.barcode'),
      key: 'barcode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入条码'
        placeholder: t('pages.manager.locPreview.search.barcodePlaceholder')
      }
    }
  ])
@@ -119,64 +121,64 @@
    return [
      {
        prop: 'locCode',
        label: '库位编码',
        label: t('pages.manager.locPreview.table.locCode'),
        minWidth: 140,
        showOverflowTooltip: true
      },
      {
        prop: 'wareArea',
        label: '库区',
        label: t('pages.manager.locPreview.table.areaLabel'),
        minWidth: 140,
        showOverflowTooltip: true
      },
      {
        prop: 'orderCode',
        label: '单据编号',
        label: t('pages.orders.common.orderCode'),
        minWidth: 180,
        showOverflowTooltip: true
      },
      {
        prop: 'matnrCode',
        label: '物料编码',
        label: t('table.materialCode'),
        minWidth: 160,
        showOverflowTooltip: true
      },
      {
        prop: 'maktx',
        label: '物料名称',
        label: t('table.materialName'),
        minWidth: 220,
        showOverflowTooltip: true
      },
      {
        prop: 'batch',
        label: '批次',
        label: t('table.batch'),
        minWidth: 140,
        showOverflowTooltip: true
      },
      {
        prop: 'trackCode',
        label: '追踪码',
        label: t('pages.orders.common.trackCode'),
        minWidth: 150,
        showOverflowTooltip: true
      },
      {
        prop: 'unit',
        label: '单位',
        label: t('table.unit'),
        width: 100
      },
      {
        prop: 'anfme',
        label: '可用数量',
        label: t('pages.manager.freeze.table.anfme'),
        width: 120
      },
      {
        prop: 'qty',
        label: '库存数量',
        label: t('pages.manager.freeze.table.qty'),
        width: 120
      },
      {
        prop: 'workQty',
        label: '执行中数量',
        label: t('pages.manager.freeze.table.workQty'),
        width: 120
      },
      ...enabledFields.value.map((field) => ({
@@ -188,7 +190,7 @@
      })),
      {
        prop: 'createTimeText',
        label: '创建时间',
        label: t('table.createTime'),
        minWidth: 180,
        showOverflowTooltip: true
      }
@@ -211,7 +213,7 @@
  async function loadEnabledFieldDefinitions() {
    const fields = await guardRequestWithMessage(fetchEnabledFields(), [], {
      timeoutMessage: '扩展字段加载超时,已停止等待'
      timeoutMessage: t('pages.manager.locPreview.messages.fieldsTimeout')
    })
    enabledFields.value = normalizeLocPreviewEnabledFields(fields)
  }
@@ -233,7 +235,7 @@
          current: pagination.current,
          size: pagination.size
        },
        { timeoutMessage: '库位明细加载超时,已停止等待' }
        { timeoutMessage: t('pages.manager.locPreview.messages.pageTimeout') }
      )
      tableData.value = Array.isArray(response?.records)
        ? response.records.map((record) => normalizeLocPreviewRow(record))
@@ -253,7 +255,7 @@
    try {
      const [detailResponse, itemResponse] = await Promise.all([
        guardRequestWithMessage(fetchLocPreviewDetail(activeLocRow.value.id), {}, {
          timeoutMessage: '库位详情加载超时,已停止等待'
          timeoutMessage: t('pages.manager.locPreview.messages.detailTimeout')
        }),
        guardRequestWithMessage(
          fetchLocPreviewItemsPage({
@@ -267,7 +269,7 @@
            current: detailPagination.current,
            size: detailPagination.size
          },
          { timeoutMessage: '库位库存明细加载超时,已停止等待' }
          { timeoutMessage: t('pages.manager.locPreview.messages.itemPageTimeout') }
        )
      ])