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


<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <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" />
    <script src="../js/jquery/jquery.js" type="text/javascript"></script>
     <%=ImportScriptStr %>
    <script language="javascript" src="/admin/js/System.js" type="text/javascript"></script>
    <script language="javascript" src="/admin/My97DatePicker/WdatePicker.js" type="text/jscript"></script>
    <script  language="javascript" src="/editor/xheditor.js" type="text/javascript" ></script>
    <script type="text/javascript" src="/editor/xheditor_lang/zh-cn.js"></script>

    
    
    
    <script language="javascript" type="text/javascript" >
        $(document).ready(function () {
            $("[name^='Careff_']").click(function () {
                //alert($(this).attr("id"));
                getAllDateCount();
            });
            $("[name^='Careff_']").blur(function () {
                //alert($(this).attr("id"));
                getAllDateCount();
            });
            getAllDateCount();
            $("#btnSearch").click(function () {
                var UserID = $("#userid a").html();
                var aSum = $("#divsum").html();
                var bSum = $("#divsumt").html();
                return window.confirm("您确实要提交对[" + UserID + "]的评价数据吗？\n当前您的评价总分为[" + aSum + "]分！");
            });
        });

        function getAllDateCount() {
            var Ctype = "";
            var aSum = 0;
            var bSum = 0;
            var aOne = 0;
            var bOne = 0;
            $("[name^='Careff_']").each(function (index, domEle) {
                Ctype = $(domEle).attr("type");
                //alert(Ctype + " " + $(domEle).attr("id")+" " + $(domEle).val());
                if (Ctype == "radio") {
                    var b = $(domEle).is(':checked');
                    if (b) {
                        aOne = toFloat($(domEle).val());
                        aSum = aSum + aOne;

                        var eID = ($(domEle).attr("name"));
                        eID = eID.replace("Careff_", "");

                        var sEPower, sETValue;
                        sEPower = $("#EPower_" + eID).html();
                        bOne = (toFloat(sEPower) * aOne / 100);
                        bSum = bSum + bOne;
                        $("#ETValue_" + eID).html(bOne.toFixed(2));
                    }
                }
                else {
                    aOne = toFloat($(domEle).val());
                    if (aOne == 0) {
                        $(domEle).val(0);
                    }

                    aSum = aSum + aOne;
                    //判断超过了最大值吗
                    if ("text" == Ctype) {


                        if ($(domEle).attr("emaxvalue") == undefined) {
                            return true;
                        }

                        var emaxvalue = toFloat($(domEle).attr("emaxvalue"));
                        var eminvalue = toFloat($(domEle).attr("eminvalue"));

                        //var aOneMax = toFloat($(domEle).attr("title"));

                        if (emaxvalue < aOne) {
                            aOne = emaxvalue
                            $(domEle).val(aOne);
                            alert("本项最大可输入数为[" + emaxvalue + "]");
                        }

                        if (eminvalue > aOne) {
                            aOne = eminvalue
                            $(domEle).val(aOne);
                            alert("本项最小可输入数为[" + eminvalue + "]");
                        }
                    }
                    var eID = ($(domEle).attr("name"));
                    eID = eID.replace("Careff_", "");

                    var sEPower, sETValue;
                    sEPower = $("#EPower_" + eID).html();
                    bOne = (toFloat(sEPower) * aOne / 100);
                    bSum = bSum + bOne;
                    $("#ETValue_" + eID).html(bOne.toFixed(2));

                    //alert("sEPower=" + sEPower);
                    //aOne

                }
            });
            //alert(aSum);
            $("#divsum").html(aSum.toFixed(2));
            $("#divsumt").html(bSum.toFixed(2));
        }
        function toFloat(src) {
            var ret = parseFloat(src);
            if (isNaN(ret)) {
                return 0;
            }
            return ret;
        }
    </script>
