From d700774f27731e52a24df7eaa5d02ee152202308 Mon Sep 17 00:00:00 2001
From: hzj <1831054011@qq.com>
Date: 星期二, 21 十月 2025 09:23:11 +0800
Subject: [PATCH] fix:修复跟单人记录被删除问题

---
 admin_save_follower.gds |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/admin_save_follower.gds b/admin_save_follower.gds
index 0690368..d86d881 100644
--- a/admin_save_follower.gds
+++ b/admin_save_follower.gds
@@ -1,10 +1,22 @@
 <%
 Function delFollower(ServiceOrderID)
+	' 妫�鏌ユ槸鍚︽湁缂栬緫璺熷崟浜烘潈闄�
+	if isDepartment("020140") = 0 then
+		' 娌℃湁鏉冮檺锛屼笉鎵ц鍒犻櫎鎿嶄綔
+		Exit Function
+	end if
+	
 	sql = "DELETE FROM ServiceOrderCommissionDetails WHERE ServiceOrderID = " & ServiceOrderID & " AND PersonType = 'Follower'"
 	objConn.Execute sql
 End Function
 
 Function SaveFollower(ServiceOrderID,userId,userName,userRatio)
+	' 妫�鏌ユ槸鍚︽湁缂栬緫璺熷崟浜烘潈闄�
+	if isDepartment("020140") = 0 then
+		' 娌℃湁鏉冮檺锛屼笉鎵ц鎻掑叆鎿嶄綔
+		Exit Function
+	end if
+	
 	if userId<>"" and userName<>"" and userRatio<>"" then
 		' 濡傛灉涓嶅瓨鍦紝鍒欐彃鍏ユ柊璁板綍
 		sql = "INSERT INTO ServiceOrderCommissionDetails (ServiceOrderID, PersonID, PersonName, CommissionRatio, PersonType) VALUES (" & ServiceOrderID & ", " & userId & ", '" & userName & "', " & userRatio & ", 'Follower')"	
@@ -13,6 +25,12 @@
 End Function
 
 Function SaveFollowers(ServiceOrderID)
+	' 妫�鏌ユ槸鍚︽湁缂栬緫璺熷崟浜烘潈闄�
+	if isDepartment("020140") = 0 then
+		' 娌℃湁鏉冮檺锛屼笉鎵ц浠讳綍鎿嶄綔
+		Exit Function
+	end if
+	
 	' 鍏堝垹闄ゆ墍鏈夎窡鍗曚汉璁板綍	
 	followerCount = SafeRequest(Request.form("FollowersCount"))
 	If Trim(followerCount)<>"" and IsNumeric(followerCount) then

--
Gitblit v1.9.1