From 38d43b697f86d5ee8345e4d6397d3c1da32bbd5b Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 29 一月 2026 15:02:35 +0800
Subject: [PATCH] fix: 附件上传后有两个分页展示(原材料、过程、出厂都有)

---
 src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue       |    2 
 src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue          |    2 
 src/views/reportAnalysis/financialAnalysis/components/center-top.vue      |    2 
 src/views/productionManagement/productionCosting/index.vue                |  192 ++++++++++++++++++++++++++++++--------
 src/views/qualityManagement/processInspection/components/filesDia.vue     |   17 +--
 src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue |   15 --
 src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue  |    2 
 src/views/qualityManagement/finalInspection/components/filesDia.vue       |   17 +--
 8 files changed, 169 insertions(+), 80 deletions(-)

diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index 229bf04..fd3a11b 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -1,45 +1,40 @@
 <template>
 	<div class="app-container">
-		<div class="search_form">
-			<div>
-				<span class="search_title">鐢熶骇鏃ユ湡锛�</span>
-				<el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
-												placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
-				<span class="search_title ml10">鐢熶骇浜猴細</span>
-				<el-input
-					v-model="searchForm.schedulingUserName"
-					style="width: 240px"
-					placeholder="璇疯緭鍏�"
-					@change="handleQuery"
-					clearable
-					prefix-icon="Search"
-				/>
-				<span class="search_title ml10">鍚堝悓鍙凤細</span>
-				<el-input
-					v-model="searchForm.salesContractNo"
-					style="width: 240px"
-					placeholder="璇疯緭鍏�"
-					@change="handleQuery"
-					clearable
-					prefix-icon="Search"
-				/>
-				<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
-				>鎼滅储</el-button
-				>
+		<div class="content-layout">
+			<!-- 宸︿晶鍙拌处 + 椤堕儴绛涢�� -->
+			<div class="left-panel">
+				<div class="left-header">
+					<!-- <div class="left-title">鐢熶骇鍙拌处</div> -->
+					<el-radio-group v-model="dateType" size="small" @change="handleDateTypeChange">
+						<el-radio-button label="day">鏃�</el-radio-button>
+						<el-radio-button label="month">鏈�</el-radio-button>
+					</el-radio-group>
+					
+				</div>
+				<PIMTable
+					rowKey="id"
+					:column="leftTableColumn"
+					:tableData="leftTableData"
+					:tableLoading="tableLoading"
+					@rowClick="handleLeftRowClick"
+				></PIMTable>
 			</div>
-			<div>
-				<el-button @click="handleOut">瀵煎嚭</el-button>
+
+			<!-- 鍙充晶鏄庣粏锛堝師鏈夊唴瀹癸級 -->
+			<div class="right-panel">
+				<div class="header-filters">
+						<el-button @click="handleOut" class="ml10">瀵煎嚭</el-button>
+					</div>
+					<PIMTable
+						rowKey="id"
+						:column="tableColumn"
+						:tableData="tableData"
+						:page="page"
+						:tableLoading="tableLoading"
+						style="margin-right: 20px;"
+						@pagination="pagination"
+					></PIMTable>
 			</div>
-		</div>
-		<div class="table_list">
-			<PIMTable
-				rowKey="id"
-				:column="tableColumn"
-				:tableData="tableData"
-				:page="page"
-				:tableLoading="tableLoading"
-				@pagination="pagination"
-			></PIMTable>
 		</div>
 	</div>
 </template>
@@ -119,8 +114,36 @@
 		width: 100,
 	},
 ]);
+
+// 宸︿晶姹囨�诲彴璐﹀垪锛堢敓浜т汉銆佷骇閲忋�佸伐璧勩�佸悎鏍肩巼锛�
+const leftTableColumn = ref([
+	{
+		label: "鐢熶骇浜�",
+		prop: "schedulingUserName",
+		width: 120,
+	},
+	{
+		label: "浜ч噺",
+		prop: "finishedNum",
+		width: 100,
+	},
+	{
+		label: "宸ヨ祫",
+		prop: "wages",
+		width: 100,
+	},
+	{
+		label: "鍚堟牸鐜�",
+		prop: "qualifiedRate",
+		width: 100,
+	},
+]);
+
 const tableData = ref([]);
 const tableLoading = ref(false);
