From 7529786b5f409ffa7ea0b1d5c3f550c4d0a83d3b Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 19 三月 2026 17:16:55 +0800
Subject: [PATCH] 耗材库存报表增加日期查询,列表增加现净重和来源显示
---
src/pages/inventoryManagement/stockReport/index.vue | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/pages/inventoryManagement/stockReport/index.vue b/src/pages/inventoryManagement/stockReport/index.vue
index 158581d..51c6a2a 100644
--- a/src/pages/inventoryManagement/stockReport/index.vue
+++ b/src/pages/inventoryManagement/stockReport/index.vue
@@ -69,6 +69,8 @@
<view class="row" v-if="searchForm.reportType === 'inout'"><text class="l">鍑哄簱鏁伴噺</text><text class="r">{{ item.totalStockOut }}</text></view>
<view class="row"><text class="l">鐜板湪搴撳瓨</text><text class="r highlight">{{ item.currentStock }}</text></view>
<view class="row" v-if="item.createBy"><text class="l">鍏ュ簱浜�</text><text class="r">{{ item.createBy }}</text></view>
+ <view class="row" v-if="item.currentWeight"><text class="l">鐜板噣閲�(鍚�)</text><text class="r">{{ item.currentWeight }}</text></view>
+ <view class="row" v-if="item.recordType"><text class="l">鏉ユ簮</text><text class="r">{{ getRecordType(item.recordType) }}</text></view>
</view>
</view>
<view class="load-more-wrap">
@@ -100,6 +102,7 @@
getStockInventoryReportList,
getStockInventoryInAndOutReportList
} from '@/api/inventoryManagement/stockInventory.js'
+import {findAllQualifiedStockInRecordTypeOptions} from "@/api/basicData/enum";
const reportTypes = [
{ label: '鏃ユ姤', value: 'daily' },
@@ -147,10 +150,24 @@
p.startMonth = searchForm.value.startMonth + '-01'
p.endMonth = searchForm.value.endMonth + '-01'
} else {
- p.startDate = searchForm.value.startDate
- p.endDate = searchForm.value.endDate
+ p.startMonth = searchForm.value.startDate
+ p.endMonth = searchForm.value.endDate
}
return p
+}
+
+const stockRecordTypeOptions = ref([])
+
+const getRecordType = (recordType) => {
+ return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
+}
+
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+ findAllQualifiedStockInRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
}
const getList = () => {
@@ -262,8 +279,8 @@
searchForm.value.singleDate = today.format('YYYY-MM-DD')
}
if (!searchForm.value.startMonth || !searchForm.value.endMonth) {
- searchForm.value.startMonth = today.subtract(1, 'month').format('YYYY-MM')
- searchForm.value.endMonth = today.format('YYYY-MM')
+ searchForm.value.startMonth = today.format('YYYY-MM')
+ searchForm.value.endMonth = today.add(1, 'month').format('YYYY-MM')
}
if (!searchForm.value.startDate || !searchForm.value.endDate) {
searchForm.value.endDate = today.format('YYYY-MM-DD')
@@ -282,6 +299,7 @@
onShow(() => {
initDefaultDates()
handleQuery()
+ fetchStockRecordTypeOptions()
})
const goBack = () => uni.navigateBack()
--
Gitblit v1.9.3