zhou zhou
21 小时以前 7c2bffa1a495cc4a3a263f654c08c231009c5c4e
rsf-design/src/views/basic-info/bas-station-area/index.vue
@@ -12,9 +12,9 @@
      <ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
        <template #left>
          <ElSpace wrap>
            <ElButton v-auth="'add'" @click="handleShowDialog('add')" v-ripple
              >新增站点区域</ElButton
            >
            <ElButton v-auth="'add'" @click="handleShowDialog('add')" v-ripple>
              {{ t('pages.basicInfo.basStationArea.actions.add') }}
            </ElButton>
            <ElButton
              v-auth="'delete'"
              type="danger"
@@ -22,7 +22,7 @@
              @click="handleBatchDelete"
              v-ripple
            >
              批量删除
              {{ t('common.actions.batchDelete') }}
            </ElButton>
            <ListExportPrint
              class="inline-flex"
@@ -77,6 +77,7 @@
<script setup>
  import { computed, onMounted, ref } from 'vue'
  import { ElMessage } from 'element-plus'
  import { useI18n } from 'vue-i18n'
  import ListExportPrint from '@/components/biz/list-export-print/index.vue'
  import { useAuth } from '@/hooks/core/useAuth'
  import { useTable } from '@/hooks/core/useTable'
@@ -126,6 +127,7 @@
  const { hasAuth } = useAuth()
  const userStore = useUserStore()
  const { t } = useI18n()
  const searchForm = ref(createBasStationAreaSearchState())
  const detailDrawerVisible = ref(false)
@@ -192,56 +194,56 @@
  const searchItems = computed(() => [
    {
      label: '关键字',
      label: t('pages.basicInfo.basStationArea.search.condition'),
      key: 'condition',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入站点区域名称/编号/备注'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.condition')
      }
    },
    {
      label: '开始时间',
      label: t('pages.basicInfo.basStationArea.search.timeStart'),
      key: 'timeStart',
      type: 'date',
      props: {
        clearable: true,
        type: 'date',
        valueFormat: 'YYYY-MM-DD',
        placeholder: '请选择开始时间'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.timeStart')
      }
    },
    {
      label: '结束时间',
      label: t('pages.basicInfo.basStationArea.search.timeEnd'),
      key: 'timeEnd',
      type: 'date',
      props: {
        clearable: true,
        type: 'date',
        valueFormat: 'YYYY-MM-DD',
        placeholder: '请选择结束时间'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.timeEnd')
      }
    },
    {
      label: '站点区域名称',
      label: t('pages.basicInfo.basStationArea.search.stationAreaName'),
      key: 'stationAreaName',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入站点区域名称'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaName')
      }
    },
    {
      label: '站点区域编号',
      label: t('pages.basicInfo.basStationArea.search.stationAreaId'),
      key: 'stationAreaId',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入站点区域编号'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaId')
      }
    },
    {
      label: '站点类型',
      label: t('pages.basicInfo.basStationArea.search.type'),
      key: 'type',
      type: 'select',
      props: {
@@ -250,7 +252,7 @@
      }
    },
    {
      label: '所属库区',
      label: t('pages.basicInfo.basStationArea.search.area'),
      key: 'area',
      type: 'select',
      props: {
@@ -260,7 +262,7 @@
      }
    },
    {
      label: '使用状态',
      label: t('pages.basicInfo.basStationArea.search.useStatus'),
      key: 'useStatus',
      type: 'select',
      props: {
@@ -270,7 +272,7 @@
      }
    },
    {
      label: '可入',
      label: t('pages.basicInfo.basStationArea.search.inAble'),
      key: 'inAble',
      type: 'select',
      props: {
@@ -279,7 +281,7 @@
      }
    },
    {
      label: '可出',
      label: t('pages.basicInfo.basStationArea.search.outAble'),
      key: 'outAble',
      type: 'select',
      props: {
@@ -288,7 +290,7 @@
      }
    },
    {
      label: '是否跨区',
      label: t('pages.basicInfo.basStationArea.search.isCrossZone'),
      key: 'isCrossZone',
      type: 'select',
      props: {
@@ -297,16 +299,16 @@
      }
    },
    {
      label: '跨区区域',
      label: t('pages.basicInfo.basStationArea.search.crossZoneArea'),
      key: 'crossZoneArea',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入跨区区域'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.crossZoneArea')
      }
    },
    {
      label: '是否WCS',
      label: t('pages.basicInfo.basStationArea.search.isWcs'),
      key: 'isWcs',
      type: 'select',
      props: {
@@ -315,25 +317,25 @@
      }
    },
    {
      label: 'WCS数据',
      label: t('pages.basicInfo.basStationArea.search.wcsData'),
      key: 'wcsData',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入WCS数据'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.wcsData')
      }
    },
    {
      label: '容器类型',
      label: t('pages.basicInfo.basStationArea.search.containerType'),
      key: 'containerType',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入容器类型'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.containerType')
      }
    },
    {
      label: '自动调拨',
      label: t('pages.basicInfo.basStationArea.search.autoTransfer'),
      key: 'autoTransfer',
      type: 'select',
      props: {
@@ -342,25 +344,25 @@
      }
    },
    {
      label: '条码',
      label: t('pages.basicInfo.basStationArea.search.barcode'),
      key: 'barcode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入条码'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.barcode')
      }
    },
    {
      label: '站点别名',
      label: t('pages.basicInfo.basStationArea.search.stationAlias'),
      key: 'stationAlias',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入站点别名'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAlias')
      }
    },
    {
      label: '状态',
      label: t('pages.basicInfo.basStationArea.search.status'),
      key: 'status',
      type: 'select',
      props: {
@@ -369,12 +371,12 @@
      }
    },
    {
      label: '备注',
      label: t('pages.basicInfo.basStationArea.search.memo'),
      key: 'memo',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入备注'
        placeholder: t('pages.basicInfo.basStationArea.placeholder.memo')
      }
    }
  ])
@@ -387,7 +389,7 @@
        fetchBasStationAreaDetail(row.id),
        {},
        {
          timeoutMessage: '站点区域详情加载超时,已停止等待'
          timeoutMessage: t('pages.basicInfo.basStationArea.messages.detailTimeout')
        }
      )
      detailData.value = normalizeBasStationAreaDetailRecord(detail, {
@@ -401,7 +403,7 @@
    } catch (error) {
      detailDrawerVisible.value = false
      detailData.value = {}
      ElMessage.error(error?.message || '获取站点区域详情失败')
      ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed'))
    } finally {
      detailLoading.value = false
    }
@@ -430,7 +432,7 @@
        ),
        { records: [] },
        {
          timeoutMessage: '站点别名选项加载超时,已停止等待'
          timeoutMessage: t('pages.basicInfo.basStationArea.messages.stationAliasTimeout')
        }
      )
      stationOptions.value = resolveBasStationAreaStationOptions(
@@ -457,12 +459,12 @@
        fetchBasStationAreaDetail(row.id),
        {},
        {
          timeoutMessage: '站点区域详情加载超时,已停止等待'
          timeoutMessage: t('pages.basicInfo.basStationArea.messages.detailTimeout')
        }
      )
      await handleShowDialog('edit', detail)
    } catch (error) {
      ElMessage.error(error?.message || '获取站点区域详情失败')
      ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed'))
    }
  }
@@ -531,7 +533,7 @@
    saveRequest: fetchSaveBasStationArea,
    updateRequest: fetchUpdateBasStationArea,
    deleteRequest: fetchDeleteBasStationArea,
    entityName: '站点区域',
    entityName: t('pages.basicInfo.basStationArea.entity'),
    resolveRecordLabel: (record) => record?.stationAreaName || record?.stationAreaId || record?.id,
    refreshCreate,
    refreshUpdate,
@@ -605,7 +607,7 @@
  async function loadAreaOptions() {
    const response = await guardRequestWithMessage(fetchWarehouseAreasList(), [], {
      timeoutMessage: '库区选项加载超时,已停止等待'
      timeoutMessage: t('pages.basicInfo.basStationArea.messages.areaOptionsTimeout')
    })
    const options = resolveBasStationAreaWarehouseAreaOptions(
      defaultResponseAdapter(response).records
@@ -623,7 +625,7 @@
        status: 1
      }),
      { records: [] },
      { timeoutMessage: '容器类型选项加载超时,已停止等待' }
      { timeoutMessage: t('pages.basicInfo.basStationArea.messages.containerTypeTimeout') }
    )
    containerTypeOptions.value = resolveBasStationAreaContainerTypeOptions(
      defaultResponseAdapter(response).records
@@ -639,7 +641,7 @@
        status: 1
      }),
      { records: [] },
      { timeoutMessage: '使用状态选项加载超时,已停止等待' }
      { timeoutMessage: t('pages.basicInfo.basStationArea.messages.useStatusTimeout') }
    )
    useStatusOptions.value = resolveBasStationAreaUseStatusOptions(
      defaultResponseAdapter(response).records