var jsonFormatDesign={code:"I_CIRDATABACTH",title:"流通数据批处理",gridtitle:"流通数据批处理",othertitle:"缺省值填值提示",perviewtitle:"流通数据预览列表",width:"800",height:"600",top:80,left:180};var jsonGridColumns=[];var cirfilename;$(function(){$("#opertype").combobox({onChange:function(b,a){if(b=="0"){$(".rdrno-div").show()}else{$(".rdrno-div").hide()}}});setCurImportDataGridHeight(80)});function setCurImportDataGridHeight(a){}function onStartAcceptData(b){$(".error-msg-result").html("");var a=base_path+"com/webuploader/insertCirDataBatch.do";var c={};$.messager.progress({title:"接收流通数据",msg:"正在处理数据,请稍等..."});if(cirfilename){c.filename=cirfilename;if(b){c.rdrno=b}$.post(a,c,function(d){$.messager.progress("close");if(d.status=="0"){var e=d.rows[0];if(e){errorfile=e.errorfile;$(".handlecount").html("已处理["+e.handlecount+"]条数据");$(".successcount").html("成功["+e.successcount+"]条");$(".errorcount").html("失败["+e.errorcount+"]条");if(errorcount>0){$("#checkerrorfile").show()}else{$("#checkerrorfile").hide()}$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}else{openMessageDlg(d.message)}},"json").error(function(){$(".error-msg-result").html("处理数据中途错误,请查看错误文件!");$(".handlecount").html("已处理["+handlecount+"]条数据");$(".successcount").html("成功["+successcount+"]条");$(".errorcount").html("失败["+errorcount+"]条");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open");$.messager.progress("close")})}}function onAcceptData(){var c=getValue("opertype");if(c=="0"){var b=base_path+"cir/reader/getFirstReader.do";var d={};var a=getValue("rdrno");if(a.length==0){return openMessageDlg("读者证号不能为空!")}d.rdrno=a;$.post(b,d,function(e){if(e.status=="0"){onStartAcceptData(a)}else{openMessageDlg(e.message)}},"json")}else{onStartAcceptData(a)}}function onResetAcceptFormatDesignPage(){$(".acceptTextTip").html("请选择接收流通借还数据,只能接收txt文本")}function uploadSuccessHandler(a,b){if(b.status==0){cirfilename=b.rows[0]}else{openMessageDlg(b.message)}};