From 534533425b15b183cea60fa162d9884e5d3c6243 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 13 十月 2026 17:55:50 +0800
Subject: [PATCH] Merge branch 'dev_海西州_北京同仁堂' into dev_海西州_惠牧

---
 src/api/erp/finance/voucher/index.ts |  101 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)

diff --git a/src/api/erp/finance/voucher/index.ts b/src/api/erp/finance/voucher/index.ts
new file mode 100644
index 0000000..e693e17
--- /dev/null
+++ b/src/api/erp/finance/voucher/index.ts
@@ -0,0 +1,101 @@
+import type { PageParam, PageResult } from '@vben/request';
+
+import type { SystemStorageApi } from '#/api/system/storage';
+
+import { requestClient } from '#/api/request';
+
+export namespace FinVoucherApi {
+  /** 鍑瘉鍒嗗綍 */
+  export interface VoucherEntry {
+    id?: number; // 鍒嗗綍缂栧彿
+    rowNo?: number; // 琛屽彿
+    subjectCode?: string; // 绉戠洰缂栫爜
+    subjectName?: string; // 绉戠洰鍚嶇О
+    summary?: string; // 鎽樿
+    debit?: number; // 鍊熸柟閲戦
+    credit?: number; // 璐锋柟閲戦
+    auxiliaryType?: number; // 杈呭姪鏍哥畻绫诲瀷
+    auxiliaryId?: string; // 杈呭姪鏍哥畻瀵硅薄缂栧彿
+    auxiliaryName?: string; // 杈呭姪鏍哥畻瀵硅薄鍚嶇О
+  }
+
+  /** 璁拌处鍑瘉 */
+  export interface Voucher {
+    id?: number; // 鍑瘉缂栧彿
+    voucherNo?: string; // 鍑瘉瀛楀彿锛岀暀绌烘椂鍚庣鑷姩鐢熸垚
+    voucherDate: string; // 鍑瘉鏃ユ湡
+    summary?: string; // 鎽樿
+    debit?: number; // 鍊熸柟鍚堣
+    credit?: number; // 璐锋柟鍚堣
+    status?: number; // 鍑瘉鐘舵�侊細0鏈繃璐� 10宸茶繃璐� 20宸蹭綔搴�
+    creator?: string; // 鍒跺崟浜猴紙鐢ㄦ埛缂栧彿锛屼粎鐢ㄤ簬鎼滅储鏉′欢锛�
+    creatorName?: string; // 鍒跺崟浜烘樀绉帮紙鍒楄〃銆佸鍑哄睍绀虹敤锛�
+    attachmentCount?: number; // 闄勪欢寮犳暟
+    remark?: string; // 澶囨敞
+    createTime?: Date; // 鍒涘缓鏃堕棿
+    entries?: VoucherEntry[]; // 鍑瘉鍒嗗綍
+    attachmentList?: SystemStorageApi.StorageBlob[]; // 闄勪欢鍒楄〃
+    hasAttachment?: boolean; // 鏄惁鏈夐檮浠�
+    blobIds?: number[]; // 闄勪欢 blobId 鍒楄〃锛堟彁浜ょ敤锛�
+  }
+}
+
+/** 鏌ヨ璁拌处鍑瘉鍒嗛〉 */
+export function getVoucherPage(params: PageParam) {
+  return requestClient.get<PageResult<FinVoucherApi.Voucher>>(
+    '/finance/voucher/page',
+    { params },
+  );
+}
+
+/** 鏌ヨ璁拌处鍑瘉鍒嗛〉锛堝惈鍒嗗綍锛岀敤浜庡嚟璇佸垪琛ㄥ睍寮�涓庢墦鍗帮級 */
+export function getVoucherPageWithEntry(params: PageParam) {
+  return requestClient.get<PageResult<FinVoucherApi.Voucher>>(
+    '/finance/voucher/page-with-entry',
+    { params },
+  );
+}
+
+/** 鏌ヨ璁拌处鍑瘉璇︽儏锛堝惈鍒嗗綍涓庨檮浠讹級 */
+export function getVoucher(id: number) {
+  return requestClient.get<FinVoucherApi.Voucher>(
+    `/finance/voucher/get?id=${id}`,
+  );
+}
+
+/** 鏂板璁拌处鍑瘉 */
+export function createVoucher(data: FinVoucherApi.Voucher) {
+  return requestClient.post('/finance/voucher/create', data);
+}
+
+/** 淇敼璁拌处鍑瘉 */
+export function updateVoucher(data: FinVoucherApi.Voucher) {
+  return requestClient.put('/finance/voucher/update', data);
+}
+
+/** 鍒犻櫎璁拌处鍑瘉 */
+export function deleteVoucher(id: number) {
+  return requestClient.delete(`/finance/voucher/delete?id=${id}`);
+}
+
+/** 鎵归噺鍒犻櫎璁拌处鍑瘉 */
+export function deleteVoucherList(ids: number[]) {
+  return requestClient.delete(
+    `/finance/voucher/delete-list?ids=${ids.join(',')}`,
+  );
+}
+
+/** 鍑瘉杩囪处 */
+export function postVoucher(id: number) {
+  return requestClient.put('/finance/voucher/post', null, { params: { id } });
+}
+
+/** 鍑瘉浣滃簾 */
+export function cancelVoucher(id: number) {
+  return requestClient.put('/finance/voucher/cancel', null, { params: { id } });
+}
+
+/** 瀵煎嚭璁拌处鍑瘉 Excel */
+export function exportVoucher(params: any) {
+  return requestClient.download('/finance/voucher/export-excel', { params });
+}

--
Gitblit v1.9.3