From 6dbbc9c86afa617901ab603c6a82f6621b07bf06 Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期三, 26 八月 2026 09:54:13 +0800
Subject: [PATCH] feat(erp): 增加采购与销售订单订金校验逻辑,限制不得超过优惠后总金额 - **采购订单 (`src/views/erp/purchase/order/data.ts`)**: 为 `depositPrice`(支付订金)字段增加双重校验,动态绑定 `max` 属性到 `totalPrice`,并添加动态表单 rules,超出时提示“订金不能大于优惠后金额”。 - **销售订单 (`src/views/erp/sale/order/data.ts`)**: 复用同等防错机制,限制 `depositPrice`(收取订金)输入不能超过优惠后金额,超过时给予相应报错提示。

---
 src/api/erp/purchase/order/index.ts |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/api/erp/purchase/order/index.ts b/src/api/erp/purchase/order/index.ts
index 000cdf2..4508346 100644
--- a/src/api/erp/purchase/order/index.ts
+++ b/src/api/erp/purchase/order/index.ts
@@ -13,13 +13,14 @@
     totalCount?: number; // 鍚堣鏁伴噺
     totalPrice?: number; // 鍚堣閲戦锛屽崟浣嶏細鍏�
     totalProductPrice?: number; // 浜у搧閲戦锛屽崟浣嶏細鍏�
+    totalTaxPrice?: number; // 鍚堣绋庨锛屽崟浣嶏細鍏�
     discountPercent?: number; // 浼樻儬鐜囷紝鐧惧垎姣�
     discountPrice?: number; // 浼樻儬閲戦锛屽崟浣嶏細鍏�
     depositPrice?: number; // 瀹氶噾閲戦锛屽崟浣嶏細鍏�
     accountId?: number; // 缁撶畻璐︽埛缂栧彿
     status?: number; // 鐘舵��
     remark?: string; // 澶囨敞
-    fileUrl?: string; // 闄勪欢鍦板潃
+    attachmentList?: { id: number; name?: string; url?: string }[]; // 闄勪欢鍒楄〃
     inCount?: number; // 閲囪喘鍏ュ簱鏁伴噺
     count?: number; // 鏁伴噺
     returnCount?: number; // 閲囪喘閫�璐ф暟閲�
@@ -103,6 +104,13 @@
   return requestClient.get<any[]>('/erp/purchase-order/approve-process-list');
 }
 
+/** 鍙嶅鎵癸紙鍗忓悓鍔炲叕宸插姙浠诲姟涓挙鍥炲凡瀹℃牳璁㈠崟锛屽洖閫�涓烘湭瀹℃牳锛� */
+export function reverseApprove(processInstanceId: string) {
+  return requestClient.post('/erp/purchase-order/reverse-approve', null, {
+    params: { processInstanceId },
+  });
+}
+
 /** 鑾峰彇閲囪喘瀹℃牳娴佺▼鍒楄〃鍝嶅簲 */
 export interface ProcessDefinition {
   id: string; // 娴佺▼瀹氫箟ID

--
Gitblit v1.9.3