</head>
<body onload="win_onLoad();">
    <form id="Form1" method="post" 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="divSearchBoth">
        <div class="divInfo">
            <div class="divInfoblack">
                <div class="divInfoTopList">
                    <div class="listLeft">
                        <div class="navsearchtitle">
                            部门评价详细说明</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="divInfo">
            <div class="divSearch1">
                <div id="searchBox1" class="clearsearch1">
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onMouseOver="changeto()"  onmouseout="changeback()">
    <tr class="tablisttr">
      <td align="center" width="100" class="tablisttitle"> 当前评估</td>
       <td align="center" width="40%" class="tablisttr" id="userid">[<%=sCurrentUserName.ToString()%>]</td>
      <td align="center" width="100" class="tablisttitle">评估时间</td>
      <td align="center" class="tablisttr"><%=UsToolsDateFormat(sNextDate)%></td>
    </tr>
    <tr class="tablisttr">
      <td align="center" class="tablisttitle"> 文件上传</td>
      <td align="center" class="tablisttr">暂未上传</td>
      <td align="center" class="tablisttitle">修改评估</td>
      <td align="center" class="tablisttr"> <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="修改评估" CssClass="SkyButtonFocus" /></td>
    </tr>
    <tr class="tablisttr">
      <td align="center" class="tablisttitle"> 评价留言</td>
      <td colspan="3" align="center">
          <asp:TextBox ID="txtInfo" runat="server" TextMode="MultiLine" Width="100%"  Height="80px"></asp:TextBox>
        </td>
    </tr>
    <tr class="tablisttr">
      <td align="center" class="tablisttitle"> 考评提示</td>
      <td colspan="3" align="center"><%=sUserPJInfo%></td>
    </tr>
  </table>
                   
              </div>
            </div>
        </div>
    </div>
    <div class="divInfo">
        <div class="divInfoblack">
            <div class="divInfoTopList">
                <div class="listLeft">
                    <div class="navtitle">
                        部门评价指标体系</div>
                </div>
                <div class="listRight">
                    <ul>
                        <li class="navstyle1">
                            <input type="checkbox" name="chkselect" id="chkselect" onclick="skySelectCheckList();"/>
                            <label for="chkselect">全选</label> </li>
                        <li class="navstyle2">
                            <asp:LinkButton ID="LnkBAdd" runat="server" OnClick="SkyLnkBAMD_Click"  Enabled="false">添加</asp:LinkButton>
                        </li>
                        <li class="navstyle3">
                            <asp:LinkButton ID="LnkBEdit" runat="server" OnClick="SkyLnkBAMD_Click"   Enabled="false">编辑</asp:LinkButton>
                        </li>
                        <li class="navstyle4">
                            <asp:LinkButton ID="LnkBDelete" runat="server" OnClick="SkyLnkBAMD_Click"  Enabled="false">删除</asp:LinkButton>
                        </li>
                        <li class="navstyle5">
                            <asp:LinkButton ID="LnkBExcel" runat="server" OnClick="SkyLnkBAMD_Click"  >导出</asp:LinkButton>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="divInfo">
        <div class="divInfoContext">
            <asp:Repeater runat="server" ID="rptInfo">
                <HeaderTemplate>
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onmouseover="changeto()"  onmouseout="changeback()">
                        <tr class="tablisttitle">
                           <td width="4%">
                                序号
                            </td>
                            
                            <td>
                                指标大类
                            </td>
                            <td>
                                指标小类
                            </td>
                           
                            <td  class="careffkptitle">
                                考核内容
                            </td>
                            
                            
                             <td>
                                评分标准
                            </td>
                       
                            <td>
                                权重
                            </td>
                            
                            <td>
                                考评结果
                            </td>
                           
                            
                            <td>
                                备注说明
                            </td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tablisttr">
                        <td>
                           
                            <asp:Literal runat="server" ID="LiteralID" Text=' <%#Eval("ID1") %>'></asp:Literal>
                            <input type="hidden" id='txtIDType' runat="server" value='<%#Eval("IsDel")%>' />
                        </td>
                       
                         <td>
                            <%#Eval("BigIDName")%>
                        </td>
                        <td>
                            <%#Eval("SmallIDName")%>
                        </td>
                       
                       <td>
                            <%#UsToolsStringLengthTitle(Eval("EvalName").ToString(), KPIShowNameLength)%>
                            <input type="hidden" id='txtName' runat="server" value='<%#Eval("EvalName")%>' />
                        </td>
                       
                        <td>
                            <%#KPIShow2015KPXZ(Eval("EvalID").ToString(), Eval("EvalInfo").ToString())%>
                        </td>
                        
                        <td>
                            <%#Eval("EMaxValue")%>
                        </td>
                      
                        <td>
                           


                             <%#KPIShowDetail2014Update((System.Data.DataRowView)Container.DataItem,"B") %>
                        </td>
                       
                        <td>
                            <asp:TextBox runat="server" ID="txtItemNote" TextMode="MultiLine" Text='<%#Eval("EInfo1")%>' onkeyup="this.value = this.value.substring(0, 2000)" 
                            title="系统最多支持2000字符,超出将自动截断,因为有限制,在字符超过指定数量的时候,您将无法使用ctrl+a进行全选,这个时候,您可以使用点击ctrl键+鼠标左键文本框或者双击即可全选"></asp:TextBox>
                            
                           
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                 <tr class="tablisttitle">
                           <td width="4%">
                                
                            </td>
                            
                            <td>
                            </td>
                            <td>
                                
                            </td>
                           
                            <td>
                                
                            </td>
                            
                            
                             <td>
                                
                            </td>
                       
                            <td>
                                <% =siEMaxValue.ToString()%>
                            </td>
                     
                                
                            <td>
                                <div id="divsum">0</div>
                            </td>
                    
                            </td>
                            
                            <td>
                                
                            </td>
                        </tr>
                    </table></FooterTemplate>
            </asp:Repeater>
        </div>
    </div>
    <div class="divInfo">
        <webdiyer:aspnetpager id="Pager" runat="server" AlwaysShow="True" OnPageChanged="Pager_PageChanged"
         ShowCustomInfoSection="Left" ShowPageIndexBox="Always" showpageindex="False"
               CustomInfoHTML="共 <B>%PageCount%</B> 页，当前为第 <B>%CurrentPageIndex%</B> 页，每页 <B>%PageSize%</B> 条" 
               SubmitButtonText="" FirstPageText="首页" LastPageText="尾页" 
               LayoutType="Table" NextPageText="后一页" PrevPageText="前一页" ShowMoreButtons="False" 
               TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" 
               CustomInfoTextAlign="Left" HorizontalAlign="Right"></webdiyer:aspnetpager>
    </div>
    </div>
    </form>
</body>
</html>