function value_function(i,obj){ var str = ''; if(i.delete_flag == 0){ str = " "; }else{ str = " " } return " "+ " "+ " "+ str; } function sunccessReturn(){ closeAll(); $("#init-table").tableAdaptor(); } function beforeFunc(){ $("#sub-name,#sub-category").val(""); } function deleteInfo(obj){ lcomfirm('是否确定删除该字典?',function(){ var id = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].id; commonAjax("DELETE",localUrl+"/dictionary?id="+id, "",function(){ tip("删除成功"); setTimeout(function(){ closeAll(); $("#init-table").tableAdaptor(); },1000) }); }); } function hideInfo(obj){ lcomfirm('是否确定隐藏该字典?',function(){ var id = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].id; commonAjax("PUT",localUrl+"/dictionary", {id:id,delete_flag:1},function(){ setTimeout(function(){ closeAll(); $("#init-table").tableAdaptor(); },1000) }); }); } function showInfo(obj){ lcomfirm('是否确定显示该字典?',function(){ var id = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].id; commonAjax("PUT",localUrl+"/dictionary", {id:id,delete_flag:0},function(){ setTimeout(function(){ closeAll(); $("#init-table").tableAdaptor(); },1000) }); }); } /** * 修改 * @returns */ function operate_modify(obj){ debugger var id = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].code; var config = { 'url':"/dictionary?id="+id } detail_get_restall("#table-detail-info",config); openWindow("修改数据字典","#table-detail-info","250px"); $("#table-detail-info input,#table-detail-info select").val(""); } /** * 查看子菜单 */ var conditin =[]; var param = {}; function operate_search(obj){ var code = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].code; if(code != null){ if($("#return_back_div").is(":hidden")){ $("#return_back_div").show(); } var condition_data = {}; condition_data.page = $("#kkpager .curr").html(); condition_data.data = param; condition_data.name =$("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].name; condition_data.code = $("#father-dictionary").attr("code"); condition_data.p_code = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].code; condition_data.p_dictionary_name = $("#init-table").data("cache")[$(obj).parent().parent().attr("tag")].dictionary_name; conditin.push(condition_data); // 显示名字 var show_name = ""; for(var i=0;i