gaoluyang
2026-10-17 d1fae0e33ce9578f7a3a7ae29c3eab040ad60a40
fix(wls): 库存现有量左侧分类树超高改为内部滚动

- 分类卡片 body 限制为页面内容高度
- 分类树搜索框固定,树节点区域独立纵向滚动

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改2个文件
38 ■■■■■ 文件已修改
src/views/mes/md/item/type/components/tree.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wls/materialstock/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/md/item/type/components/tree.vue
@@ -99,30 +99,31 @@
</script>
<template>
  <div class="h-full">
  <div class="flex h-full flex-col overflow-hidden">
    <Input
      v-model:value="filterText"
      :placeholder="filterPlaceholder"
      allow-clear
      class="w-full"
      class="w-full shrink-0"
    >
      <template #prefix>
        <IconifyIcon class="size-4" icon="lucide:search" />
      </template>
    </Input>
    <Spin :spinning="loading" wrapper-class-name="w-full">
      <Tree
        v-if="itemTypeTree.length > 0"
        :default-expand-all="true"
        :field-names="{ title: 'name', key: 'id', children: 'children' }"
        :selected-keys="selectedKeys"
        :tree-data="itemTypeTree"
        class="pt-2"
        @select="handleSelect"
      />
      <div v-else-if="!loading" class="py-4 text-center text-gray-500">
        暂无数据
      </div>
    </Spin>
    <div class="min-h-0 flex-1 overflow-y-auto pt-2">
      <Spin :spinning="loading" wrapper-class-name="w-full">
        <Tree
          v-if="itemTypeTree.length > 0"
          :default-expand-all="true"
          :field-names="{ title: 'name', key: 'id', children: 'children' }"
          :selected-keys="selectedKeys"
          :tree-data="itemTypeTree"
          @select="handleSelect"
        />
        <div v-else-if="!loading" class="py-4 text-center text-gray-500">
          暂无数据
        </div>
      </Spin>
    </div>
  </div>
</template>
src/views/wls/materialstock/index.vue
@@ -158,7 +158,10 @@
    <div class="flex h-full w-full">
      <!-- 左侧物料分类树 -->
      <Card class="mr-4 h-full w-1/6">
      <Card
        class="mr-4 h-full w-1/6"
        :body-style="{ height: '100%', overflow: 'hidden' }"
      >
        <MdItemTypeTree @node-click="handleTypeNodeClick" />
      </Card>
      <!-- 右侧库存台账列表 -->