From 1c0f01cc462d37e146c34127d2883ca51e26d508 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 24 六月 2025 17:12:32 +0800
Subject: [PATCH] fix: 修复PIMTable不支持懒加载问题。修复【来票登记】金额格式化显示NaN问题。 style: 重构来票登记页面。 feat: 完善文件上传组件功能。【来票台账】底部添加合计。【来票登记】添加上传附件

---
 src/components/PIMTable/PIMTable.vue |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 3c9e756..d1b778d 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -5,18 +5,20 @@
     :border="border"
     :data="tableData"
     :header-cell-style="{ background: '#F0F1F5', color: '#333333' }"
-    height="calc(100vh - 18.5em)"
+    :height="height"
     :highlight-current-row="highlightCurrentRow"
     :row-class-name="rowClassName"
     :row-style="rowStyle"
     :row-key="rowKey"
     style="width: 100%"
     tooltip-effect="dark"
-    @row-click="rowClick"
-    @current-change="currentChange"
+    :expand-row-keys="expandRowKeys"
     :show-summary="isShowSummary"
     :summary-method="summaryMethod"
+    @row-click="rowClick"
+    @current-change="currentChange"
     @selection-change="handleSelectionChange"
+    @expand-change="expandChange"
     class="lims-table"
   >
     <el-table-column
@@ -224,7 +226,7 @@
 const uploadHeader = proxy.uploadHeader;
 const javaApi = proxy.javaApi;
 
-const emit = defineEmits(["pagination"]);
+const emit = defineEmits(["pagination", "expand-change", "selection-change"]);
 
 // Filters
 const typeFn = (val, row) => {
@@ -241,9 +243,13 @@
     type: Boolean,
     default: false,
   },
-  handleSelectionChange: {
-    type: Function,
-    default: () => {},
+  height: {
+    type: [Number, String],
+    default: "calc(100vh - 18.5em)",
+  },
+  expandRowKeys: {
+    type: Array,
+    default: () => [],
   },
   summaryMethod: {
     type: Function,
@@ -405,6 +411,14 @@
 const paginationSearch = ({ page, limit }) => {
   emit("pagination", { page: page, limit: limit });
 };
+
+const expandChange = (row, expandedRows) => {
+  emit("expand-change", row, expandedRows);
+};
+
+const handleSelectionChange = (newSelection) => {
+  emit("selection-change", newSelection);
+};
 </script>
 
 <style scoped lang="scss">

--
Gitblit v1.9.3