gaoluyang
4 天以前 d818518ceda59ceb73e7bd792445a3a915545c38
fix(库存报表): 日报/月报展示出库明细

- 表格增加方向、出库批次、出库数量列,出库行显示 out 来源类型
- 入库时间/入库批次/入库人改为时间/单据批次/经手人
- 来源枚举按入库、出库分别匹配

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改1个文件
57 ■■■■■ 文件已修改
src/views/inventoryManagement/stockReport/index.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockReport/index.vue
@@ -148,16 +148,30 @@
                           label="序号"
                           type="index"
                           width="60" />
          <el-table-column label="入库时间"
          <el-table-column label="时间"
                           prop="createTime"
                           width="200"
                           show-overflow-tooltip
                           v-if="searchForm.reportType !== 'inout'" />
          <el-table-column label="入库批次"
                           prop="inboundBatches"
          <el-table-column label="方向"
                           width="80"
                           align="center"
                           v-if="searchForm.reportType !== 'inout'">
            <template #default="scope">
              <el-tag :type="scope.row.direction === 'out' ? 'warning' : 'success'"
                      size="small">
                {{ scope.row.direction === 'out' ? '出库' : '入库' }}
              </el-tag>
            </template>
          </el-table-column>
          <el-table-column label="单据批次"
                           width="180"
                           show-overflow-tooltip
                           v-if="searchForm.reportType !== 'inout'" />
                           v-if="searchForm.reportType !== 'inout'">
            <template #default="scope">
              {{ scope.row.direction === 'out' ? scope.row.outboundBatches : scope.row.inboundBatches }}
            </template>
          </el-table-column>
          <el-table-column label="批号"
                           prop="batchNo"
                           width="180"
@@ -179,12 +193,25 @@
          <el-table-column label="入库数量"
                           prop="stockInNum"
                           align="center"
                           v-else />
                           v-else>
            <template #default="scope">
              {{ scope.row.direction === 'out' ? '-' : scope.row.stockInNum }}
            </template>
          </el-table-column>
          <el-table-column label="出库数量"
                           prop="totalStockOut"
                           width="100"
                           align="center"
                           v-if="searchForm.reportType === 'inout'" />
          <el-table-column label="出库数量"
                           prop="stockOutNum"
                           width="100"
                           align="center"
                           v-else>
            <template #default="scope">
              {{ scope.row.direction === 'out' ? scope.row.stockOutNum : '-' }}
            </template>
          </el-table-column>
          <el-table-column label="现在库存"
                           prop="currentStock"
                           align="center" />
@@ -193,10 +220,10 @@
                           v-if="searchForm.reportType !== 'inout'"
                           show-overflow-tooltip>
            <template #default="scope">
              {{ getRecordType(scope.row.recordType) }}
              {{ getRecordType(scope.row) }}
            </template>
          </el-table-column>
          <el-table-column label="入库人"
          <el-table-column label="经手人"
                           prop="createBy"
                           width="80"
                           v-if="searchForm.reportType !== 'inout'"
@@ -223,6 +250,7 @@
  } from "@/api/inventoryManagement/stockInventory.js";
  import {
    findAllQualifiedStockInRecordTypeOptions,
    findAllQualifiedStockOutRecordTypeOptions,
    // findAllUnQualifiedStockInRecordTypeOptions,
  } from "@/api/basicData/enum.js";
@@ -253,12 +281,14 @@
  const total = ref(0);
  const stockRecordTypeOptions = ref([]);
  const stockOutRecordTypeOptions = ref([]);
  const getRecordType = recordType => {
    return (
      stockRecordTypeOptions.value.find(item => item.value === recordType)
        ?.label || ""
    );
  const getRecordType = row => {
    const options =
      row.direction === "out"
        ? stockOutRecordTypeOptions.value
        : stockRecordTypeOptions.value;
    return options.find(item => item.value === row.recordType)?.label || "";
  };
  // 获取来源类型选项
@@ -272,6 +302,9 @@
      //   ];
      // });
    });
    findAllQualifiedStockOutRecordTypeOptions().then(res => {
      stockOutRecordTypeOptions.value = res.data;
    });
  };
  // 获取表格标题