+const leftTableData = ref([]);
+// 鏃� / 鏈� 鍒囨崲锛堥粯璁ゆ寜鏃ワ級
+const dateType = ref("day");
 const page = reactive({
 	current: 1,
 	size: 100,
@@ -165,12 +188,50 @@
 const getList = () => {
 	tableLoading.value = true;
 	const params = { ...searchForm.value, ...page };
+	params.dateType = dateType.value;
 	params.entryDate = undefined
 	productionAccountingListPage(params).then((res) => {
 		tableLoading.value = false;
-		tableData.value = res.data.records;
-		page.total = res.data.total;
+		const records = res.data.records || [];
+		tableData.value = records;
+		page.total = res.data.total || 0;
+		buildLeftTableData(records);
 	});
+};
+
+// 鏋勫缓宸︿晶姹囨�诲彴璐︼紙鎸夌敓浜т汉姹囨�讳骇閲忋�佸伐璧勭瓑锛�
+const buildLeftTableData = (records) => {
+	const map = {};
+	records.forEach((item) => {
+		const key = item.schedulingUserName || "鏈煡";
+		if (!map[key]) {
+			map[key] = {
+				id: key,
+				schedulingUserName: key,
+				finishedNum: 0,
+				wages: 0,
+				qualifiedRate: item.qualifiedRate ?? null,
+			};
+		}
+		map[key].finishedNum += Number(item.finishedNum || 0);
+		map[key].wages += Number(item.wages || 0);
+		if (item.qualifiedRate != null) {
+			map[key].qualifiedRate = item.qualifiedRate;
+		}
+	});
+	leftTableData.value = Object.values(map);
+};
+
+// 宸︿晶鏃�/鏈堝垏鎹�
+const handleDateTypeChange = () => {
+	// 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
+	handleQuery();
+};
+
+// 鐐瑰嚮宸︿晶琛岋紝鍒峰彸渚ф槑缁嗭紙鎸夌敓浜т汉杩囨护锛�
+const handleLeftRowClick = (row) => {
+	searchForm.value.schedulingUserName = row.schedulingUserName || "";
+	handleQuery();
 };
 
 // 瀵煎嚭
@@ -193,4 +254,53 @@
 });
 </script>
 
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.content-layout {
+  display: flex;
+  gap: 16px;
+}
+
+.left-panel {
+  flex: 0 0 50%;
+  max-width: 50%;
+  display: flex;
+  flex-direction: column;
+  gap: 10px;
+}
+
+.right-panel {
+  flex: 0 0 50%;
+  max-width: 49%;
+  display: flex;
+  flex-direction: column;
+  gap: 10px;
+}
+
+.left-header {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  margin-bottom: 8px;
+}
+
+.left-title {
+  font-size: 16px;
+  color: #ffffff;
+}
+
+.header-filters {
+  display: flex;
+  align-items: center;
+  flex: 1;
+  justify-content: flex-end;
+  gap: 8px;
+}
+
+.search_title {
+  color: #ffffff;
+}
+
+.ml10 {
+  margin-left: 10px;
+}
+</style>
diff --git a/src/views/qualityManagement/finalInspection/components/filesDia.vue b/src/views/qualityManagement/finalInspection/components/filesDia.vue
index 51dd78f..8cda761 100644
--- a/src/views/qualityManagement/finalInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
           rowKey="id"
           :column="tableColumn"
           :tableData="tableData"
+          :page="page"
           :tableLoading="tableLoading"
           :isSelection="true"
           @selection-change="handleSelectionChange"
+          @pagination="paginationSearch"
           height="500"
       >
       </PIMTable>
-			<pagination
-				style="margin: 10px 0"
-				v-show="total > 0"
-				@pagination="paginationSearch"
-				:total="total"
-				:page="page.current"
-				:limit="page.size"
-			/>
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="closeDia">鍙栨秷</el-button>
@@ -64,7 +58,6 @@
   qualityInspectFileDel,
   qualityInspectFileListPage
 } from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 
@@ -94,8 +87,8 @@
 const page = reactive({
 	current: 1,
 	size: 100,
+	total: 0,
 });
-const total = ref(0);
 const tableData = ref([]);
 const fileList = ref([]);
 const tableLoading = ref(false);
