WorkFlowTaskEdit.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:11k
源码类别:

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="Workflow_WorkFlowTaskEdit, App_Web_4afs73eh" theme="Normal" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5. <link type="text/css" href="style/formbody.css" rel="stylesheet" />
  6.     <title>任务流定义</title>
  7.     <script type="text/javascript" >
  8.     
  9.         function  DelAllItem(ListBox2Object)  //删除全部
  10.         {
  11.          var rows=ListBox2Object.options.length;
  12.          for(i=rows-1;i>=0;i--)
  13.            { 
  14.               ListBox2Object.options.remove(i);
  15.            }
  16.         }
  17.         function OpenShowWindow()
  18. {
  19.             var NUrl ="WorkFlowSelectTable.aspx?StrN=T&StrM=" + form1.WFValue.value + "&strT=" + form1.DTaskMode.value;
  20.     var NVale=window.showModalDialog(NUrl,"","help=0;dialogWidth=450px;dialogHeight=350px;status=no;status=no;");
  21.     if (NVale!=undefined)
  22.             {
  23.                var Vstr = NVale.split("|");
  24.                var VValue,VText;
  25.                if (Vstr.length==2)
  26.                {    
  27.                     DelAllItem(document.all.lbParentTask);
  28.                     var i=0;
  29.                     VValue=Vstr[0].split(",");
  30.                     VText=Vstr[1].split(",");
  31.                     for(i=0;i<VValue.length-1;i++)
  32.                     {
  33.                         var oItem=document.createElement("option");
  34.                     oItem.text=VText[i];
  35.                     oItem.value=VValue[i];
  36.                     document.all.lbParentTask.add(oItem);
  37.                     }
  38.                }
  39.             }
  40.             return false;
  41. }
  42.   function ReplaceBacksLash(sDoc)
  43.             {
  44.                var a= sDoc.split('^');
  45.                for (var i=0;i<a.length;i++)
  46.                {
  47.                     if (i==0)
  48.                     {
  49.                         sDoc = a[i];
  50.                     }
  51.                     else 
  52.                     {
  53.                         sDoc = sDoc + "\\" + a[i];
  54.                      }
  55.                  }
  56.         //         alert(sDoc);
  57.                  return sDoc;   
  58.             }
  59.             
  60. function OpenShowWindowDoc()
  61. {
  62.             var NUrl ="WorkFlowSelectDoc.aspx?StrN=T&StrM=" + form1.HAct.value;
  63.     var NVale=window.showModalDialog(NUrl,"","help=0;dialogWidth=600px;dialogHeight=450px;status=no;status=no;");
  64.     if (NVale!=undefined)
  65.             {
  66. //                alert(NVale);
  67.                var Vstr = NVale.split("|");
  68.                var VValue,VText;
  69.                if (Vstr.length==2)
  70.                {    
  71.                     DelAllItem(document.all.LstDoc);
  72.                     var i=0;
  73.                     VValue=Vstr[0].split(",");
  74.                     VText=Vstr[1].split(",");
  75.                     for(i=0;i<VValue.length-1;i++)
  76.                     {
  77.                         var oItem=document.createElement("option");
  78.                     oItem.text=VText[i];
  79.                     oItem.value=ReplaceBacksLash(VValue[i]);
  80.                     document.all.LstDoc.add(oItem);
  81.                     }
  82.                }
  83.             }
  84.             return false;
  85. }
  86. function CheckNull()
  87. {
  88.     if (form1.TxtTaskName.value=="" || form1.TxtTaskName.value==null) 
  89.     {
  90.         alert("系统提示:任务名称不能为空!");
  91.         return false;
  92.     }
  93. //     if (form1.TTaskUnit.value=="" || form1.TTaskUnit.value==null)
  94. //     {
  95. //         alert("系统提示:使用单位名称不能为空!");
  96. //         return false;
  97. //     }
  98.             if (form1.lbParentTask.options.length <1 )
  99.             {
  100.         alert("系统提示:上级任务不能为空!");
  101.         return false;
  102.     }
  103.     var i=0;
  104.     var svalue
  105.     for (i=0;i<form1.lbParentTask.options.length;i++)
  106.     {
  107.         if (i==0) 
  108.         {
  109.             svalue = form1.lbParentTask.options[i].value;
  110.         }
  111.         else 
  112.         {
  113.             svalue = svalue + "|" + form1.lbParentTask.options[i].value;
  114.          }
  115.     }
  116.     form1.ListValue.value = svalue;
  117.     svalue="";
  118.     for (j=0;j<form1.LstDoc.options.length;j++)
  119.     {
  120.         if (j==0) 
  121.         {
  122.             svalue = form1.LstDoc.options[j].value;
  123.         }
  124.         else 
  125.         {
  126.             svalue = svalue + "|" + form1.LstDoc.options[j].value;
  127.          }
  128.     }    
  129.     form1.ListDoc.value = svalue;
  130. //     alert(document.getElementById("WFName").value);
  131. }
  132. function OKCancel()
  133. {
  134.     if (confirm("系统提示:您确定放弃本次操作吗?")) 
  135.     {
  136.         window.location.href("WorkFlowConfigure.aspx");
  137.     }
  138.     return false;
  139. }
  140. function SysHelp()
  141. {
  142.     alert("系统提示:对不起系统未提供应有的帮助!");
  143.     return false;
  144. }
  145.     </script>
  146. </head>
  147. <body>
  148.     <form id="form1" runat="server">
  149.     <div>
  150.         <input id="FldsID" type="hidden" name="FldsID" runat="server"/> <input id="UsrsID" type="hidden" name="UsrsID" runat="server"/>
  151.         <input id="WFValue" type="hidden" name="WFValue" runat="server"/><input id="ListValue" type="hidden" name="tid" runat="server"/>
  152.         <input id="ListDoc" type="hidden" name="ListDoc" runat="server"/><input id ="HAct" type="hidden" name="HAct" runat="server" />
  153. <table cellspacing="0" cellpadding="0" width="82%" border="0" style="text-align:center;" >
  154.     <tr>
  155.         <td>
  156.             <fieldset>
  157.             <legend style="text-align:left;">
  158. <img alt="任务基本信息" src="image/DateTime.gif" style="text-align:center; border:0;"/>任务基本信息
  159. </legend>
  160.             <table>
  161.                 <tr>
  162.             <td style="height:10; width:10;"></td>
  163.             <td align="left" style="width:400;"></td>
  164.             </tr>
  165.             <tr style="height:18;">
  166.             <td style="height:18;">
  167.             <table>
  168.                 <tr>
  169.                 <td>任务名称:</td>
  170.                                     <td><asp:TextBox ID="TxtTaskName" runat="server" CssClass="input" Width="196" Height="16px" MaxLength="200"></asp:TextBox></td>
  171.                                     <td>&nbsp;&nbsp;&nbsp;使用单位:</td>
  172.                 <td><asp:TextBox ID="TTaskUnit" runat="server" CssClass="input" Width="196" Height="16px" MaxLength="200"></asp:TextBox></td>
  173.                 </tr>
  174.             </table>
  175.             </td>
  176.             </tr>
  177.             <tr>
  178.             <td>
  179.             <table>
  180.                 <tr>
  181.                 <td>使用角色:</td>
  182.                 <td><asp:DropDownList ID="DTaskRoleName" runat="server" Width="200" Height="16px" CssClass="input"></asp:DropDownList></td>
  183.                 <td>&nbsp;&nbsp;&nbsp;任务种类:</td>
  184.                 <td><asp:DropDownList ID="DTaskSort" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskSort_SelectedIndexChanged"></asp:DropDownList></td>
  185.                 </tr>
  186.             </table>
  187.             </td>
  188.             </tr>
  189.             <tr>
  190.             <td>
  191.             <table>
  192.                 <tr>
  193.                 <td>阻塞方式:</td>
  194.                 <td><asp:DropDownList ID="DTaskBlock" runat="server" Width="200" Height="16px" CssClass="input"></asp:DropDownList></td>
  195.                 <td>&nbsp;&nbsp;&nbsp;协调方式:</td>
  196.                 <td><asp:DropDownList ID="DTaskMode" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskMode_SelectedIndexChanged"></asp:DropDownList></td>
  197.                 
  198.                 </tr>
  199.             </table>
  200.             </td>
  201.             </tr>
  202.             <tr>
  203.             <td>
  204.             <table>
  205.                 <tr>
  206.                 <td>分流方式:</td>
  207.                 <td><asp:DropDownList ID="DTaskShunt" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskShunt_SelectedIndexChanged"></asp:DropDownList></td>
  208.                 <td>&nbsp;&nbsp;&nbsp;使用页面:</td>
  209.                                     <td><asp:DropDownList ID="DTaskPage" runat="server" Width="200" Height="16px" CssClass="input"/></td>      
  210.                 </tr>
  211.             </table>
  212.             </td>
  213.             </tr>
  214.             <tr>
  215.             <td style="text-align:left;">
  216.             <table>
  217.                 <tr>
  218.                 <td valign="top">上级任务:</td>
  219.                 <td align="left" valign="bottom">
  220.                     <asp:ListBox id="lbParentTask" runat="server" Width="200" CssClass="input"></asp:ListBox>
  221.             <asp:ImageButton id="ImgSelect" runat="server" ImageUrl="image/ch.gif" OnClientClick="javascript:return OpenShowWindow();"></asp:ImageButton></td>
  222.                 </tr>
  223.             </table>
  224.             </td>
  225.             </tr>
  226.             <tr>
  227.                 <td style="text-align:left;">
  228.                 <table>
  229.                     <tr>
  230.                         <td valign="top">所属文挡:</td>
  231.                         <td align="left" valign="bottom">
  232.                     <asp:ListBox id="LstDoc" runat="server" Width="200" CssClass="input"></asp:ListBox>
  233.             <asp:ImageButton id="ImgDoc" runat="server" ImageUrl="image/ch.gif" OnClientClick="javascript:return OpenShowWindowDoc();"></asp:ImageButton></td>
  234.                     </tr>
  235.                 </table>
  236.                 </td>
  237.             </tr>
  238.             <tr style="height:10;">
  239. <td style="height:10;"></td>
  240. </tr>
  241.             <tr>
  242.             <td style="height:20" align="right">
  243.                 <asp:imagebutton id="ImgOK" runat="server" ImageUrl="image/confirm.gif" OnClientClick="javascript:return CheckNull();" OnClick="ImgOK_Click"></asp:imagebutton>&nbsp;&nbsp;&nbsp;
  244.             <asp:imagebutton id="ImgCancel" runat="server" ImageUrl="image/cancel.gif" OnClientClick="javascript:return OKCancel();"></asp:imagebutton>&nbsp;&nbsp;&nbsp;
  245.             <asp:imagebutton id="ImgHelp" runat="server" ImageUrl="image/help.gif" OnClientClick="javascript:return SysHelp();"></asp:imagebutton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  246.             </td>
  247.             </tr>
  248.             </table>
  249.         </fieldset> 
  250.     </td> 
  251. </tr> 
  252. </table>
  253. <%-- <script type="text/javascript">
  254. OnDeadLineHandler();
  255. OnFieldTypeHandler();
  256. OnUserTypeHandler();
  257. OnTaskTypeHandler();
  258. </script>--%>
  259.     </div>
  260.         
  261.     </form>
  262. </body>
  263. </html>