{% extends "data_list.html" %} {% load i18n %} {% block content %}
{% endblock %} {% block getdatalist %} {% endblock %} {% block op_for_tab %} {% endblock %} {% block export %} {% endblock %} {% block addjs %} var lClass; $(function(){ fun_attparam(); }); function fun_attparam(){ $("#id_newrec").remove(); $("#id_clearrec").remove(); $("#content").html(""); $.ajax({ type: "POST", url:"{{dbapp_url}}../att/AttParamSetting/", dataType:"json", success:function(json){ var arr=json lClass=arr.LeaveClass; chk_TwoDay=arr.TwoDay; chk_OTCheckRecType=arr.OTCheckRecType; chk_OutCheckRecType=arr.OutCheckRecType; chk_NoInAbsent=arr.NoInAbsent; chk_NoOutAbsent=arr.NoOutAbsent; chk_EarlyAbsent=arr.EarlyAbsent; chk_LateAbsent=arr.LateAbsent; chk_OutOverTime=arr.OutOverTime; $("#content").html("" +"" ); //$("#content").css("padding-left",100) $("#id_Out"+chk_OutCheckRecType).click(); $("#id_OT"+chk_OTCheckRecType).click(); $("#id_TwoDay"+chk_TwoDay).click(); if(chk_EarlyAbsent==1){ $("#id_EarlyAbsent").attr("checked","checked"); } if(chk_LateAbsent==1) { $("#id_LateAbsent").attr("checked","checked"); } if(chk_OutOverTime==1) { $("#id_OutOverTime").attr("checked","checked"); } if(chk_NoInAbsent>0) { $("#id_NoInAbsent").attr("checked","checked"); $("#id_type_in").val(chk_NoInAbsent); if(chk_NoInAbsent==1) $("#is_show_in").css("display","inline"); } if(chk_NoOutAbsent>0) { $("#id_NoOutAbsent").attr("checked","checked"); $("#id_type_Out").val(chk_NoOutAbsent); if(chk_NoOutAbsent==1) $("#is_show_out").css("display","inline"); } $("#id_NoInAbsent").click(function(){ if(!$("#id_NoInAbsent").attr("checked")) { $("#id_type_in").val(0); $("#is_show_in").css("display","none"); } }); $("#id_NoOutAbsent").click(function(){ if(!$("#id_NoOutAbsent").attr("checked")) { $("#id_type_Out").val(0); $("#is_show_out").css("display","none"); } }); $("#id_items").click(function(){//计算项 item_id=$("#id_items").val(); lClass=getChange_lClass(lClass); $("#id_LeaveClass").val(get_lClass_String(lClass)); $("#hidden_LeaveId").val(item_id); $("#id_validate_Min").css("display","none"); for(i=0;i