@@ -116,9 +109,9 @@
 	getList();
 };
 const getList = () => {
-  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+  qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
     tableData.value = res.data.records;
-		total.value = res.data.total;
+		page.total = res.data.total;
   })
 }
 // 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/qualityManagement/processInspection/components/filesDia.vue b/src/views/qualityManagement/processInspection/components/filesDia.vue
index fb47850..b0cb258 100644
--- a/src/views/qualityManagement/processInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
           rowKey="id"
           :column="tableColumn"
           :tableData="tableData"
+          :page="page"
           :tableLoading="tableLoading"
           :isSelection="true"
           @selection-change="handleSelectionChange"
+          @pagination="paginationSearch"
           height="500"
       >
       </PIMTable>
-			<pagination
-				style="margin: 10px 0"
-				v-show="total > 0"
-				@pagination="paginationSearch"
-				:total="total"
-				:page="page.current"
-				:limit="page.size"
-			/>
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="closeDia">鍙栨秷</el-button>
@@ -60,7 +54,6 @@
   qualityInspectFileDel,
   qualityInspectFileListPage
 } from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 
@@ -98,8 +91,8 @@
 const page = reactive({
 	current: 1,
 	size: 100,
+	total: 0,
 });
-const total = ref(0);
 const tableData = ref([]);
 const fileList = ref([]);
 const tableLoading = ref(false);
@@ -120,9 +113,9 @@
 	getList();
 };
 const getList = () => {
-  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+  qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
     tableData.value = res.data.records;
-		total.value = res.data.total;
+		page.total = res.data.total;
   })
 }
 // 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
index 9907fbe..9b89a3b 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
           rowKey="id"
           :column="tableColumn"
           :tableData="tableData"
+          :page="page"
           :tableLoading="tableLoading"
           :isSelection="true"
           @selection-change="handleSelectionChange"
+          @pagination="paginationSearch"
           height="500"
       >
       </PIMTable>
-			<pagination
-				style="margin: 10px 0"
-				v-show="total > 0"
-				@pagination="paginationSearch"
-				:total="total"
-				:page="page.current"
-				:limit="page.size"
-			/>
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="closeDia">鍙栨秷</el-button>
@@ -60,7 +54,6 @@
   qualityInspectFileDel,
   qualityInspectFileListPage
 } from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 
@@ -97,8 +90,8 @@
 const page = reactive({
 	current: 1,
 	size: 100,
+	total: 0,
 });
-const total = ref(0);
 const tableData = ref([]);
 const fileList = ref([]);
 const tableLoading = ref(false);
@@ -122,7 +115,7 @@
 const getList = () => {
   qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
     tableData.value = res.data.records;
-		total.value = res.data.total;
+		page.total = res.data.total;
   })
 }
 // 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
index 3970b71..7daf096 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <PanelHeader title="浜у搧閲囪喘閲戦鍒嗘瀽" />
+    <PanelHeader title="閲囪喘鍝佸垎甯�" />
     <div class="main-panel panel-item-customers">
       <CarouselCards :items="cardItems" :visible-count="3" />
       <div class="pie-chart-wrapper">
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
index d4c1b76..581020d 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <PanelHeader title="浜у搧閿�鍞噾棰濆垎鏋�" />
+    <PanelHeader title="閿�鍞搧鍒嗗竷" />
     <div class="main-panel panel-item-customers">
       <CarouselCards :items="cardItems" :visible-count="3" />
       <div class="pie-chart-wrapper">
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue b/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
index 4b99833..bbcd5f0 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <PanelHeader title="瀹㈡埛閲戦璐$尞鎺掑悕" />
+    <PanelHeader title="瀹㈡埛璐$尞鎺掑悕" />
     <div class="panel-item-customers">
       <div class="switch-container">
         <DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
diff --git a/src/views/reportAnalysis/financialAnalysis/components/center-top.vue b/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
index fc61311..d46a0ac 100644
--- a/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
+++ b/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
@@ -47,7 +47,7 @@
           </div>
           <div class="card-right">
             <div class="metric-row">
-              <span class="metric-label">鍑�鍒╂鼎</span>
+              <span class="metric-label">浠樻鐜�</span>
               <span class="metric-value metric-down">{{ expense.netProfit }}</span>
             </div>
             <div class="metric-row">

--
Gitblit v1.9.3