From 982c97ab82f3beb1b4febcf014562eda34b9fc05 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 29 九月 2026 17:59:41 +0800
Subject: [PATCH] feat(ui): 江苏商贸品牌视觉与首页/登录页改版

---
 src/api/archive/borrow/index.ts |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/src/api/archive/borrow/index.ts b/src/api/archive/borrow/index.ts
new file mode 100644
index 0000000..efc2036
--- /dev/null
+++ b/src/api/archive/borrow/index.ts
@@ -0,0 +1,106 @@
+import type { PageParam, PageResult } from '@vben/request';
+
+import { requestClient } from '#/api/request';
+
+export namespace ArchiveBorrowApi {
+  /** 鍊熼槄鍗� */
+  export interface Borrow {
+    id?: number; // 鍊熼槄鍗曠紪鍙�
+    no?: string; // 鍊熼槄鍗曞彿锛堝悗绔敓鎴愶細JY+yyyyMMdd+6浣嶆祦姘达紝鍙锛�
+    documentId: number; // 妗f ID
+    documentNo?: string; // 妗f缂栧彿锛堝揩鐓э級
+    documentTitle?: string; // 妗f鏍囬锛堝揩鐓э級
+    borrowerUserId?: number; // 鍊熼槄浜虹敤鎴� ID
+    borrowerName: string; // 鍊熼槄浜哄鍚�
+    borrowerDept?: string; // 鍊熼槄浜洪儴闂�
+    borrowerPhone?: string; // 鍊熼槄浜鸿仈绯荤數璇�
+    borrowDate: string; // 鍊熼槄鏃ユ湡
+    borrowPurpose?: string; // 鍊熼槄鐩殑
+    returnDeadline: string; // 褰掕繕鏈熼檺
+    status?: number; // 鐘舵�侊紝瀛楀吀 archive_borrow_status
+    processInstanceId?: string; // BPM 娴佺▼瀹炰緥 ID
+    approveTime?: string; // 瀹℃壒閫氳繃锛堝疄闄呭�熷嚭锛夋椂闂�
+    returnTime?: string; // 瀹為檯褰掕繕鏃堕棿
+    returnConfirmUserId?: number; // 褰掕繕纭浜虹敤鎴� ID
+    returnConfirmUserName?: string; // 褰掕繕纭浜哄鍚�
+    returnRemark?: string; // 褰掕繕澶囨敞
+    rejectReason?: string; // 椹冲洖鍘熷洜
+    rejectTime?: string; // 椹冲洖鏃堕棿
+    remark?: string; // 澶囨敞
+    overdue?: boolean; // 鏄惁閫炬湡锛堝悗绔疄鏃惰绠楋級
+    overdueDays?: number; // 閫炬湡澶╂暟锛堝悗绔疄鏃惰绠楋級
+    createTime?: string; // 鍒涘缓鏃堕棿
+  }
+
+  /** 瀹℃壒娴佺▼瀹氫箟 */
+  export interface ProcessDefinition {
+    id: string;
+    key: string;
+    name: string;
+  }
+
+  /** 褰掕繕鐧昏璇锋眰 */
+  export interface ReturnReq {
+    id: number; // 鍊熼槄鍗曠紪鍙�
+    returnRemark?: string; // 褰掕繕澶囨敞
+  }
+}
+
+/** 鏌ヨ鍊熼槄鍗曞垎椤� */
+export function getBorrowPage(params: PageParam) {
+  return requestClient.get<PageResult<ArchiveBorrowApi.Borrow>>(
+    '/archive/borrow/page',
+    { params },
+  );
+}
+
+/** 鏌ヨ閫炬湡鏈繕鍊熼槄鍗曞垎椤� */
+export function getOverdueBorrowPage(params: PageParam) {
+  return requestClient.get<PageResult<ArchiveBorrowApi.Borrow>>(
+    '/archive/borrow/overdue-page',
+    { params },
+  );
+}
+
+/** 鏌ヨ鍊熼槄鍗曡鎯� */
+export function getBorrow(id: number) {
+  return requestClient.get<ArchiveBorrowApi.Borrow>(
+    `/archive/borrow/get?id=${id}`,
+  );
+}
+
+/** 鏂板鍊熼槄鍗� */
+export function createBorrow(data: ArchiveBorrowApi.Borrow) {
+  return requestClient.post('/archive/borrow/create', data);
+}
+
+/** 淇敼鍊熼槄鍗� */
+export function updateBorrow(data: ArchiveBorrowApi.Borrow) {
+  return requestClient.put('/archive/borrow/update', data);
+}
+
+/** 鍒犻櫎鍊熼槄鍗� */
+export function deleteBorrow(id: number) {
+  return requestClient.delete('/archive/borrow/delete', {
+    params: { id },
+  });
+}
+
+/** 鎻愪氦鍊熼槄鍗曞鎵� */
+export function submitBorrow(id: number, processDefinitionKey?: string) {
+  return requestClient.post('/archive/borrow/submit', null, {
+    params: { id, processDefinitionKey },
+  });
+}
+
+/** 鑾峰彇妗f鍊熼槄瀹℃壒娴佺▼鍒楄〃 */
+export function getBorrowApproveProcessList() {
+  return requestClient.get<ArchiveBorrowApi.ProcessDefinition[]>(
+    '/archive/borrow/approve-process-list',
+  );
+}
+
+/** 褰掕繕鐧昏 */
+export function returnBorrow(data: ArchiveBorrowApi.ReturnReq) {
+  return requestClient.post('/archive/borrow/return', data);
+}

--
Gitblit v1.9.3