Edit D:\rfid\libsystem\page\periodical\js\per_check.js
var initJson;var checkdetailId;var checkdetailIdx;var checkdetailData;var eidtorAutoBindGridObject=undefined;var eidtorAutoBindGridIndex=undefined;$(function(){initJson=[{code:"page_sysid",key:"sysid",condition:"type",value:vType,linkage:[{code:"page_template",key:"template",condition:"sysid"}]},{code:"page_ctrlno",key:"ctrlno",condition:"libcode",value:vLibcode},{code:"page_z3950",key:"z3950",condition:"libcode",value:vLibcode},{code:"page_editmodel",key:"editmodel"},{code:"page_finsources",key:"finsources"},{code:"page_mediatype",key:"mediatype"},{code:"page_binding",key:"binding"},{code:"page_docsources",key:"docsources"},{code:"page_ncy",key:"ncy"},{code:"page_bookseller",key:"bookseller",condition:"libcode",value:vLibcode},{code:"page_location",key:"location",condition:"libcode",value:vLibcode},{code:"page_doctype",key:"doctype",condition:"libcode",value:vLibcode},{code:"page_pertype",key:"pertype"},{code:"acqstatus",key:"acqstatus"},{code:"operid",key:"operid"},{code:"libcodeSelect",key:"libcode",condition:"code",value:vLibcode},{code:"frequency",key:"frequency",fmt:"entity"},{code:"ordertype",key:"perordertype"},{code:"status",key:"percheckstatus"}];$("#acqDataGridList").datagrid("showColumn","status");$(".print-content-list").show();_comGridObj.prototype.events()});var _comGridObj=function(){};_comGridObj.prototype.clear=function(){$(".checkdetail-boxs").html("");clearGridData("editBibGrid,acqDataGridList,orderDataGridList,bindDataGridList,checkDataGridList,holdDataGridList");$("#tabsGrid").tabs("select",0)};_comGridObj.prototype.events=function(){$("#acqDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode,onSelect:_acqGridObj.prototype.select});$("#tabsRightGrid").tabs({onSelect:_tabsGridObj.prototype.select});$("#holdDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode});$("#editBibGrid").datagrid({border:false,title:""});$("#checkDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode,onDblClickRow:_checkPerGridObj.prototype.update,onSelect:_checkPerGridObj.prototype.select});$("#orderDataGridList").datagrid({border:false});$("#bindDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode,onSelect:_perBindGridObj.prototype.select,onDblClickRow:_perBindGridObj.prototype.update});$(".easyui-panel").panel("resize")};var _acqGridObj=function(){};_acqGridObj.prototype.select=function(a,b){$(".checkdetail-boxs").html("");if(!isUpdateByLibcode(b.libcode)){_linkbuttonObj.prototype.status(true)}else{_linkbuttonObj.prototype.status(false)}_comGridObj.prototype.loadData(b.id,"order",1);_comGridObj.prototype.loadData(b.id,"check",1);_comGridObj.prototype.loadData(b.id,"bind",1);_comGridObj.prototype.loadData(b.id,"hold");_detailData.prototype.set(b.id)};var _tabsGridObj=function(){};_tabsGridObj.prototype.select=function(b,a){if(a==2){$("#deleteBindPer").show()}else{$("#deleteBindPer").hide()}};var _checkPerGridObj=function(){};_checkPerGridObj.prototype.add=function(c){var b=0;var e=0;var a="????????";if(!c){if(getValue("page_orderyear").length==0){return openMessageDlg("???????????,????????????????????")}var d=$("#acqDataGridList").datagrid("getSelected");if(!d){return openMessageDlg("????????????????,??????")}b=d.id}else{a="????????";b=c.bibid;e=c.id}if($(".percheckFrame").html()==""){$(".percheckFrame").html('<iframe id="percheckFrame" name="percheckFrame" frameborder="0" src="../iframe/iframe_per_check.jsp?bibId='+b+"&id="+e+'" style="width:780px;height:580px;border-top:1px solid #D4D4D4;"></iframe>')}else{percheckFrame.percheckReLoadData(b,e)}$("#percheck_dlg").dialog("setTitle",a);$("#percheck_dlg").dialog("open")};_checkPerGridObj.prototype.select=function(a,b){$(".checkdetail-boxs").html("");_checkPerDetailObj.prototype.bindTable(b.id)};_checkPerGridObj.prototype.update=function(b,a){if(!b){a=$("#checkDataGridList").datagrid("getSelected")}if(isUpdateByLibcode(a.libcode)){_checkPerGridObj.prototype.add(a)}else{return openMessageDlg("??????????????")}};_checkPerGridObj.prototype.trash=function(){var a=$("#checkDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("?????????¤??????,??????")}openConfirmDlg("???????????????["+a.id+"]?????????????",null,_checkPerGridObj.prototype.trashResult,null)}else{return openMessageDlg("??????????????")}};_checkPerGridObj.prototype.trashResult=function(){var c=$("#checkDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"per/check/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);$(".checkdetail-boxs").html("");_comGridObj.prototype.loadData(c.bibid,"check",1)}else{openMessageDlg(d.message)}},"json")};function perCheckSaveResult(b,a){openMessageDlg(b.message,5000);_comGridObj.prototype.loadData(a,"check",1);$("#percheck_dlg").dialog("close");$("#tabsRightGrid").tabs("select",0)}var _checkPerDetailObj=function(){};function checkPerDetailSaveResult(b,a){openMessageDlg(b.message,5000);$(".checkdetail-boxs").html("");_checkPerDetailObj.prototype.bindTable(a);$("#percheckdetail_dlg").dialog("close");$("#tabsRightGrid").tabs("select",0);_checkPerDetailObj.prototype.openPrintDlg()}_checkPerDetailObj.prototype.openPrintDlg=function(){var a=getValue("page_booklablefmt");if(a){var b=mystorage.get("perCheckItemList");if(b){mystorage.set("perCheckBarcodeItemList",b);$("#printer-confirm-dlg").dialog("open");$(".printer-confirm-body").html("????????????????????????");$("#printerDataGridList").datagrid("loadData",b)}}};_checkPerDetailObj.prototype.bindTable=function(c){onHnadlerSvaeBntScreen(null,true);var a=base_path+"per/detailcheck/page.do";var b={};b.checkid=c;b.rows=1000;b.page=1;$.post(a,b,function(d){onHnadlerSvaeBntScreen(null,false);if(d.status=="0"){_checkPerDetailObj.prototype.checkDetailBoxs(d)}else{openMessageDlg(d.message)}},"json")};function getDays(f,c,h){var a=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var b=new Date(f,c-1,h);var g=b.getDate();var e=b.getMonth();var f=b.getFullYear();var j=0;for(var d=0;d<e;d++){j+=a[d]}j+=g;if(e>1&&(f%4==0&&f%100!=0)||f%400==0){j+=1}return j}function daysInMonth(b,a){return new Date(a,b,0).getDate()}_checkPerDetailObj.prototype.checkDetailBoxs=function(f){var h="";var p=f.rows;checkdetailData=p;if(f.rows.length==365||f.rows.length==366){var o=$("#checkDataGridList").datagrid("getSelected");var b=new Date();var l=b.getFullYear();var k=b.getMonth()+1;var a=b.getDate();if(o.year){l=o.year}var g="<table class='check-days-detail'>";g+="<thead><tr>";g+='<th style="max-width: 26px;min-width: 26px;width: 26px;"></th>';for(var e=1;e<=31;e++){g+='<th style="width: 3.2%;">'+e+"</th>"}g+="</tr></thead>";g+="<tbody>";for(var e=1;e<=12;e++){g+='<tr id="help-'+e+'" name="help-'+e+'">';g+="<td>"+e+"??</td>";var m=daysInMonth(e,l);for(var d=1;d<=m;d++){var n=(getDays(l,e,d)-1);var c=getDetailInfo(p,n,1);if(k==e&&a==d){c='<div class="cur-date-select">'+c+"<div>"}g+="<td>"+c+"</td>"}g+="</tr>"}g+="</tbody>";g+="</table>";$(".checkdetail-boxs").html(g);$("#appendPrevRecord").hide();$("#appendNextRecord").hide();$("#checkToComBineRecord").hide();bindEventFun();location.href="#help-"+k}else{for(var e=0;e<p.length;e++){h+=getDetailInfo(p,e)}$(".checkdetail-boxs").html(h);$("#appendPrevRecord").show();$("#appendNextRecord").show();$("#checkToComBineRecord").show();bindEventFun()}};function getDetailInfo(n,e,k){var m=[{code:"issue",name:"?????"},{code:"volume",name:"?????"},{code:"copies",name:"??????"},{code:"totalissue",name:"?????"},{code:"expectdate",name:"??????",title:"true"},{code:"actualdate",name:"??????",title:"true"},{code:"price",name:"???",title:"true"},{code:"note",name:"???",title:"true"}];var f="";var g="";var l="";for(var d=0;d<m.length;d++){var c=(n[e][m[d].code]!=null?n[e][m[d].code]:"");if(!m[d].title){g+='<div class="cell-row">'+m[d].name+":"+c+"</div>"}else{if(m[d].code=="expectdate"||m[d].code=="actualdate"){c=fmtStringToDate(c)}}l+=m[d].name+":"+c+"\n"}var b=getColorBysStatus(n[e].status);var a=n[e].id;var h="cur"+e;if(k){h+=" day-detail";g="";g+='<div class="cell-row">??:'+(n[e].issue!=null?n[e].issue:"");+"</div>";g+='<div class="cell-row">??:'+(n[e].issue!=null?n[e].copies:"");+"</div>"}f+='<div id="'+a+'" index="'+e+'" onclick="onClickCellCheckDetail(\''+a+"','"+e+"')\" onmouseout=\"onMouseOutCellCheckDetail('"+a+"')\" onmouseover=\"onMouseOverCellCheckDetail('"+a+'\')" class="cell-check-detail '+b+" "+h+'" ondblclick="onDbClickCellCheckDetail(\''+a+"','"+e+'\')" title="'+l+'">';f+="<div>"+g+"</div>";f+="</div>";return f}function getColorBysStatus(a){var c="";var d=[{code:"0",color:"cell-weidao"},{code:"1",color:"cell-zhengchang"},{code:"2",color:"cell-weidaoqi"},{code:"3",color:"cell-cuique"},{code:"4",color:"cell-zhuangding"},{code:"5",color:"cell-tingding"},{code:"6",color:"cell-yanqi"},{code:"9",color:"cell-qita"},];for(var b=0;b<d.length;b++){if(a==d[b].code){c=d[b].color;break}}return c}function onMouseOutCellCheckDetail(b){var a=$("#"+b);a.removeClass("cell-box-over")}function onMouseOverCellCheckDetail(b){var a=$("#"+b);a.addClass("cell-box-over")}function onClickCellCheckDetail(d,b,a){checkdetailId=d;checkdetailIdx=b;var c=$("#"+d);if(c.hasClass("cell-box-selected")){if(!a){c.removeClass("cell-box-selected")}}else{c.addClass("cell-box-selected");c.removeClass("cell-box-over")}}function onDbClickCellCheckDetail(c,a){var b=$("#checkDataGridList").datagrid("getSelected");if(isUpdateByLibcode(b.libcode)){if(vFlag==0){checkdetailId=c;checkdetailIdx=a;_checkDetailEvent.prototype.checkToMarkRecord()}}}function bindEventFun(){var a=$("#checkDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(vFlag==0){$(".cell-check-detail").bind("contextmenu",function(b){onClickCellCheckDetail(b.currentTarget.id,b.currentTarget.attributes.index.value,true);b.preventDefault();$("#checkDetailMenu").menu("show",{left:b.pageX,top:b.pageY})})}}}var _checkDetailEvent=function(){};_checkDetailEvent.prototype.openDlg=function(c,j){var d=0;var g=$(".cell-box-selected");g.each(function(l,m){d++});if(d>1){return openMessageDlg("????????????????,????????")}var h=c.bibid;var i="";var a=0;if(c.id){a=c.id}var e=c.checkid;var f=c.sortfld;if(c.flag){i=c.flag}var k=$("#checkDataGridList").datagrid("getSelected");var b=k.copies;if($(".percheckdetailFrame").html()==""){$(".percheckdetailFrame").html('<iframe id="percheckdetailFrame" name="percheckdetailFrame" frameborder="0" src="../iframe/iframe_per_checkdetail.jsp?checkId='+e+"&bibId="+h+"&id="+a+"&sortfld="+f+"&flag="+i+"&copies="+b+'" style="width:780px;height:620px;border-top:1px solid #D4D4D4;"></iframe>')}else{percheckdetailFrame.percheckdetailReLoadData(e,h,a,f,i,b)}$("#percheckdetail_dlg").dialog("setTitle",j);$("#percheckdetail_dlg").dialog("open")};_checkDetailEvent.prototype.appendPrevRecord=function(){_checkDetailEvent.prototype.getSortFldNum("0")};_checkDetailEvent.prototype.appendNextRecord=function(){_checkDetailEvent.prototype.getSortFldNum("1")};_checkDetailEvent.prototype.checkDetailRecord=function(){var b=checkdetailData[checkdetailIdx];var a="??????";_checkDetailEvent.prototype.openDlg(b,a)};_checkDetailEvent.prototype.checkToMarkRecord=function(){var c=$("#checkDataGridList").datagrid("getSelected");var a=checkdetailData[checkdetailIdx];if(!a){return openMessageDlg("?????????¤?????????,??????????????")}a.copies=parseInt(a.copies)+1;if(a.status=="0"&&a.status=="2"){if(a.copies>=c.copies){a.status="1"}}var d=checkdetailIdx;var b=base_path+"per/detailcheck/update.do";$.post(b,a,function(e){if(e.status=="0"){_checkDetailEvent.prototype.addPrintList(e.rows[0].id);_checkPerDetailObj.prototype.bindTable(e.rows[0].checkid);$("#checkdetail_dlg").dialog("close")}else{openMessageDlg(e.message)}},"json")};_checkDetailEvent.prototype.addPrintList=function(c){var a=base_path+"per/detailcheck/listBarcode.do";var b={};b.id=c;$.post(a,b,function(e){if(e.status=="0"){var d=e.rows;_checkDetailEvent.prototype.addPrintListByGetRows(d)}},"json")};_checkDetailEvent.prototype.addPrintListByGetRows=function(f){var e=mystorage.get("perCheckItemList");if(!e){e=[]}var a=f;for(var d=0;d<a.length;d++){if(e.length>0){var c=false;for(var b=0;b<e.length;b++){if(e[b].barcode==a[d].barcode){c=true;break}}if(!c){e.push({barcode:a[d].barcode,volinfo:a[d].volinfo})}}else{e.push({barcode:a[d].barcode,volinfo:a[d].volinfo})}}mystorage.set("perCheckItemList",e);_checkPerDetailObj.prototype.openPrintDlg()};_checkDetailEvent.prototype.checkToComBineRecord=function(){var d="";var c=$(".cell-box-selected");c.each(function(e,f){d+=f.id+","});d=d.substr(0,d.length-1);var a={};a.ids=d;var b=base_path+"per/detailcheck/combine.do";$.post(b,a,function(e){if(e.status=="0"){_checkPerDetailObj.prototype.bindTable(e.rows[0].checkid);openMessageDlg(e.message,5000)}else{openMessageDlg(e.message)}},"json")};_checkDetailEvent.prototype.deleteCheckDetailRecord=function(){var a=checkdetailData[checkdetailIdx];if(!a){return openMessageDlg("?????????¤?????????,??????")}openConfirmDlg("???????????????["+a.id+"]?????????????",null,_checkDetailEvent.prototype.deleteCheckDetailRecordResult,null)};_checkDetailEvent.prototype.deleteCheckDetailRecordResult=function(){var c=checkdetailData[checkdetailIdx];var b={};b.pk=c.id;var a=base_path+"per/detailcheck/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);_checkPerDetailObj.prototype.bindTable(c.checkid)}else{openMessageDlg(d.message)}},"json")};_checkDetailEvent.prototype.clearCheckDetailRecord=function(){var c=$("#checkDataGridList").datagrid("getSelected");var a=checkdetailData[checkdetailIdx];if(!a){return openMessageDlg("?????????¤?????????,??????????????")}a.copies=0;a.status="0";var d=checkdetailIdx;var b=base_path+"per/detailcheck/update.do";$.post(b,a,function(e){if(e.status=="0"){_checkPerDetailObj.prototype.bindTable(e.rows[0].checkid);$("#checkdetail_dlg").dialog("close")}else{openMessageDlg(e.message)}},"json")};_checkDetailEvent.prototype.getSortFldNum=function(g){var b="??????";var i=$("#checkDataGridList").datagrid("getSelected");var j=checkdetailData;var e={};e.checkid=i.id;e.bibid=i.bibid;if(!i){return openMessageDlg("??????????????????,??????")}var c=checkdetailData[checkdetailIdx];if(!c){e.sortfld=1000;_checkDetailEvent.prototype.openDlg(e,b)}else{var f=c.sortfld;var h=parseInt(checkdetailIdx);var a=0;if(g=="0"){if(h==0){a=parseInt((parseInt(f))/2)}else{if(h>0){var d=j[h-1];a=parseInt((parseInt(f)+parseInt(d.sortfld))/2);e.id=j[h].id;e.flag="add"}}}else{if(g=="1"){if(h==(j.length-1)){a=parseInt((parseInt(f)*3)/2)}else{if(h<(j.length-1)){var d=j[h+1];a=parseInt((parseInt(f)+parseInt(d.sortfld))/2);e.id=j[h].id;e.flag="add"}}}}e.sortfld=a;_checkDetailEvent.prototype.openDlg(e,b)}};var _bindPerGridObj=function(){};_bindPerGridObj.prototype.add=function(e){var f=$("#acqDataGridList").datagrid("getSelected");var a={};a.bibid=f.id;if(getValue("page_bind_batchno").length==0){return openMessageDlg("??????-?????????????????")}var b=base_path+"per/bind/bindManual.do";var g={};if(getValue("bindcopies")>0){g.copies=getValue("bindcopies")}if(getValue("bindfee")>0){g.bindfee=getValue("bindfee")}if(getValue("bindcount")>0){g.bindcount=getValue("bindcount")}var f=$("#checkDataGridList").datagrid("getSelected");if(e=="1"){b=base_path+"per/bind/bindAuto.do";if(!f){return openMessageDlg("??????????????????,?????????")}g.checkid=f.id}else{var d="";var c=$(".cell-box-selected");c.each(function(h,i){d+=i.id+","});d=d.substr(0,d.length-1);g.ids=d;if(d.toString().length==0){return openMessageDlg("????????????¤?????????,?????????")}}a.url=b;a.param=g;mystorage.set("per_bind_iframe_param",a);if($(".perbindFrame").html()==""){$(".perbindFrame").html('<iframe id="perbindFrame" name="perbindFrame" frameborder="0" src="../iframe/iframe_per_bind.jsp" style="width:880px;height:580px;border-top:1px solid #D4D4D4;"></iframe>')}else{perbindFrame.perbindReLoadData()}$("#perbind_dlg").dialog("setTitle","??????");$("#perbind_dlg").dialog("open")};function perBindSaveResult(c,a){openMessageDlg(c.message,5000);var b=$("#acqDataGridList").datagrid("getSelected");_comGridObj.prototype.loadData(b.id,"bind",1);var d=$("#checkDataGridList").datagrid("getSelected");_checkPerDetailObj.prototype.bindTable(d.id);$("#tabsRightGrid").tabs("select",2);$("#perbind_dlg").dialog("close")}var _perBindGridObj=function(){};_perBindGridObj.prototype.select=function(a,b){if(!isUpdateByLibcode(b.libcode)){$("#deleteBindPer").linkbutton({disabled:true})}else{$("#deleteBindPer").linkbutton({disabled:false})}};_perBindGridObj.prototype.add=function(c){var b=0;var e=0;if(!c){if(getValue("page_check_batchno").length==0){return openMessageDlg("???????????,?????????????????????")}var d=$("#acqDataGridList").datagrid("getSelected");if(!d){return openMessageDlg("????????????????,??????")}if(!d.classno){return openMessageDlg("???????????????????????????,???????????????????????!")}b=d.id}else{b=c.bibid;e=c.id}var a="??????";if($(".perbindhandlerFrame").html()==""){$(".perbindhandlerFrame").html('<iframe id="perbindhandlerFrame" name="perbindhandlerFrame" frameborder="0" src="../iframe/iframe_per_bindhandler.jsp?bibId='+b+"&id="+e+'" style="width:780px;height:480px;border-top:1px solid #D4D4D4;"></iframe>')}else{perbindhandlerFrame.perbindhandlerReLoadData(b,e)}$("#perbindhandler_dlg").dialog("setTitle",a);$("#perbindhandler_dlg").dialog("open")};_perBindGridObj.prototype.update=function(b,a){if(a){a=$("#bindDataGridList").datagrid("getSelected")}if(isUpdateByLibcode(a.libcode)){_perBindGridObj.prototype.add(a)}};_perBindGridObj.prototype.trash=function(){var a=$("#bindDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("?????????¤??????,??????")}openConfirmDlg("???????????????["+a.id+"]????????",null,_perBindGridObj.prototype.trashResult,null)};_perBindGridObj.prototype.trashResult=function(){var c=$("#bindDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"per/bind/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);_comGridObj.prototype.loadData(c.bibid,"bind",1)}else{openMessageDlg(d.message)}},"json")};function perBindHandlerSaveResult(b,a){openMessageDlg(b.message,5000);_comGridObj.prototype.loadData(a,"bind",1);_comGridObj.prototype.loadData(a,"hold");$("#perbindhandler_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}function printerBookLable(){var b=mystorage.get("perCheckItemList");if(b){var d={};d.rows=b;var a=getValue("page_booklablefmt");if(a.length==0){return openMessageDlg("??????-??????-???????????")}var c={};c.keycode=a;c.printPerCheckList="section";c.rows=d;mystorage.remove("perCheckItemList");$("#printer-confirm-dlg").dialog("close");openPostWindow("../export/exportlabelresult.jsp",c)}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de