You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
5.5 KiB
152 lines
5.5 KiB
4 years ago
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
||
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.DataTaskPlanModel>" %>
|
||
|
|
||
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||
|
数据处理任务设置
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||
|
<%=Html.QPSeach(80,true) %>
|
||
|
<table id="condiTable">
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.PlanName)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.PlanName)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<%=Html.QPEnd()%>
|
||
|
<%=Html.QPList() %>
|
||
|
<%=Html.QDateGrid<QMAPP.Web.Models.Sys.DataTaskPlanModel>(Model)%>
|
||
|
<%=Html.QPEnd() %>
|
||
|
<%=Html.Hidden("selectKey")%>
|
||
|
<script language="javascript" type="text/javascript">
|
||
|
|
||
|
//增加数据处理任务
|
||
|
function Insert() {
|
||
|
openAppWindow1('添加数据处理任务设置', '/DataTaskPlan/DataTaskPlanEdit', '520', '480');
|
||
|
}
|
||
|
|
||
|
//修改数据处理任务
|
||
|
function Update() {
|
||
|
var ids = getSelectKey();
|
||
|
if (ids == "") {
|
||
|
MSI("提示", "请选择修改记录。");
|
||
|
return;
|
||
|
}
|
||
|
if (ids.indexOf(":") > 0) {
|
||
|
MSI("提示", "每次只能修改一条记录。");
|
||
|
return;
|
||
|
}
|
||
|
openAppWindow1('修改数据处理任务设置', 'DataTaskPlanEdit?planID=' + ids, '520', '480');
|
||
|
}
|
||
|
|
||
|
|
||
|
//删除数据处理任务
|
||
|
function Delete() {
|
||
|
var ids = getSelectKey();
|
||
|
|
||
|
if (ids == "") {
|
||
|
MSI("错误", "至少选择一条记录。");
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
MSQ("提示", "确定要删除选中的记录吗?", function () {
|
||
|
submitByButton("DataTaskPlanDelete");
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//启用数据处理任务
|
||
|
function Start() {
|
||
|
//添加状态判断如果已经启动了.不能再次启动
|
||
|
var rows = $("#QDateGrid").datagrid("getSelections");
|
||
|
//判断是否有计划已经启动了
|
||
|
var bool = "0";
|
||
|
var bool1 = false;
|
||
|
for (var i = 0; i < rows.length; i++) {
|
||
|
if (rows[i].IsUse == "是") {
|
||
|
bool = "1";
|
||
|
break;
|
||
|
}
|
||
|
if (rows[i].PlanEndDate != "无") {
|
||
|
var now = new Date();
|
||
|
var et = new Date(rows[i].PlanEndDate.replace("-", "/"));
|
||
|
//较验起始和结束时间
|
||
|
if (now > et) {
|
||
|
bool = "2";
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (bool == "1") {
|
||
|
alert("计划已经处于启用状态,不能重复启用.");
|
||
|
return false;
|
||
|
}
|
||
|
if (bool =="2") {
|
||
|
MSI("提示", "无效执行时间范围,无法起动任务。");
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
var ids = getSelectKey();
|
||
|
|
||
|
if (ids == "") {
|
||
|
MSI("错误", "至少选择一条记录。");
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
MSQ("提示", "确定要启用选中的任务吗?", function () {
|
||
|
submitByButton("DataTaskPlanStart");
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//停用数据处理任务
|
||
|
function Stop() {
|
||
|
//添加状态判断如果已经停用了不能重复停用
|
||
|
var rows = $("#QDateGrid").datagrid("getSelections");
|
||
|
//判断是否有计划已经启动了
|
||
|
var bool = false;
|
||
|
for (var i = 0; i < rows.length; i++) {
|
||
|
if (rows[i].IsUse == "否") {
|
||
|
bool = true;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (bool) {
|
||
|
alert("计划已经处于停用状态.");
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
var ids = getSelectKey();
|
||
|
|
||
|
if (ids == "") {
|
||
|
MSI("错误", "至少选择一条记录。");
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
MSQ("提示", "确定要停用选中的任务吗?", function () {
|
||
|
submitByButton("DataTaskPlanStop");
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
||
|
<table id="EditTable" cellpadding="0" cellspacing="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<%=Html.QTButtonSearch("DataTaskPlan", "DataTaskPlanList", "List()")%>
|
||
|
<%=Html.QTButtonAdd("DataTaskPlan", "DataTaskPlanInsert", "Insert();")%>
|
||
|
<%=Html.QTButtonUpdate("DataTaskPlan", "DataTaskPlanUpdate", "Update()")%>
|
||
|
<%=Html.QTButtonDelete("DataTaskPlan", "DataTaskPlanDelete", "Delete()")%>
|
||
|
<%=Html.QTButton("startTask", "ExportExcel","start", "Start()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("endTask", "ExportExcel", "stop", "Stop()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("help", "", "help", "SysHelp('01100000','DataTaskPlanModel')", (s, f) => { return true; })%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</asp:Content>
|