<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="taskmanage.aspx.cs" Inherits="Us.Web.admin.task.taskmanage" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>任务管理</title>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
     <%=ImportScriptStr %>
   <script language="javascript" type="text/javascript">
       KindEditor.ready(function (K) {
           K.create('#txtTaskInfo');
       });
    </script>
   
    
<script language="javascript" type="text/javascript">
    function opJsTreeUser(txt, txtValue) {
        var para = "/admin/basic/usertreeselect.aspx?para=2&list=" + $("#" + txtValue).val() + "&PostID=<% =LoginUserInfo.sPostID %>&DeptID=<% =LoginUserInfo.sDeptID %>";
        CareffArtOpen4(para, '人员选择', 300, 650, function (path) {
            //alert(path);
            if (path == null) { return false; }
            var strs = path.split("#")
            var m = $id(txt)
            m.value = strs[1];
            var m1 = $id(txtValue)
            m1.value = strs[0];
        });
    }

    function jscheckAll() {
        var sValue = $("#drpTaskState").val();

        var UserID = $("#txtUserID").attr("title") + ",";
        var RUserID = $("#txtReceiveUserID").val() + ",";


        //if (RUserID.indexOf(UserID) >= 0) {
        //    art.dialog.alert('对不起，系统暂时不支持把工作任务分配给自己，请重新选择任务责任人！');
        //    return false;

        //}
        if ((sValue != "1") && (sValue != "2")) {
            //alert('对不起，系统暂时不支持把工作任务分配给自己，请重新选择任务责任人！');
            if ($("#drpTaskState").attr("disabled") == false)
            {
                art.dialog.alert('对不起，您只能修改待发布和发布的任务状态，其他状态的任务不要调节!');
                return false;
            }
        }
        
        if (sValue == "2") {
            //return window.confirm("当您提交工作任务状态为[已经发布]状态，您将无法修改，是否要继续吗？");
            var info = "";
            info = "当您提交工作任务状态为[已经发布]状态，其他人可以接收到任务，是否要继续吗？";

            if (art.dialog.data("retdata") == 1) {
                art.dialog.data("retdata", 0);//重置
                return true;
            }
            art.dialog.confirm(info, function () {
                art.dialog.data("retdata", 1);
                document.getElementById("btnSubmit").click();
            });

            return false;
        }
        return true;
    }
 </script>

    </head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">
    
    <div id="tbMain">
        <div class="divTbg">
            <div class="divTbgL">
            </div>
            <div class="divTbgInfo">
                <div class="divTbgTitle">
                   任务管理</div>
            </div>
        </div>
        <div class="divTbgF">
        </div>
        <div class="divTNavBG" id="topURL">
            <ul id="topURLul">
                <li class="divURLed" id="div1">
                    <div>
                        <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                        基本信息</div>
                </li>
            </ul>
        </div>
        <div id="mypanel">
            <div class="divInfoContext">
                <div class="divInfo">
                    <div class="divInfoblack">
                        <div class="divInfoTopList">
                            <div class="listLeft">
                                <div class="navtitle">
                                    任务管理</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="divInfo">
                  <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist" onMouseOver="changeto()" onmouseout="changeback()">
<tr class="tablisttr">
  <td class="tablisttitle">任务编号</td>
  <td class="tabmanagertr"><asp:TextBox ID="txtTaskID" runat="server" ToolTip="任务编号" Text="" ReadOnly="true" CssClass="1"></asp:TextBox></td>
  <td class="tablisttitle">任务标题<span class="fStar">*</span></td>
  <td class="tabmanagertr"><asp:TextBox ID="txtTaskName" runat="server" ToolTip="任务标题" Text="" CssClass="1"></asp:TextBox></td>
</tr>
<tr class="tablisttr">
  <td class="tablisttitle">任务分类</td>
  <td class="tabmanagertr"><asp:DropDownList runat="server" ID="drpTaskType" tooltip="任务分类">
    <asp:ListItem Value="TaskType" Text="codeno"></asp:ListItem>
  </asp:DropDownList></td>
  <td class="tablisttitle">要求完成时间</td>
  <td class="tabmanagertr"><asp:TextBox ID="txtTDate4" runat="server" ToolTip="要求完成时间" Text="" onClick="WdatePicker()"></asp:TextBox></td>
</tr>
<tr class="tablisttr">
  <td class="tablisttitle">任务状态<span class="fStar">*</span></td>
  <td class="tabmanagertr"><asp:DropDownList runat="server" ID="drpTaskState" tooltip="任务状态">
    <asp:ListItem Value="TaskState" Text="codeno"></asp:ListItem>
  </asp:DropDownList></td>
     <td class="tablisttitle">任务类型</td>
                                <td class="tabmanagertr">
                                    <asp:DropDownList runat="server" ID="drpTParentID" ToolTip="任务类型" Enabled="false">
                                        <asp:ListItem Value="TParentID" Text="code"></asp:ListItem>
                                    </asp:DropDownList></td>
</tr>

<tr class="tablisttr">
  <td class="tablisttitle">任务部门</td><td class="tabmanagertr">
    <asp:TextBox ID="txtDeptID" runat="server" ToolTip="计划部门" Text="" 
        Enabled="False"></asp:TextBox></td>
  <td class="tablisttitle">发布人员</td><td class="tabmanagertr">
    <asp:TextBox ID="txtUserID" runat="server" ToolTip="计划人员" Text="" 
        Enabled="False"></asp:TextBox></td>
</tr>


<tr class="tablisttr">
<td class="tablisttitle">任务要求</td><td class="tabmanagertr" colspan="3"><asp:TextBox ID="txtTaskInfo" runat="server" ToolTip="计划信息" Text=""  Width="100%" TextMode="MultiLine" Height="200px" 
    ></asp:TextBox></td>
</tr>
<tr class="tablisttr">
<td class="tablisttitle">任务附件</td><td class="tabmanagertr" colspan="3"><asp:TextBox ID="txtTAddr" runat="server" ToolTip="任务附件" Text="" Width="80%"></asp:TextBox>
    <a href="#" onclick="SkyOpen('txtTAddr');">[选择]</a><a href="#" onclick="SkyView('txtTAddr');">[查看]</a><a href="#" onclick="SkyDelete('txtTAddr');">[清空]</a></td>

</tr>

<tr class="tablisttr">
<td class="tablisttitle">任务责任人<span class="fStar">*</span></td><td class="tabmanagertr" colspan="3">
<asp:TextBox ID="txtReceiveUserName" runat="server" ToolTip="任务责任人" Text="" CssClass="1" Width="80%"></asp:TextBox>
<div style="display:none"><asp:TextBox ID="txtReceiveUserID" runat="server" ToolTip="审核人员" Text=""></asp:TextBox></div>


<a href="javascript:opJsTreeUser('txtReceiveUserName','txtReceiveUserID');">[选择]</a></td>
</tr>
</table>
                    <div class="divSave">
<asp:Button ID="btnSubmit" runat="server" Text="保存(S)" 
                            CssClass="SkyButtonFocus" onclick="btnSubmit_Click" />
                        <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus" 
                            onclick="btnSubmit_Click" />
                    </div>
                </div>
            </div>
        </div>
    </div>







    </form>
</body>
</html>
