From 00228dfd593c06119c6815dbd1afe7edcd6b5dec Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 20 八月 2025 10:47:11 +0800
Subject: [PATCH] 劳保台账修改

---
 src/views/lavorissue/ledger/index.vue |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index b23bffe..33a1461 100644
--- a/src/views/lavorissue/ledger/index.vue
+++ b/src/views/lavorissue/ledger/index.vue
@@ -143,13 +143,15 @@
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue'
+import { ref, onMounted, reactive, toRefs, nextTick, getCurrentInstance } from 'vue'
 import dayjs from "dayjs";
 import Modal from "./Modal.vue";
 import FilesDia from "./filesDia.vue";
-import {lavorIssueListPage} from "@/api/lavorissce/ledger.js";
-import {ElMessageBox} from "element-plus";
+import Pagination from "@/components/Pagination/index.vue";
+import {lavorIssueListPage, deleteLedger, update} from "@/api/lavorissce/ledger.js";
+import {ElMessageBox, ElMessage} from "element-plus";
 const { proxy } = getCurrentInstance();
+import { getCurrentMonth } from "@/utils/util"
 
 const page = ref({
 	current: 1,
@@ -163,13 +165,14 @@
 const { sys_lavor_issue } = proxy.useDict("sys_lavor_issue")
 const data = reactive({
 	searchForm: {
-		feedbackDate: "",
-		disDate: "",
+		season: "",
+		staffName: "",
 	},
 });
+const { searchForm } = toRefs(data);
+
 const modalRef = ref();
 const filesDia = ref();
-const { searchForm } = toRefs(data);
 const multipleList = ref([]);
 const jidu = ref([
 	{
@@ -192,16 +195,17 @@
 
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
-	page.current = 1;
+	page.value.current = 1;
 	getList();
 };
 // 鑾峰彇瀛楀吀鏁版嵁
 const getList = async () => {
 	tableLoading.value = true;
-	lavorIssueListPage().then(res => {
+	const params = { ...searchForm.value, ...page.value };
+	lavorIssueListPage(params).then(res => {
 		tableLoading.value = false;
 		tableData.value = res.data.records;
-		page.total = res.data.total;
+		total.value = res.data.total;
 	}).catch(err => {
 		tableLoading.value = false;
 	})
@@ -224,7 +228,7 @@
 				type: "success",
 				message: "鍒犻櫎鎴愬姛",
 			});
-			getTableData();
+			getList();
 		}
 	});
 };
@@ -235,10 +239,10 @@
 		type: "warning",
 	})
 		.then(() => {
-			proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "鍔充繚鍙拌处.xlsx");
+			proxy.download(`/lavorIssue/exportCopy`, {season: searchForm.value.season}, "鍔充繚鍙拌处.xlsx");
 		})
 		.catch(() => {
-			proxy.$modal.msg("宸插彇娑�");
+			ElMessage.info("宸插彇娑�");
 		});
 };
 const adopted = (row) => {
@@ -257,7 +261,7 @@
 				type: "success",
 				message: "棰嗙敤鎴愬姛",
 			});
-			getTableData();
+			getList();
 		}
 	})
 }
@@ -272,9 +276,10 @@
 	multipleList.value = selection;
 }
 
-const paginationChange = (size) => {
-	console.log(size)
-
+const paginationChange = (pagination) => {
+	page.value.current = pagination.page;
+	page.value.size = pagination.limit;
+	getList();
 }
 
 // 缁勪欢鎸傝浇鏃跺姞杞藉瓧鍏告暟鎹�

--
Gitblit v1.9.3