From a023d5daed320eb4dbf6cfb8c28529d41cf5f9c3 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期三, 14 五月 2025 09:37:30 +0800 Subject: [PATCH] fix:优化广交集团的函数 --- DispatchOrder_List.gds | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 90 insertions(+), 0 deletions(-) diff --git a/DispatchOrder_List.gds b/DispatchOrder_List.gds index 2396827..435c736 100644 --- a/DispatchOrder_List.gds +++ b/DispatchOrder_List.gds @@ -80,6 +80,96 @@ page_URL="&OrdState="&OrdState&"&OrdClassList="&OrdClassList&"&OrdDateType="&OrdDateType&"&OrdDateStart="&OrdDateStart&"&OrdDateEnd="&OrdDateEnd&"&UnitNameID="&UnitNameID&"&searchTXT="&searchTXT&"&h_menu1_1=1" If CoopUnitID<>"" Then page_URL=page_URL&"&CoopUnitID="&CoopUnitID %> + + + +<% +' 璁板綍绠$悊鍛樻搷浣滄棩蹇�,璋佽闂簡杩欎釜椤甸潰锛屽啓鍦ㄤ簡logs/鐩綍涓嬮潰 +Dim adminName +adminName = Session("adminName") + +' 妫�鏌� adminName 鏄惁涓虹┖ +If adminName = "" Then + Response.Write("绠$悊鍛樺悕绉版湭璁剧疆锛�") + Response.End() +End If + +' 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD +Dim currentDate +currentDate = Year(Now()) & "-" & Right("0" & Month(Now()), 2) & "-" & Right("0" & Day(Now()), 2) + +' 瀹氫箟鏂囦欢璺緞鍜屾枃浠跺悕 +Dim fileName, filePath +fileName = "log_" & currentDate & ".txt" ' 渚嬪锛歭og_2023-10-05.txt +filePath = Server.MapPath("logs/" & fileName) + +' 鍒涘缓鏂囦欢绯荤粺瀵硅薄 +Dim fs, f +Set fs = Server.CreateObject("Scripting.FileSystemObject") + +' 妫�鏌� logs 鐩綍鏄惁瀛樺湪锛屽鏋滀笉瀛樺湪鍒欏垱寤� +Dim logsFolderPath +logsFolderPath = Server.MapPath("logs") +If Not fs.FolderExists(logsFolderPath) Then + fs.CreateFolder(logsFolderPath) +End If + +' 妫�鏌ユ枃浠舵槸鍚﹀瓨鍦紝濡傛灉涓嶅瓨鍦ㄥ垯鍒涘缓 +If Not fs.FileExists(filePath) Then + Set f = fs.CreateTextFile(filePath, True) + f.Close +End If + +Dim isDepartmentStr + +if isDepartment("030103")=1 Then + isDepartmentStr="鏌ョ湅鍏ㄩ儴璁㈠崟鏉冮檺" +Else + isDepartmentStr="鏃犳潈闄�" +End If + +' 鎵撳紑鏂囦欢骞跺啓鍏ュ唴瀹� +On Error Resume Next ' 鍚敤閿欒澶勭悊 +Set f = fs.OpenTextFile(filePath, 8, True) ' 8 琛ㄧず杩藉姞妯″紡 + +If Err.Number = 0 Then ' 濡傛灉鏈彂鐢熼敊璇� + f.WriteLine(Now() & " - " & adminName & " - 璁块棶浜哰DispatchOrder_List 椤甸潰] - 鐢ㄦ埛鏉冮檺锛�" & isDepartmentStr) ' 鍐欏叆褰撳墠鏃堕棿鍜岀鐞嗗憳鍚嶇О + f.Close +Else + ' 濡傛灉鎵撳紑鏂囦欢澶辫触锛屽拷鐣ラ敊璇� +End If + +' 閲婃斁瀵硅薄 +Set f = Nothing +Set fs = Nothing + +On Error GoTo 0 ' 鍏抽棴閿欒澶勭悊 + +'濡傛灉isDepartmentStr="鏃犳潈闄�" +If isDepartmentStr = "鏃犳潈闄�" Then + ' 鎵撳紑鏂囦欢骞跺啓鍏ュ唴瀹� + On Error Resume Next ' 鍚敤閿欒澶勭悊 + Set f = fs.OpenTextFile(filePath, 8, True) ' 8 琛ㄧず杩藉姞妯″紡 + If Err.Number = 0 Then ' 濡傛灉鏈彂鐢熼敊璇� + f.WriteLine(Now() & " - " & adminName & " - 灏濊瘯璁块棶[DispatchOrder_List 椤甸潰] - " & isDepartmentStr) ' 鍐欏叆褰撳墠鏃堕棿鍜岀鐞嗗憳鍚嶇О + f.Close + Else + ' 濡傛灉鎵撳紑鏂囦欢澶辫触锛屽拷鐣ラ敊璇� + End If + + ' 閲婃斁瀵硅薄 + Set f = Nothing + Set fs = Nothing + + On Error GoTo 0 ' 鍏抽棴閿欒澶勭悊 + + Response.Write("Access not allowed, no permission!") + Response.End() +End If +%> + + + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -- Gitblit v1.9.1