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


<!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 src="../js/jquery/jquery-1.4.4.src.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var UserID = '<% =LoginUserInfo.sUserID %>';
        function opJsTreeUser(txt, txtValue, txtRole, txtToUserID) {
            var role = $("#" + txtRole).val();
            var ToUserID = $("#" + txtToUserID).val();

            var para = "/admin/workflow/treeuserselect.aspx?para=1&list=" + $("#" + txtValue).val() + "&role=" + role + "&touserid=" + ToUserID;
            CareffArtOpen4(para, '人员选择', 300, 500, 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];

                $("#" + "txtSHToRoleID").val(strs[2]);
            });
        }




        function jscheckAll() {

            var altInfo = "";

            var TUserID = $('#txtUserID').val();
            if (UserID == TUserID) {
                altInfo = ("申请人和审批人尽量不要是同一人！" + "\n");
            }

            var UserName = $('#txtUserName').val();


            var info = "";
            info = (altInfo + "您确实要将任务提交给[" + UserName + "]审批吗，提交审批后，您将无法修改，是否要继续吗？");



            //info = "您确实要修改数据库连接吗？修改成功后，需要重新登录系统！";
            //alert(art.dialog.data("retdata"));
            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;

        }



        ///页面加载注册事件
        $(document).ready(function () {
            //alert(selectid);
            $("#radLType input").click(function () {
                var data = $(this).parent().attr("data");
                var s = data.split("#");
                $("#txtToRoleID").val(s[0]);
                $("#txtToUserID").val(s[1]);

                $("#txtUserID").val("");
                $("#txtUserName").val("");

                var s1 = s[1].split(",");
                var s2 = s[2].split(",");
                if (s1.length == 1) {
                    $("#txtUserID").val(s1[0]);
                    $("#txtUserName").val(s2[0]);
                    $("#txtSHToRoleID").val(s[0]);
                }
            });
        });

        $(window).load(function () {

            //$('#loading').fadeOut();
            $("#radYes").click(function () { if ($("#txtFInfo").val() == "" || $("#txtFInfo").val() == "拒绝审批") { $("#txtFInfo").val("同意审批") } });
            $("#radNo").click(function () { if ($("#txtFInfo").val() == "" || $("#txtFInfo").val() == "同意审批") { $("#txtFInfo").val("拒绝审批") } });
            //txtFInfo
            //art.dialog.data("retdata", 0);
        });
    </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 id="panel" runat="server"></div>
                <div class="divInfoContext">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        2.您对该流程的意见
                                    </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">审批意见<span class="fStar">*</span></td>
                                <td class="tabmanagertr">

                                    <asp:RadioButton ID="radYes" runat="server" Checked="True" GroupName="c" Text="同意审批" />
                                    <asp:RadioButton ID="radNo" runat="server" GroupName="c" Text="拒绝审批" /></td>

                            </tr>


                            <tr class="tablisttr">
                                <td class="tablisttitle">审批备注</td>
                                <td class="tabmanagertr">


                                    <asp:TextBox ID="txtFInfo" runat="server" ToolTip="审批备注" Text="同意审批" Width="98%" TextMode="MultiLine" Height="60px" MaxLength="1000"></asp:TextBox>


                                </td>
                            </tr>



                        </table>


                    </div>


                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        3.该流程下一步的流向
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="Table1" onmouseover="changeto()" onmouseout="changeback()">
                            <tr class="tablisttr">
                                <td class="tablisttitle">审批节点选择<span class="fStar">*</span></td>
                                <td class="tabmanagertr">

                                    <asp:RadioButtonList runat="server" ID="radLType" RepeatDirection="Horizontal">
                                    </asp:RadioButtonList></td>

                            </tr>

                            <tr class="tablisttr">
                                <td class="tablisttitle">审批人员选择<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtUserName" runat="server" Text="" CssClass="1" ToolTip="审批人员"></asp:TextBox>
                                    <div style="display: none">
                                        <asp:TextBox ID="txtToRoleID" runat="server" Text=""></asp:TextBox>
                                        <asp:TextBox ID="txtToUserID" runat="server" Text=""></asp:TextBox>
                                        <asp:TextBox ID="txtUserID" runat="server" Text="" CssClass="1"></asp:TextBox>
                                        <asp:TextBox ID="txtSHToRoleID" runat="server" Text=""></asp:TextBox>
                                    </div>

                                    <a href="javascript:opJsTreeUser('txtUserName','txtUserID','txtToRoleID','txtToUserID');">[选择人员]</a></td>

                            </tr>


                            <tr class="tablisttr">
                                <td class="tablisttitle">附带留言</td>
                                <td class="tabmanagertr">


                                    <asp:TextBox ID="txtFInfo1" runat="server" ToolTip="附带留言" Text="" Width="98%" TextMode="MultiLine" Height="60px" MaxLength="1000"></asp:TextBox>


                                </td>
                            </tr>
                        </table>

                    </div>
                    <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 class="divInfo">
                        <span class="usHelpMessage">* 注意事项： </span>
                        审批节点中的审批同意，审批拒绝，打回修改为系统自动添加节点，以方便您能直接结束流程或者打回修改；
                        当选择这三种状态中的一种时审批人员将变成您自己，这个不影响您的任何操作；

                        <%=UsToolArtUrl("/admin/workflow/workflowdetailjsview.aspx" +"?FlowID="+entity.sFlowID, "[点击查看工作流程说明]","A3")%>


                    </div>

                </div>
            </div>
        </div>

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