From 9aced09ef31ab77663e6ee052785d87ca3c671ba Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 31 三月 2026 10:44:00 +0800
Subject: [PATCH] Merge branch 'dev_长治_健齿齿科器材' of http://114.132.189.42:9002/r/product-inventory-management into dev_长治_健齿齿科器材
---
src/views/inventoryManagement/stockReport/index.vue | 84 ++++++++++++++++++++++++++++++++++++------
1 files changed, 72 insertions(+), 12 deletions(-)
diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index ff1d901..86252a6 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>
@@ -168,13 +168,27 @@
show-overflow-tooltip
v-if="searchForm.reportType !== 'inout'"
/>
- <el-table-column
- label="鍏ュ簱鎵规"
- prop="inboundBatches"
- width="240"
- show-overflow-tooltip
- v-if="searchForm.reportType !== 'inout'"
- />
+ <el-table-column
+ label="鎵瑰彿"
+ width="240"
+ show-overflow-tooltip
+ v-if="searchForm.reportType !== 'inout'"
+ >
+ <template #default="scope">
+ {{ scope.row.batchNo || scope.row.inboundBatches || "" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="渚涘簲鍟�"
+ prop="supplierName"
+ min-width="200"
+ show-overflow-tooltip
+ v-if="searchForm.reportType !== 'inout'"
+ >
+ <template #default="scope">
+ {{ scope.row.supplierName || scope.row.customer || "" }}
+ </template>
+ </el-table-column>
<el-table-column
label="浜у搧澶х被"
prop="productName"
@@ -184,6 +198,11 @@
label="瑙勬牸鍨嬪彿"
prop="model"
show-overflow-tooltip
+ />
+ <el-table-column
+ label="UID鐮�"
+ prop="uidNo"
+ show-overflow-tooltip
/>
<el-table-column
label="鍗曚綅"
@@ -230,21 +249,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 +294,13 @@
tableData: []
})
+const page = reactive({
+ current: 1,
+ size: 10,
+})
+
+const total = ref(0)
+
const stockRecordTypeOptions = ref([])
const getRecordType = (recordType) => {
@@ -278,6 +312,10 @@
findAllQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
+ findAllUnQualifiedStockInRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = [...stockRecordTypeOptions.value,...res.data];
+ })
})
}
@@ -293,6 +331,7 @@
// 鎶ヨ〃绫诲瀷鏀瑰彉
const handleReportTypeChange = () => {
+ page.current = 1
reportData.value = {
summary: null,
chartData: null,
@@ -308,7 +347,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 +361,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 +375,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 +608,8 @@
]
fetchStockRecordTypeOptions()
+ // 鍒濆鍖栧姞杞戒竴娆℃暟鎹�
+ handleQuery()
})
</script>
--
Gitblit v1.9.3