From ae5b0a8c63979351028215b8fe8cdf4b0766c272 Mon Sep 17 00:00:00 2001 From: wanglizhong <wlz> Date: 星期二, 24 六月 2025 15:27:20 +0800 Subject: [PATCH] fix:update sendsms php --- admin_save.gds | 75 +++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 1 deletions(-) diff --git a/admin_save.gds b/admin_save.gds index 14f9e7c..a244810 100644 --- a/admin_save.gds +++ b/admin_save.gds @@ -20,6 +20,66 @@ <title>璁板綍涓�..</title> </head> <%End If%> + +<% +Function delFollower(ServiceOrderID) + sql = "DELETE FROM ServiceOrderCommissionDetails WHERE ServiceOrderID = " & ServiceOrderID & " AND PersonType = 'Follower'" + objConn.Execute sql +End Function + +Function SaveFollower(ServiceOrderID,userId,userName,userRatio) + if userId<>"" and userName<>"" and userRatio<>"" then + ' 濡傛灉涓嶅瓨鍦紝鍒欐彃鍏ユ柊璁板綍 + sql = "INSERT INTO ServiceOrderCommissionDetails (ServiceOrderID, PersonID, PersonName, CommissionRatio, PersonType) VALUES (" & ServiceOrderID & ", " & userId & ", '" & userName & "', " & userRatio & ", 'Follower')" + objConn.Execute sql + End if +End Function + +Function SaveFollowers(ServiceOrderID) + ' 鍏堝垹闄ゆ墍鏈夎窡鍗曚汉璁板綍 + followerCount = SafeRequest(Request.form("FollowersCount")) + If Trim(followerCount)<>"" and IsNumeric(followerCount) then + numericFollowerCount = CInt(Trim(followerCount)) + + if numericFollowerCount>0 then + delFollower ServiceOrderID + for i=1 to numericFollowerCount + userId = SafeRequest(Request.form("FollowerId_" & i )) + userName = SafeRequest(Request.form("FollowerName_" & i)) + userRatio = SafeRequest(Request.form("FollowerRatio_" & i)) + SaveFollower ServiceOrderID, userId, userName, userRatio + next + end if + end if +End Function + + +' 淇濆瓨寮�鍗曚汉鍙婃彁鎴愭瘮渚嬬殑鍑芥暟 +Function SaveOpenerCommission(ServiceOrderID) + OpenerID = SafeRequest(Request.form("OpenUserID")) '寮�鍗曚汉ID + OpenerName = SafeRequest(Request.form("OpenUserName")) '寮�鍗曚汉鍚嶇О + OpenerRatio = SafeRequest(Request.form("OpenUserRatio")) '寮�鍗曚汉鎻愭垚姣斾緥 + if OpenerID<>"" and OpenerName<>"" and OpenerRatio<>"" then + + ' 鍏堟鏌ユ槸鍚﹀凡缁忓瓨鍦ㄨ鏈嶅姟鍗曠殑寮�鍗曚汉璁板綍 + sql = "SELECT ID FROM ServiceOrderCommissionDetails WHERE ServiceOrderID = " & ServiceOrderID & " AND PersonType = 'Opener'" + + rs.Open sql, objConn, 1, 1 + + If rs.EOF Then + ' 濡傛灉涓嶅瓨鍦紝鍒欐彃鍏ユ柊璁板綍 + sql = "INSERT INTO ServiceOrderCommissionDetails (ServiceOrderID, PersonID, PersonName, CommissionRatio, PersonType) VALUES (" & ServiceOrderID & ", " & OpenerID & ", '" & OpenerName & "', " & OpenerRatio & ", 'Opener')" + Else + ' 濡傛灉瀛樺湪锛屽垯鏇存柊璁板綍 + sql = "UPDATE ServiceOrderCommissionDetails SET PersonID = " & OpenerID & ", PersonName = '" & OpenerName & "', " &"CommissionRatio = " & OpenerRatio & " WHERE ID = " & rs("ID") + End If + 'response.write sql + rs.Close + objConn.Execute sql + End if +End Function +%> + <% if cint(session("admin_execLevel"))<1 and admin_save<>"1" and admin_save<>"47" and admin_save<>"48" and admin_save<>"49" then%> @@ -773,6 +833,9 @@ FromHQ2_is = SafeRequest(Request.form("FromHQ2_is")) '骞垮窞鎬婚儴鎺ㄩ�佷换鍔℃爣璁� OrderPrice_Auto = SafeRequest(Request.form("OrderPrice_Auto")) '璁㈠崟鑷姩鎶ヤ环鍙傝�冨�� + + + Call RequestForm(Origin) session("Origin")=Origin 'response.write Origin @@ -987,6 +1050,9 @@ rs.close() ServiceOrdNo = ServiceOrdClass& year(now())&Right("0"&month(now()),2)&Right("0"&day(now()),2) & "-"&Right("00"&ServiceOrdNo,3) + +SaveOpenerCommission ServiceOrdID +SaveFollowers ServiceOrdID '鍜ㄨ鍗曡浆涓烘湇鍔″崟('鑷姩瀹℃牳) If ServiceOrdState="2" then sql="update ServiceOrder set ServiceOrd_NS_ID="&session("adminID")&",ServiceOrd_NS_Time=getdate(),ServiceOrd_AP_Check=1,ServiceOrd_AP_Time=getdate(),ServiceOrd_AP_ID="&session("adminID")&" where ServiceOrdID="&ServiceOrdID @@ -1249,6 +1315,9 @@ ServiceOrd_Check = SafeRequest(Request.form("ServiceOrd_Check")) '褰撳墠瀹℃牳鎿嶄綔 EditDataForm = SafeRequest(Request.form("EditDataForm")) '褰撳墠淇敼椤圭洰 + +SaveOpenerCommission ServiceOrdID +SaveFollowers ServiceOrdID Call RequestForm(Origin) session("Origin")=Origin @@ -1769,6 +1838,7 @@ End If End If End If + Response.Redirect ReturnURL&"&SystemMessageType=3&SMT="&SMT Response.End%> @@ -2340,6 +2410,9 @@ ServiceOrdTraVia = SafeRequest(Request.form("ServiceOrdTraVia")) '杞嚭鍦板潃 ServiceOrdTraEnd = SafeRequest(Request.form("ServiceOrdTraEnd")) '杞叆鍦板潃 EditDataForm = SafeRequest(Request.form("EditDataForm")) '褰撳墠淇敼椤圭洰 + + + If ServiceOrdTraStreet<>"" Then DispatchOrdTraStreet=ServiceOrdTraStreet If ServiceOrdTraVia<>"" Then DispatchOrdTraVia=ServiceOrdTraVia If ServiceOrdTraEnd<>"" Then DispatchOrdTraEnd=ServiceOrdTraEnd @@ -3420,7 +3493,7 @@ End If rs.close() End If -'Call Get_UnitOrd(ServiceOrdUnitID,ServiceOrdID,ServiceOrdState,DispatchOrdState) +Call Get_UnitOrd(ServiceOrdUnitID,ServiceOrdID,ServiceOrdState,DispatchOrdState) '鏇存柊鎻愭垚鏁版嵁 Call EntourageDKP_Money_C2(DispatchOrdID) -- Gitblit v1.9.1