⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 task_bak.inc

📁 物业管理和办公自动化系统
💻 INC
📖 第 1 页 / 共 2 页
字号:
		   formTask.Executors.options(i).selected = true
		next
		sExecutors = left(sExecutors, len(sExecutors) - 1)
		formTask.Executors.value = sExecutors
	end if
end function

'---------------------------------------------------------------
' VBScript函数CheckRemindData()检查提醒数据是否正确并设置提醒数据Remind_Method和Remind_Time
'---------------------------------------------------------------
function CheckRemindData()
	' 提醒类型、提醒方式和下次提醒时间
	Dim sRemindType	: sRemindType = ""				' 提醒类型(用于判断)
	Dim sRemindMethod : sRemindMethod = ""			' 提醒方式(用于提交)
	Dim sRemindTime	: sRemindTime = ""				' 下次提醒时间(用于提交)
	Dim sAhead		: sAhead = ""
	Dim	sDayTime	: sDayTime = ""
	sRemindType = formTask.remind_type.value
	CheckRemindData = ""				' 缺省总是认为数据是正确的
	select case sRemindType
	case ""			' 从不提醒
		sRemindMethod = ""
	case "0104"		' 提前N分钟提醒
		sAhead = getAheadValue("aheadMinutes")
		if sAhead = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "0104" & sAhead
	case "0108"		' 提前N小时提醒
		sAhead = getAheadValue("aheadHours")
		if sAhead = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "0108" & sAhead
	case "0116"		' 提前N天提醒
		sAhead = getAheadValue("aheadDays")
		if sAhead = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "0116" & sAhead
	case "0400"		' 每天提醒
		sDayTime = getDaytime("daytime")
		if sDaytime = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "0400" & sDaytime
	case "08"		' 每周提醒
		sDayTime = getDaytime("weekdaytime")
		if sDayTime = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "08" & document.all.dayofweek.value & sDaytime
	case "16"		' 每月提醒
		sDayTime = getDaytime("monthdaytime")
		if sDaytime = "" then CheckRemindData = "Error" : exit function
		sRemindMethod = "16" & Right("00" & document.all.dayofmonth.value,2) & sDaytime	' 日期总是二位的:01~28
	end select
	formTask.remind_method.value = sRemindMethod
	' 调用FirstRemindTime函数根据提醒方式和任务开始时间算出第一次提醒时间
	formTask.remind_time.value = FirstRemindTime(sRemindMethod, formTask.doFrom.value)
end function

'---------------------------------------------------------------
' VBScript函数SetNeverRemind()设置从不提醒
'---------------------------------------------------------------
sub SetNeverRemind()
	formTask.remind_type.value = ""
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method_desp.value = "从不提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetAheadMinutesRemind()设置一次性提醒 --> 提前 N 分钟提醒
'---------------------------------------------------------------
sub	SetAheadMinutesRemind(nMinutes)
	formTask.remind_type.value = "0104"
	document.all.aheadMinutes.disabled = false
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method_desp.value = "一次性提醒 --> 提前 " & nMinutes & " 分钟提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetAheadHoursRemind()设置一次性提醒 --> 提前 N 小时提醒
'---------------------------------------------------------------
sub	SetAheadHoursRemind(nHours)
	formTask.remind_type.value = "0108"
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = false
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method_desp.value = "一次性提醒 --> 提前 " & nHours & " 小时提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetAheadDaysRemind()设置一次性提醒 --> 提前 N 天提醒
'---------------------------------------------------------------
sub	SetAheadDaysRemind(nDays)
	formTask.remind_type.value = "0116"
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = false
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method_desp.value = "一次性提醒 --> 提前 " & nDays & " 天提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetLoopDayRemind()设置循环提醒 --> 每天提醒
'---------------------------------------------------------------
sub SetLoopDayRemind(daytime)
	formTask.remind_type.value = "0400"
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = false
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method_desp.value = "循环提醒 --> 每天 " & daytime & " 提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetLoopWeekRemind()设置循环提醒 --> 每周提醒
'---------------------------------------------------------------
sub SetLoopWeekRemind(dayofweek,weekdaytime)
	formTask.remind_type.value = "08"
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = false
	document.all.weekdaytime.disabled = false
	document.all.dayofmonth.disabled = true
	document.all.monthdaytime.disabled = true
	formTask.remind_method.value = "08" & dayofweek & weekdaytime
	formTask.remind_method_desp.value = "循环提醒 --> 每周" & TransWeekDay(dayofweek) & " " & weekdaytime & " 提醒"
end sub

'---------------------------------------------------------------
' VBScript函数SetLoopMonthRemind()设置循环提醒 --> 每月提醒
'---------------------------------------------------------------
sub SetLoopMonthRemind(dayofmonth,monthdaytime)
	formTask.remind_type.value = "16"
	document.all.aheadMinutes.disabled = true
	document.all.aheadHours.disabled = true
	document.all.aheadDays.disabled = true
	document.all.daytime.disabled = true
	document.all.dayofweek.disabled = true
	document.all.weekdaytime.disabled = true
	document.all.dayofmonth.disabled = false
	document.all.monthdaytime.disabled = false
	formTask.remind_method.value = "16" & dayofmonth & monthdaytime
	formTask.remind_method_desp.value = "循环提醒 --> 每月" & dayofmonth & "日 " & monthdaytime & " 提醒"
end sub
</script>

<script language="JavaScript">
//---------------------------------------------------------------
// JavaScript函数ShowSetRemind()设置提醒隐藏或显示
//---------------------------------------------------------------
function ShowSetRemind()
{
	var obj, objLeft, objTop, objParent;
	if (RemindTable.style.display == "none")
	{
		obj = formTask.remind_method_desp;
		objLeft = obj.offsetLeft;
		objTop = obj.offsetTop;
		objParent = obj.offsetParent;
		while (objParent.tagName.toUpperCase() != "BODY")
		{
			objLeft += objParent.offsetLeft;
			objTop += objParent.offsetTop;
			objParent = objParent.offsetParent;
		}
		RemindTable.style.left = objLeft;
		RemindTable.style.top = objTop + 19;
		RemindTable.style.display = "block";
	}
	else
		RemindTable.style.display = "none";
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -