From d818518ceda59ceb73e7bd792445a3a915545c38 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 04 十一月 2026 11:14:04 +0800
Subject: [PATCH] fix(库存报表): 日报/月报展示出库明细
---
src/views/inventoryManagement/stockReport/index.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 12 deletions(-)
diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index 26bc8a0..645cb7d 100644
--- a/src/views/inventoryManagement/stockReport/index.vue
+++ b/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;
+ });
};
// 鑾峰彇琛ㄦ牸鏍囬
--
Gitblit v1.9.3