From e0cb2008ffb01348b54a7370180a100f3c975877 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 06 二月 2026 10:49:24 +0800
Subject: [PATCH] Merge branch 'dev_New' into dev_天津军泰伟业
---
src/views/inventoryManagement/stockReport/index.vue | 51 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index ff1d901..89773cf 100644
--- a/src/views/inventoryManagement/stockReport/index.vue
+++ b/src/views/inventoryManagement/stockReport/index.vue
@@ -48,7 +48,7 @@
style="width: 240px;"
/>
- <el-button type="primary" @click="handleQuery" style="margin-left: 10px">
+ <el-button type="primary" @click="onSearch" style="margin-left: 10px">
鏌ヨ
</el-button>
<el-button @click="handleReset">閲嶇疆</el-button>
@@ -230,21 +230,29 @@
show-overflow-tooltip
/>
</el-table>
+ <pagination
+ :total="total"
+ layout="total, sizes, prev, pager, next, jumper"
+ :page="page.current"
+ :limit="page.size"
+ @pagination="paginationChange"
+ />
</el-card>
</div>
</div>
</template>
<script setup>
-import { ref, reactive, onMounted, nextTick } from 'vue'
+import { ref, reactive, onMounted, nextTick, getCurrentInstance } from 'vue'
import { ElMessage } from 'element-plus'
import * as echarts from 'echarts'
+import pagination from '@/components/PIMTable/Pagination.vue'
import {
getStockInventoryInAndOutReportList,
getStockInventoryReportList
} from "@/api/inventoryManagement/stockInventory.js";
import {
- findAllQualifiedStockInRecordTypeOptions,
+ findAllQualifiedStockInRecordTypeOptions,findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
@@ -267,6 +275,13 @@
tableData: []
})
+const page = reactive({
+ current: 1,
+ size: 10,
+})
+
+const total = ref(0)
+
const stockRecordTypeOptions = ref([])
const getRecordType = (recordType) => {
@@ -278,6 +293,10 @@
findAllQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
+ findAllUnQualifiedStockInRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = [...stockRecordTypeOptions.value,...res.data];
+ })
})
}
@@ -293,6 +312,7 @@
// 鎶ヨ〃绫诲瀷鏀瑰彉
const handleReportTypeChange = () => {
+ page.current = 1
reportData.value = {
summary: null,
chartData: null,
@@ -308,7 +328,12 @@
tableLoading.value = true
try {
- const params = getQueryParams()
+ const baseParams = getQueryParams()
+ const params = {
+ ...baseParams,
+ current: page.current,
+ size: page.size,
+ }
let response
if (searchForm.reportType === 'inout') {
@@ -317,7 +342,8 @@
response = await getStockInventoryReportList(params)
}
if (response.code === 200) {
- reportData.value.tableData = response.data.records
+ reportData.value.tableData = response.data.records || []
+ total.value = response.data.total || 0
// reportData.value.summary = response.data.summary
// reportData.value.chartData = response.data.chartData
// nextTick(() => {
@@ -330,6 +356,19 @@
} finally {
tableLoading.value = false
}
+}
+
+// 鏌ヨ鎸夐挳锛氶噸缃埌绗竴椤靛苟鏌ヨ
+const onSearch = () => {
+ page.current = 1
+ handleQuery()
+}
+
+// 鍒嗛〉鍙樺寲
+const paginationChange = (obj) => {
+ page.current = obj.page
+ page.size = obj.limit
+ handleQuery()
}
// // 鐢熸垚鍋囨暟鎹�
// const generateMockData = () => {
@@ -550,6 +589,8 @@
]
fetchStockRecordTypeOptions()
+ // 鍒濆鍖栧姞杞戒竴娆℃暟鎹�
+ handleQuery()
})
</script>
--
Gitblit v1.9.3