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

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="Workflow_WorkFlowTaskEdit, App_Web_-rs7x2pk" 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 ="WorkFlowSelectDoc1.aspx?StrN=T&StrM=" + form1.HAct.value;
  63.     var NVale=window.showModalDialog(NUrl,"","help=0;dialogWidth=800px;dialogHeight=550px;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 = VValue[i];
  80.                     //oItem.value=ReplaceBacksLash(VValue[i]);
  81.                     document.all.LstDoc.add(oItem);
  82.                     }
  83.                }
  84.             }
  85.             return false;
  86. }
  87. function CheckNull()
  88. {
  89.     if (form1.TxtTaskName.value=="" || form1.TxtTaskName.value==null) 
  90.     {
  91.         alert("系统提示:任务名称不能为空!");
  92.         return false;
  93.     }
  94. //     if (form1.TTaskUnit.value=="" || form1.TTaskUnit.value==null)
  95. //     {
  96. //         alert("系统提示:使用单位名称不能为空!");
  97. //         return false;
  98. //     }
  99.             if (form1.lbParentTask.options.length <1 )
  100.             {
  101.         alert("系统提示:上级任务不能为空!");
  102.         return false;
  103.     }
  104.     var i=0;
  105.     var svalue
  106.     for (i=0;i<form1.lbParentTask.options.length;i++)
  107.     {
  108.         if (i==0) 
  109.         {
  110.             svalue = form1.lbParentTask.options[i].value;
  111.         }
  112.         else 
  113.         {
  114.             svalue = svalue + "|" + form1.lbParentTask.options[i].value;
  115.          }
  116.     }
  117.     form1.ListValue.value = svalue;
  118.     svalue="";
  119.     for (j=0;j<form1.LstDoc.options.length;j++)
  120.     {
  121.         if (j==0) 
  122.         {
  123.             svalue = form1.LstDoc.options[j].value;
  124.         }
  125.         else 
  126.         {
  127.             svalue = svalue + "|" + form1.LstDoc.options[j].value;
  128.          }
  129.     }    
  130.     form1.ListDoc.value = svalue;
  131. //     alert(document.getElementById("WFName").value);
  132. }
  133. function OKCancel()
  134. {
  135.     if (confirm("系统提示:您确定放弃本次操作吗?")) 
  136.     {
  137.         window.location.href("WorkFlowConfigure.aspx");
  138.     }
  139.     return false;
  140. }
  141. function SysHelp()
  142. {
  143.     alert("系统提示:对不起系统未提供应有的帮助!");
  144.     return false;
  145. }
  146.     </script>
  147. </head>
  148. <body>
  149.     <form id="form1" runat="server">
  150.     <div>
  151.         <input id="FldsID" type="hidden" name="FldsID" runat="server"/> <input id="UsrsID" type="hidden" name="UsrsID" runat="server"/>
  152.         <input id="WFValue" type="hidden" name="WFValue" runat="server"/><input id="ListValue" type="hidden" name="tid" runat="server"/>
  153.         <input id="ListDoc" type="hidden" name="ListDoc" runat="server"/><input id ="HAct" type="hidden" name="HAct" runat="server" />
  154. <table cellspacing="0" cellpadding="0" width="82%" border="0" style="text-align:center;" >
  155.     <tr>
  156.         <td>
  157.             <fieldset>
  158.             <legend style="text-align:left;">
  159. <img alt="任务基本信息" src="image/DateTime.gif" style="text-align:center; border:0;"/>任务基本信息
  160. </legend>
  161.             <table>
  162.                 <tr>
  163.             <td style="height:10; width:10;"></td>
  164.             <td align="left" style="width:400;"></td>
  165.             </tr>
  166.             <tr style="height:18;">
  167.             <td style="height:18;">
  168.             <table>
  169.                 <tr>
  170.                 <td>任务名称:</td>
  171.                                     <td><asp:TextBox ID="TxtTaskName" runat="server" CssClass="input" Width="196" Height="16px" MaxLength="200"></asp:TextBox></td>
  172.                                     <td>&nbsp;&nbsp;&nbsp;使用单位:</td>
  173.                 <td><asp:TextBox ID="TTaskUnit" runat="server" CssClass="input" Width="196" Height="16px" MaxLength="200"></asp:TextBox></td>
  174.                 </tr>
  175.             </table>
  176.             </td>
  177.             </tr>
  178.             <tr>
  179.             <td>
  180.             <table>
  181.                 <tr>
  182.                 <td>使用角色:</td>
  183.                 <td><asp:DropDownList ID="DTaskRoleName" runat="server" Width="200" Height="16px" CssClass="input"></asp:DropDownList></td>
  184.                 <td>&nbsp;&nbsp;&nbsp;任务种类:</td>
  185.                 <td><asp:DropDownList ID="DTaskSort" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskSort_SelectedIndexChanged"></asp:DropDownList></td>
  186.                 </tr>
  187.             </table>
  188.             </td>
  189.             </tr>
  190.             <tr>
  191.             <td>
  192.             <table>
  193.                 <tr>
  194.                 <td>阻塞方式:</td>
  195.                 <td><asp:DropDownList ID="DTaskBlock" runat="server" Width="200" Height="16px" CssClass="input"></asp:DropDownList></td>
  196.                 <td>&nbsp;&nbsp;&nbsp;协调方式:</td>
  197.                 <td><asp:DropDownList ID="DTaskMode" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskMode_SelectedIndexChanged"></asp:DropDownList></td>
  198.                 
  199.                 </tr>
  200.             </table>
  201.             </td>
  202.             </tr>
  203.             <tr>
  204.             <td>
  205.             <table>
  206.                 <tr>
  207.                 <td>分流方式:</td>
  208.                 <td><asp:DropDownList ID="DTaskShunt" runat="server" Width="200" Height="16px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="DTaskShunt_SelectedIndexChanged"></asp:DropDownList></td>
  209.                 <td>&nbsp;&nbsp;&nbsp;使用页面:</td>
  210.                                     <td><asp:DropDownList ID="DTaskPage" runat="server" Width="200" Height="16px" CssClass="input"/></td>      
  211.                 </tr>
  212.             </table>
  213.             </td>
  214.             </tr>
  215.             <tr>
  216.             <td style="text-align:left;">
  217.             <table>
  218.                 <tr>
  219.                 <td valign="top">上级任务:</td>
  220.                 <td align="left" valign="bottom">
  221.                     <asp:ListBox id="lbParentTask" runat="server" Width="200" CssClass="input"></asp:ListBox>
  222.             <asp:ImageButton id="ImgSelect" runat="server" ImageUrl="image/ch.gif" OnClientClick="javascript:return OpenShowWindow();"></asp:ImageButton></td>
  223.                 </tr>
  224.             </table>
  225.             </td>
  226.             </tr>
  227.             <tr>
  228.                 <td style="text-align:left;">
  229.                 <table>
  230.                     <tr>
  231.                         <td valign="top">所属文挡:</td>
  232.                         <td align="left" valign="bottom">
  233.                     <asp:ListBox id="LstDoc" runat="server" Width="200" CssClass="input"></asp:ListBox>
  234.             <asp:ImageButton id="ImgDoc" runat="server" ImageUrl="image/ch.gif" OnClientClick="javascript:return OpenShowWindowDoc();"></asp:ImageButton></td>
  235.                     </tr>
  236.                 </table>
  237.                 </td>
  238.             </tr>
  239.             <tr style="height:10;">
  240. <td style="height:10;"></td>
  241. </tr>
  242.             <tr>
  243.             <td style="height:20" align="right">
  244.                 <asp:imagebutton id="ImgOK" runat="server" ImageUrl="image/confirm.gif" OnClientClick="javascript:return CheckNull();" OnClick="ImgOK_Click"></asp:imagebutton>&nbsp;&nbsp;&nbsp;
  245.             <asp:imagebutton id="ImgCancel" runat="server" ImageUrl="image/cancel.gif" OnClientClick="javascript:return OKCancel();"></asp:imagebutton>&nbsp;&nbsp;&nbsp;
  246.             <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;
  247.             </td>
  248.             </tr>
  249.             </table>
  250.         </fieldset> 
  251.     </td> 
  252. </tr> 
  253. </table>
  254. <%-- <script type="text/javascript">
  255. OnDeadLineHandler();
  256. OnFieldTypeHandler();
  257. OnUserTypeHandler();
  258. OnTaskTypeHandler();
  259. </script>--%>
  260.     </div>
  261.         
  262.     </form>
  263. </body>
  264. </html>