$(function(){datagrid_selector.datagrid({rowStyler:rowStylerLibcode,onSelect:onSelect,loadFilter:function(d){var c=d.rows;var b=[];for(var a=0;a1&&c[a].parentcode.split("|")[0]==d.code){b.push({id:c[a].code,text:c[a].name,iconCls:"e-icon fa fa-university",children:getLibChildrenData(c[a],c)})}}return b}function loadGridDataSuccess(d){var b=datagrid_selector.datagrid("options");var c="list.do";if(b.pagination){c="page.do"}var a=controller_url+c+datagrid_param;var e=datagrid_param_limit;$.post(a,e,function(k){var j=k.rows;var l=[];var h=1;var f=undefined;for(var g=0;g0){d=d-40}$(".datagrid-div").css("height",d+"px");$(".easyui-layout").layout("resize");$(".easyui-panel").panel("resize")}function updateRecord(e,c){var b;if(!c){c=getRow()}if(isLowerlibcode(c.code)){$("#saveRecord").linkbutton({disabled:true})}else{$("#saveRecord").linkbutton({disabled:false})}operation="update.do";b=getPK(c);if(!b){return}openWin();var a=controller_url+"get.do";var d={pk:b};$.post(a,d,function(g){var f=g.rows[0];setJsonData(null,f);setCodeDisabled()},"json")}function deleteRecord(){var b=getRow();if(isLowerlibcode(b.code)){return openMessageDlg("不能删除非本馆或者子馆的数据!")}var a=getRowPK();if(!a){return}openConfirmDlg("是否确认删除?",null,deleteRecordOk,null)}function rowStylerLibcode(a,b){if(isLowerlibcode(b.code)){return"background-color:#aaa;"}}function initSysLibraryParamEnum(){var b=[];var a=base_path+"par/common/getInitData.do";var c={};c.key="syslibraryparam";c.fmt="entity";$.post(a,c,function(h){var g=h.rows;var e="";var f=0;for(var d=0;d-1){b.push(g[d]);continue}if(f++%2==0){e+="";e+=getRetrunTd(g[d].code,g[d].otherinfo,g[d].name)}else{e+=getRetrunTd(g[d].code,g[d].otherinfo,g[d].name);e+="";if(f%2==1){e+=""}}}$(".initSysLibraryParamEnum").html(e);$.parser.parse(".initSysLibraryParamEnum");g=b;e="";f=0;for(var d=0;d-1){continue}if(f++%2==0){e+="";e+=getRetrunTd(g[d].code,g[d].otherinfo,g[d].name)}else{e+=getRetrunTd(g[d].code,g[d].otherinfo,g[d].name);e+="";if(f%2==1){e+=""}}}$(".waicaiLibraryParamEnum").html(e);$.parser.parse(".waicaiLibraryParamEnum");getZdxd();getEnumByType("suo_shu_hao_fang_shi","callnotype");getEnumByType("ban_zheng_mi_ma","rdrdefpwd");$("#ban_zheng_mi_ma").combobox({onSelect:function(i){if(i){showTextByCondtion(i.code)}else{showTextByCondtion("0")}}});$("#suo_shu_hao_fang_shi").combobox({onSelect:function(i){if(i){showTextBySJM(i.code)}else{showTextBySJM("0")}}});repeatBindClickFun()},"json")}function getZdxd(){var a=base_path+"acq/collectcata/list.do";var b={};b["limit[0].condition"]="status";b["limit[0].value"]="1";$("#wc_zdxd").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}function getRetrunTd(c,b,a){var e="";var d="width:200px;height: 28px;";if(b=="checkbox"){e+=""+a+"";e+=''}else{if("zi_ding_yi_mi_ma"==c){e+=''+a+"";e+=''+getTextClassByType(c,b,d)+""}else{if("sjm_qzfs"==c){e+=''+a+"";e+=''+getTextClassByType(c,b,d)+""}else{e+=""+a+"";e+=""+getTextClassByType(c,b,d)+""}}}return e}function getTextClassByType(c,a,e){var d="";if(a=="easyui-combobox"){if(c=="suo_shu_hao_fang_shi"){d+='"}if(c=="ban_zheng_pan_duan_sfz"){d+='"}if(c=="ban_zheng_mi_ma"){d+='"}}else{if(a.indexOf("|")>-1){var b=a.split("|");d=''}else{d=''}}return d}function getEnumByType(d,c){var b="";var a=base_path+"par/common/getInitData.do";var e={};e.key=c;$.post(a,e,function(g){var f=g.rows;$("#"+d).combobox({data:g.rows,valueField:"code",textField:"name"})},"json");return b}function showTextByCondtion(a){if(a=="9"){$(".zi-ding-yi-mi-ma").show()}else{$(".zi-ding-yi-mi-ma").hide()}}function showTextBySJM(a){if(a=="3"){$(".sjm_qzfs").show()}else{$(".sjm_qzfs").hide()}}function closeWin(c){if(c){var b=c.rows[0];var a=mystorage.get("lowerlibcode");if(a.indexOf(b.code)<0){mystorage.set("lowerlibcode",a+","+b.code+",")}}$("#win").window("close");reLoadParaInit()}function deleteRecordOk(){var b=getRowPK();var a=controller_url+"delete.do";var c={pk:b};$.post(a,c,function(d){openMessageDlg(d.message);if(d.status=="0"){reLoadParaInit();loadGridData()}},"json")}function reLoadParaInit(){var a=getInitJsonArray(getInitCodeArray("record"));commonSetParaInit(null,"record",null,a)}function fmtLibraryTS(b,c){var a=JSON.parse(c.paramjson);if(a.shang_jia_tian_shu){return a.shang_jia_tian_shu}return""}function fmtLibraryLT(b,c){var a=JSON.parse(c.paramjson);if(a.yan_shou_liu_tong){return getCheckName(a.yan_shou_liu_tong)}return""};