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


<%@ 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" /> <%=ImportScriptStr %>
    <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 aSum = $("#divsum").html();
                var bSum = $("#divsumt").html();
                return window.confirm("您确实要修改对自己的评价数据吗？\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" class="tablisttitle">文件上传</td>
                                    <td align="left" width="40%">

                                        <asp:TextBox ID="txtEAddr" runat="server" Width="200px"></asp:TextBox>

                                        <a href="#" onclick="SkyOpen('txtEAddr');">[选择]</a><a href="#" onclick="SkyView('txtEAddr');">[查看]</a><a href="#" onclick="SkyDelete('txtEAddr');">[清空]</a>
                                    </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="txtEInfo" runat="server" TextMode="MultiLine" Width="100%" Height="80px"></asp:TextBox>
                                    </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>考核内容
                                    </td>


                                    <td>评分标准
                                    </td>

                                    <%--  <td>
                                计划分值
                            </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 runat="server" id="BigIDName">
                                    <%#Eval("BigIDName")%>
                                </td>
                                <td runat="server" id="SmallIDName">
                                    <%#Eval("SmallIDName")%>
                                </td>
                                

                                <td class="careffevalname">
                                    <%#UsToolsStringLengthTitle(Eval("EvalName").ToString(), KPIShowNameLength)%>
                                    <input type="hidden" id='txtName' runat="server" value='<%#Eval("EvalName")%>' />
                                </td>

                                <td class="careffevalinfo">
                                    <%#KPIShow2015KPXZ(Eval("EvalID").ToString(), Eval("EvalInfo").ToString())%>
                                </td>

                                <%-- <td>
                            <%#KPISelfType(Eval("EIType"), Eval("EIMax"))%>
                        </td>
                       
                        <td>
                            <%#KPISelfTypeValue(Eval("EIType"), Eval("ID1"), Eval("Evalue1"))%>                       
                        </td>--%>


                                <td>
                                    <%#Eval("EMaxValue")%>
                         
                                </td>
                               
                                <td>


                                    <%#KPIShowDetail2014Update((System.Data.DataRowView)Container.DataItem,"Z") %>
                                </td>
                              
                                <td>
                                    <asp:TextBox runat="server" ID="txtItemNote" CssClass="pjSelfTextBox" 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>
                                
                            </td>
                            <td>
                               
                            </td>--%>
                                <td>
                                    <% =siEMaxValue.ToString()%>
                                </td>

                               
                                <td>
                                    <div id="divsum">0</div>
                                </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>
