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



<%@ Register Src="~/admin/work/workinfo.ascx" TagPrefix="uc1" TagName="workinfo" %>

<!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>

    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />




    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <%=ImportScriptStr %>
    <script language="javascript" type="text/javascript">
        KindEditor.ready(function (K) {
            K.create('#txtEvalInfo');
        });
    </script>

    <script language="javascript" type="text/javascript">
        $(function () {
            $("#drpEvalID").on("change", function () {
                var s = $(this).children('option:selected').attr("data-evalid");
                $("#txtEvalue").val(s);


                var s2 = $(this).children('option:selected').text();
                $("#txtWorkName").val(s2);

                var s1 = $(this).children('option:selected').attr("data-evalinfo");
                $("#txtEvalInfo").val(s1);
                KindEditor.html('#txtEvalInfo', s1);
            });

            $("#drpEvalID").change();
        });

        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 opJsTreeUserD(txt, txtValue) {
            var para = "/admin/basic/usertreeselect.aspx?para=1&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 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;
        }

 
        var iMax = <%=sMax %>;
        var iMin = <%=sMin %>;

        function judge(dcom,svalue)
        {
            var iMax1 = Math.abs(iMax);
            var iValue = Math.abs(svalue);

            //正数
            if (iMax1 == iMax) {
                if (svalue < iMin || iValue > iMax1) {
                    dcom.value = iMax;
                    art.dialog.alert('请注意，评分值的合理区间在['+iMin+']到[' + iMax + ']之间，超过合理值不能提交；');
                }
            } else {
                if (iValue > iMin || iValue > iMax1) {
                    dcom.value = iMax;
                    art.dialog.alert('请注意，评分值的合理区间在['+iMin+']到[' + iMax + ']之间，超过合理值不能提交；');
                }
            }

            
            //
        }
    </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">
                <uc1:workinfo runat="server" ID="workinfo" EnableViewState="true" />


                <div class="divInfo">
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="Table1">
                        <tr class="tablisttr">
                            <td colspan="2" class="tablisttitle">完成评分                 </td>
                        </tr>

                        <tr class="tablisttr">
                            <td class="tablisttitle">评分列表</td>
                            <td class="tabmanagertr">

                                <asp:Repeater runat="server" ID="rptInfo2">
                                    <HeaderTemplate>
                                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="rptInfo2">
                                    </HeaderTemplate>
                                    <ItemTemplate>

                                        <tr class="tablisttr">
                                            <td nowrap="nowrap" align="left" valign="top" class="tabmanagertr">
                                                <span class="fontred" style="width: 60px; display: inline-block; text-align: right;"><%#Eval("UserName")%></span>：
                                                  <span class="nodisplay">评分等级：<asp:DropDownList ID="drpTaskScoreGrade" runat="server" Width="100px">
                                                  </asp:DropDownList></span>
                                                评分值：<span class="fStar">*</span>
                                                <asp:TextBox ID="txtScore" runat="server" Width="60px" Text='<%#Eval("Score")%>' onkeyup="value=value.replace(/[^\- \d.]/g,'')"
                                                    onblur="judge(this,value)"
                                                    MaxLength="4"></asp:TextBox>

                                                评分操作：<asp:DropDownList ID="drpWSType" runat="server" Width="100px">
                                                </asp:DropDownList>
                                                请在下面的文本框里面录入事件确认信息：
                                                <div>
                                                    
                                                <asp:TextBox ID="txtSInfo" runat="server" Width="99%" Text='<%#Eval("SInfo")%>' MaxLength="500" TextMode="MultiLine"  Rows="4"
                                                    placeholder="您对本次评分的说明，可以选择撤销后提交！"></asp:TextBox>
                                                </div>
                                                <div style="display: none;">
                                                    <asp:TextBox ID="txtNID" runat="server" Text='<%#Eval("NID")%>' ToolTip='<%#Eval("NID")%>' Width="100px"></asp:TextBox>
                                                    <asp:TextBox ID="txtUserID" runat="server" Text='<%#Eval("UserID")%>' ToolTip='<%#Eval("TaskScoreGrade")%>' Width="100px"></asp:TextBox>
                                                    <asp:TextBox ID="txtDeptID" runat="server" Text='<%#Eval("DeptID")%>' ToolTip='<%#Eval("WSType")%>'></asp:TextBox>
                                                </div>


                                            </td>
                                        </tr>

                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </table>
                                    </FooterTemplate>
                                </asp:Repeater>

                            </td>

                        </tr>


                        <tr class="tablisttr">
                            <td class="tablisttitle">评分说</td>
                            <td class="tabmanagertr fColorRed">请注意，评分值的合理区间在[<%=sMin %>]到[<%=sMax %>]之间，超过合理值不能提交；
                            </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>
        </div>

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