From 50b0a9ba868e43b92be4adc2331a087b9d3dbf2a Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 30 一月 2026 11:40:00 +0800
Subject: [PATCH] 修改生产核算页面

---
 src/views/productionManagement/productionCosting/index.vue |   57 ++++++++++++++++++++--------
 src/components/PIMTable/PIMTable.vue                       |    6 ++
 2 files changed, 46 insertions(+), 17 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index dfbc231..a418280 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -233,7 +233,7 @@
 const uploadHeader = proxy.uploadHeader;
 const javaApi = proxy.javaApi;
 
-const emit = defineEmits(["pagination", "expand-change", "selection-change"]);
+const emit = defineEmits(["pagination", "expand-change", "selection-change", "row-click"]);
 
 // Filters
 const typeFn = (val, row) => {
@@ -427,6 +427,10 @@
   emit("pagination", { page: page, limit: limit });
 };
 
+const rowClick = (row) => {
+  emit("row-click", row);
+};
+
 const expandChange = (row, expandedRows) => {
   emit("expand-change", row, expandedRows);
 };
diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index b8cc14e..3547087 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -16,8 +16,11 @@
 					:column="leftTableColumn"
 					:tableData="leftTableData"
 					:tableLoading="tableLoading"
-					@rowClick="handleLeftRowClick"
-				></PIMTable>
+          :page="page"
+          :height="200"
+          @row-click="handleLeftRowClick"
+          @pagination="pagination"
+        ></PIMTable>
 			</div>
 
 			<!-- 鍙充晶鏄庣粏锛堝師鏈夊唴瀹癸級 -->
@@ -29,10 +32,10 @@
 						rowKey="id"
 						:column="tableColumn"
 						:tableData="tableData"
-						:page="page"
+						:page="page1"
 						:tableLoading="tableLoading"
 						style="margin-right: 20px;"
-						@pagination="pagination"
+						@pagination="pagination1"
 					></PIMTable>
 			</div>
 		</div>
@@ -133,6 +136,7 @@
 
 const tableData = ref([]);
 const tableLoading = ref(false);
+const tableLoading1 = ref(false);
 const leftTableData = ref([]);
 // 鏃� / 鏈� 鍒囨崲锛堥粯璁ゆ寜鏃ワ級
 const dateType = ref("day");
@@ -140,6 +144,12 @@
 	current: 1,
 	size: 100,
 	total: 0,
+});
+
+const page1 = reactive({
+  current: 1,
+  size: 100,
+  total: 0,
 });
 
 const data = reactive({
@@ -156,17 +166,18 @@
 });
 const { searchForm } = toRefs(data);
 
-// 鏌ヨ鍒楄〃
-/** 鎼滅储鎸夐挳鎿嶄綔 */
-const handleQuery = () => {
-	page.current = 1;
-	getList();
-};
 const pagination = (obj) => {
 	page.current = obj.page;
 	page.size = obj.limit;
 	getList();
 };
+
+const pagination1 = (obj) => {
+  page1.current = obj.page;
+  page1.size = obj.limit;
+	getList1();
+};
+
 const changeDaterange = (value) => {
 	if (value) {
 		searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
@@ -182,20 +193,24 @@
 	const params = { ...searchForm.value, ...page };
 	params.dateType = dateType.value;
 	params.entryDate = undefined
+
   salesLedgerProductionAccountingList(params).then((res) => {
 		tableLoading.value = false;
 		const records = res.data.records || [];
-    // console.log("resdsd",records)
     leftTableData.value = records;
 		page.total = res.data.total || 0;
-		// buildLeftTableData(records);
 	});
 
+};
+
+const getList1 = () => {
+  tableLoading1.value = true;
+  const params = { ...page1, ...searchForm.value };
   salesLedgerProductionAccountingListProductionDetails(params).then((res) => {
-		tableLoading.value = false;
+    tableLoading1.value = false;
     tableData.value = res.data.records || [];;
-		page.total = res.data.total || 0;
-	});
+    page1.total = res.data.total || 0;
+  });
 };
 
 // 鏋勫缓宸︿晶姹囨�诲彴璐︼紙鎸夌敓浜т汉姹囨�讳骇閲忋�佸伐璧勭瓑锛�
@@ -224,7 +239,9 @@
 // 宸︿晶鏃�/鏈堝垏鎹�
 const handleDateTypeChange = () => {
 	// 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
-	handleQuery();
+  page.current = 1;
+	getList();
+  handleQuery()
 };
 
 // 鐐瑰嚮宸︿晶琛岋紝鍒峰彸渚ф槑缁嗭紙鎸夌敓浜т汉杩囨护锛�
@@ -233,6 +250,14 @@
 	handleQuery();
 };
 
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+  page1.current = 1;
+  getList1();
+};
+
+
 // 瀵煎嚭
 const handleOut = () => {
 	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {

--
Gitblit v1.9.3