From 1f17fe5e687b4dadef305d25b1e97ce8cd1afc8a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 20 三月 2026 09:46:10 +0800
Subject: [PATCH] 金鹰黄金 1.新增劳保台账选择岗位刷新人员列表接口修改
---
src/views/fileManagement/borrow/index.vue | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/src/views/fileManagement/borrow/index.vue b/src/views/fileManagement/borrow/index.vue
index 531feb6..41dc3a3 100644
--- a/src/views/fileManagement/borrow/index.vue
+++ b/src/views/fileManagement/borrow/index.vue
@@ -44,6 +44,9 @@
<el-icon><Plus /></el-icon>
鏂板鍊熼槄
</el-button>
+ <el-button @click="handleOut">
+ 瀵煎嚭
+ </el-button>
<el-button
type="danger"
@click="handleBatchDelete"
@@ -201,7 +204,7 @@
const borrowList = ref([]);
const selectedRows = ref([]);
const documentList = ref([]); // 鏂囨。鍒楄〃锛岀敤浜庡�熼槄涔︾睄閫夋嫨
-const scanContent = ref('') // 鎵爜鍐呭
+const scanContent = ref() // 鎵爜鍐呭
// 鍒嗛〉鐩稿叧
const pagination = reactive({
currentPage: 1,
@@ -234,7 +237,7 @@
// 琛ㄥ崟楠岃瘉瑙勫垯
const borrowRules = reactive({
- documentationId: [{ required: true, message: "璇烽�夋嫨鍊熼槄涔︾睄", trigger: "change" }],
+
borrower: [{ required: true, message: "璇疯緭鍏ュ�熼槄浜�", trigger: "blur" }],
borrowPurpose: [{ required: true, message: "璇疯緭鍏ュ�熼槄鐩殑", trigger: "blur" }],
borrowDate: [{ required: true, message: "璇烽�夋嫨鍊熼槄鏃ユ湡", trigger: "change" }],
@@ -308,6 +311,7 @@
const res = await getDocumentList();
if (res.code === 200) {
documentList.value = res.data || [];
+ console.log("shuju",documentList.value)
} else {
ElMessage.error(res.msg || "鑾峰彇鏂囨。鍒楄〃澶辫触");
documentList.value = [];
@@ -325,7 +329,7 @@
// 鏋勫缓鏌ヨ鍙傛暟
const query = {
- page: pagination.currentPage,
+ current: pagination.currentPage,
size: pagination.pageSize,
documentationId: searchForm.documentationId || undefined,
borrowStatus: searchForm.borrowStatus || undefined,
@@ -389,18 +393,19 @@
// 澶勭悊鎵爜鍐呭
const handleScanContent = async (value) => {
-if (!value) return;
-
+ if (!value) return;
try {
// 鏌ユ壘鎵弿鍐呭瀵瑰簲鐨勬枃妗�
- // 鍋囪浜岀淮鐮佸寘鍚殑鏄枃妗D鎴栨枃妗e悕绉�
const matchedDoc = documentList.value.find(item =>
- item.documentationId === value
+ item.id == value
);
+ console.log("matchedDoc", matchedDoc);
+
if (matchedDoc) {
+
// 鎵惧埌鍖归厤鐨勬枃妗o紝璁剧疆琛ㄥ崟鍊�
- borrowForm.documentationId = matchedDoc.documentationId;
+ borrowForm.documentationId = matchedDoc.id;
ElMessage.success(`宸查�夋嫨: ${matchedDoc.docName || matchedDoc.name}`);
} else {
// 鏈壘鍒板尮閰嶇殑鏂囨。锛屾彁绀虹敤鎴�
@@ -555,15 +560,30 @@
});
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/documentationBorrowManagement/export", {}, "鍊熼槄鐧昏.xlsx");
+ })
+ .catch(() => {
+ ElMessage.info("宸插彇娑�");
+ });
+};
+
// 閫夋嫨鍙樺寲浜嬩欢
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
// 澶勭悊鍒嗛〉鍙樺寲
-const handlePagination = (current, size) => {
- pagination.currentPage = current;
- pagination.pageSize = size;
+const handlePagination = (pageInfo) => {
+ pagination.currentPage = pageInfo.current || pageInfo.page;
+ pagination.pageSize = pageInfo.size || pageInfo.limit;
loadBorrowList();
};
--
Gitblit v1.9.3