var jsonFormatDesign={code:"I_BIBEXPORTDATA"+vBibType,title:"馆藏输出格式设计",gridtitle:"设置要输出的馆藏字段",othertitle:"缺省值填值提示",perviewtitle:"馆藏数据预览列表",width:"800",height:"600",top:80,left:180};var fieldComBoxData=[{code:"libcode",name:"所属馆代码",param:[{key:"libcode",condition:"code",value:vLibcode}]},{code:"curlibcode",name:"当前所在馆代码",param:[{key:"libcode",condition:"code",value:vLibcode}]},{code:"barcode",name:"条码号"},{code:"status",name:"馆藏状态",param:[{code:"status",key:"hldstatus"}]},{code:"callno",name:"索书号"},{code:"location",name:"所属馆藏地点",param:[{key:"location",condition:"libcode",value:vLibcode}]},{code:"curlocation",name:"当前馆藏地点",param:[{key:"location",condition:"libcode",value:vLibcode}]},{code:"doctype",name:"文献类型",param:[{key:"doctype",condition:"libcode",value:vLibcode}]},{code:"senddate",name:"入档日期"},{code:"bindtype",name:"装帧标识",param:[{key:"bindtype"}]},{code:"docsources",name:"文献来源",param:[{key:"docsources"}]},{code:"mediatype",name:"载体类型",param:[{key:"mediatype"}]},{code:"price",name:"流通单价"},{code:"totalprice",name:"流通套价"},{code:"volumenum",name:"卷数"},{code:"volumeinfo",name:"卷册说明"}];var indexComBoxData=[];var jsonGridColumns=[{field:"field",title:"字段名称",width:"25%",formatter:onShowJosnComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",required:true,data:fieldComBoxData,onChange:function(b,a){if(b!=undefined&&b!=a){setOtherFormatDesignBox(b)}}}}},{field:"code",title:"字段代码",width:"25%",editor:{type:"text"}},{field:"defvalue",title:"缺省值",width:"25%",editor:{type:"text",options:{}}},{field:"flag",title:"标识",hidden:true,editor:{type:"textbox"}},{field:"map",title:"字段转换",width:"25%"}];var curPerviewIndex=1;var maxPerviewNum=undefined;$(function(){initBibImportDataPageElement();perviewShowData(true)});function perviewShowData(a){$("#bntPerviewNextRecord").linkbutton({disabled:a});$("#bntPerviewPrevRecord").linkbutton({disabled:a})}function initBibImportDataPageElement(){var b={key:"sysid",condition:"type",value:vBibType};initPageDataSingleElement("sysid",b,null);var a={key:"bibindex"};initPageDataSingleElement("bibindex",a,null);setCurImportDataGridHeight(190)}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".import-data-div").css("height",c+"px");$("#tabsGrid").tabs("resize")}function onPerviewData(c){curPerviewIndex=1;maxPerviewNum=undefined;$("#showPerviewOrgMarcData").html("");$("#showPerviewTagMarcData").html("");var a=getJsonData(null,"record");if(c){curPerviewIndex=c}else{curPerviewIndex=1}if(getValue("export_beg_keyword").length==0&&getValue("export_end_keyword").length==0){return openMessageDlg("起始键值和终止键值不能全部为空!")}getLimitCondition(a);a.index=curPerviewIndex;a.keycode=getValue("acceptFormatDesignIndex");var b=base_path+"lib/export/perviewMarc.do";$.post(b,a,function(d){if(d.status=="0"){if(d.total>0){perviewShowData(false);setDataToPageShowPerview(d)}else{openMessageDlg("未找到符合条件的数据")}}else{openMessageDlg(d.message)}},"json")}function onPerviewNextData(){if(maxPerviewNum){return openMessageDlg("已经是最后一条记录了")}if(curPerviewIndex<500){onPerviewData(curPerviewIndex+1)}else{openMessageDlg("只能预览前500条")}}function onPerviewPrevData(){if(curPerviewIndex>1){onPerviewData(curPerviewIndex-1);maxPerviewNum=undefined}else{openMessageDlg("已经是第一条了")}}function getLimitCondition(a){if(getValue("export_beg_keyword").length>0){a["limit[0].condition"]=getValue("bibindex");a["limit[0].typeHandler"]="7";a["limit[0].value"]=getValue("export_beg_keyword")}if(getValue("export_end_keyword").length>0){a["limit[1].condition"]=getValue("bibindex");a["limit[1].typeHandler"]="5";a["limit[1].value"]=getValue("export_end_keyword")}a["limit[2].condition"]="sysid";a["limit[2].typeHandler"]="0";a["limit[2].value"]=getValue("sysid");return a}function onExportFiel(){var a=getJsonData(null,"record");if(getValue("export_beg_keyword").length==0&&getValue("export_end_keyword").length==0){return openMessageDlg("起始键值和终止键值不能全部为空!")}getLimitCondition(a);a.keycode=getValue("acceptFormatDesignIndex");var b=base_path+"lib/export/exportMarc.do?charset="+a.charset+"&delfield="+a.delfield+"";openPostWindowDownLoad(b,a)}function setDataToPageShowPerview(e){var f=e.rows[0];if(f){perviewShowData(false);var d=f.orgmarc.split(/[\n\r]/g);var c="