Edit D:\rfid\libsystem\page\iframe\js\iframe_checkbib.js
var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var callNoItemList;var barcodeItemList;var autoBarRows;var autoAssetnoRows;var holdToolbar=[{text:"???",iconCls:"e-icon fa fa-remove",handler:function(){removeitEidtorGridRow()}},"-",{text:"????????????????????(?????????????????)",iconCls:"e-icon fa fa-th-list",handler:function(){autoBarcodeByCopies()}}];var _checkBibObj=function(){};var _configData;var initJson;var auto_callno=null;var _initdata;$(function(){getMyStorageItemData();_checkBibObj.prototype.batchno();initJson=[{code:"finsources",key:"finsources"},{code:"mediatype",key:"mediatype"},{code:"binding",key:"binding"},{code:"docsources",key:"docsources"},{code:"ncy,orderncy",key:"ncy"},{code:"operid",key:"operid"},{code:"bookseller",key:"bookseller",condition:"libcode",value:vLibcode},{code:"libcode",key:"libcode",condition:"code",value:vLibcode},{code:"location",key:"location",condition:"libcode",value:vLibcode},{code:"doctype",key:"doctype",condition:"libcode",value:vLibcode}];initJson.forEach(function(b,c,d){if(_initdata.rows[0][b.key]){_myPage.prototype.setData(_initdata.rows[0][b.key],b)}});$(".easyui-panel").panel("resize");_checkBibObj.prototype.search();enterEvent("barcode",_checkBibObj.prototype.addHoldRecord);_bibPVG.prototype.rateFocus("orderprice","");_bibPVG.prototype.volumesFocus("volumes","");var a={code:"location",unionlist:[{code:"defdoctype",orgcode:"doctype"}]};_myPage.prototype.initUnionShowByLocation(a);_myPage.prototype.initUnionLocationByLibcode()});_checkBibObj.prototype.batchno=function(){if($("#batchno").length>0){var b={type:"1",page:"1",rows:"500"};b.orderBy=" libcode desc ";var a=base_path+"par/batchno/page.do";$.post(a,b,function(h){var g=[];for(var e=0;e<h.rows.length;e++){var f=_initdata.rows[0].libcode;for(var c=0;c<f.length;c++){if(f[c].code==h.rows[e].libcode){var d={code:""+h.rows[e].code+"",name:""+h.rows[e].code+"",group:""+f[c].name+""};g.push(d);break}}}$("#batchno").combobox({data:g,valueField:"code",textField:"name",groupField:"group",panelHeight:"200px"})},"json")}};_myPage.prototype.initComboxByOperatorParm=function(f){if(f.showacqloccode){var b=_initdata.rows[0].location;var e=[];for(var c=0;c<b.length;c++){var d=b[c].code+",";if(f.showacqloccode.indexOf(d)>-1){e.push(b[c])}}$("#location").combobox("loadData",e);var g={};g["limit[0].condition"]="code";g["limit[0].typeHandler"]="3";g["limit[0].value"]=getSqlConditionLimitIn(f.showacqloccode);var a=base_path+"par/location/list.do";$.post(a,g,function(m){var r=m.rows;_myLocationData=r;var j=_initdata.rows[0].libcode;var p=[];for(var n=0;n<j.length;n++){for(var l=0;l<r.length;l++){if(r[l].libcode.split("|")[0]==j[n].code){p.push(j[n]);break}}}$("#libcode").combobox("loadData",p);var o=_initdata.rows[0].doctype;var h=[];for(var n=0;n<o.length;n++){for(var l=0;l<r.length;l++){if(r[l].defdoctype==o[n].code){h.push(o[n]);break}}}$("#doctype").combobox("loadData",h);var q=JSON.parse(_configData.rows[0].paramjson);setValue("doctype",q.doctype);setValue("location",q.location);_bibPVG.prototype.getLocationByClassno();_checkBibObj.prototype.initGrid(true)},"json")}else{_bibPVG.prototype.getLocationByClassno();_checkBibObj.prototype.initGrid(false)}};_checkBibObj.prototype.search=function(){_myPage.prototype.getOperatorParam()};_checkBibObj.prototype.searchResult=function(){cleanJsonData("record");var a=base_path+"lib/biblios/get.do";var b={};b.id=_bibId;if(parseInt(_id)>0){a=base_path+"acq/check/get.do";b.pk=_id}if(parseInt(_orderid)>0){a=base_path+"acq/order/get.do";b.pk=_orderid}$.post(a,b,function(c){if(c.status=="0"){_checkBibObj.prototype.set(c)}else{openMessageDlg(c.message)}},"json")};_checkBibObj.prototype.setDataToHoldGrid=function(c){eidtorGridObject=$("#checkhold_eidtorgrid");var a=base_path+"hld/holding/page.do";var b={};b.checkid=c;b.rows=100;b.page=1;eidtorGridObject.datagrid({url:a,queryParams:b,onLoadSuccess:function(d){},method:"post"})};_checkBibObj.prototype.set=function(e){var k=JSON.parse(_configData.rows[0].paramjson);eidtorGridObject.datagrid("loadData",[]);var h=e.rows[0];if(parseInt(_id)>0){setJsonData(null,h);_checkBibObj.prototype.setDataToHoldGrid(h.id);$(".checkbib_tip").html("???:???????????????????"+_id+"??")}else{if(parseInt(_orderid)>0){h.id=0;h.orderid=_orderid;setJsonData(null,h);h.classno=mystorage.get("cat_classno");_bibPVG.prototype.getCallno(e.rows[0],"callno");if(k.check_batchno){setValue("batchno",k.check_batchno)}setValue("libcode",vLibcode);_checkBibObj.prototype.setHoldRecordByAutoBar();$(".checkbib_tip").html("???:???????????????????"+_orderid+"??")}else{_bibPVG.prototype.setVPG(e.rows[0],"");_bibPVG.prototype.getCallno(e.rows[0],"callno");for(var f=0;f<initJson.length;f++){var b=initJson[f];if(b.code){if(b.code.indexOf(",")>0){var g=b.code.split(",");for(var d=0;d<g.length;d++){var a=g[d];if(k[a]){setValue(a,k[a])}}}else{if(k[b.code]){setValue(b.code,k[b.code])}}}}if(k.check_batchno){setValue("batchno",k.check_batchno)}if(k.ncy){setValue("orderncy",k.ncy)}if(k.copies){setValue("copies",k.copies)}if(k.billno){setValue("billno",k.billno)}var c=getCurDateYMD();setValue("checkdate",c);setValue("libcode",vLibcode);setValue("bibid",_bibId);_checkBibObj.prototype.setHoldRecordByAutoBar();$(".checkbib_tip").html("???:?????????????????????????"+_bibId+"??")}}};_checkBibObj.prototype.saveCheck=function(){acceptEidtorGrid();var a=eidtorGridObject.datagrid("getRows");if(a.length!=getValue("copies")||a.length==0){$.messager.confirm("??????","?????????????????????????????",function(b){if(b){_checkBibObj.prototype.save()}})}else{_checkBibObj.prototype.save()}};_checkBibObj.prototype.allocation=function(){var a=eidtorGridObject.datagrid("getRows");var c="";for(var b=0;b<a.length;b++){barcodeItemList.push({barcode:a[b].barcode,callno:getValue("callno")});if(a[b].id==undefined||a[b].id==0){c+="0:"+a[b].libcode+":"+a[b].curlocation+":"+a[b].doctype+":"+a[b].barcode+":"+a[b].assetno+","}else{c+=a[b].id+":"+a[b].libcode+":"+a[b].curlocation+":"+a[b].doctype+":"+a[b].barcode+":"+a[b].assetno+","}}setValue("copies",a.length);return c};_checkBibObj.prototype.save=function(){var b=getJsonData(null,"record");if(!b){openMessageDlg("??????");return}if(!b.orderprice){openMessageDlg("??????????????");return}if(!b.callno){openMessageDlg("????????????");return}var d=getValue("id");var c=base_path+"acq/check/saveCheckRecord.do";if(auto_callno){b.auto_callno=auto_callno}b.allocation=_checkBibObj.prototype.allocation();var a=JSON.parse(_configData.rows[0].paramjson);b.sysid=a.sysid;$.post(c,b,function(g){if(g.status=="0"){callNoItemList.push({callno:getValue("callno")});mystorage.set("callNoItemList",callNoItemList);mystorage.set("barcodeItemList",barcodeItemList);if(autoBarRows&&_id==0){var f=autoBarRows[autoBarRows.length-1];_AutoBarObj.prototype.updateAutoBarByMaxBar(f,cataHoldSaveResultCallBack)}else{if(autoAssetnoRows){var e=autoAssetnoRows[autoAssetnoRows.length-1];_AutoBarObj.prototype.updateAutoAssetnoByMaxAssetno(e)}else{cataHoldSaveResultCallBack(g,b)}}}else{openMessageDlg(g.message)}},"json")};function cataHoldSaveResultCallBack(b,a){if(_bibId&&!a){var a={};a.bibid=_bibId}parent.checkSaveResult(b,a.bibid)}_checkBibObj.prototype.initGrid=function(a){eidtorGridObject=$("#checkhold_eidtorgrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-table",title:"",toolbar:holdToolbar,fit:true,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,onClickRow:onClickEditorRow,columns:[[{field:"id",title:"?????",hidden:true},{field:"libcode",title:"??????",width:"20%",formatter:onShowLibName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200px",required:true,editable:false,data:$("#libcode").combobox("getData"),onChange:function(d,b){if(d!=undefined&&d!=b){if(eidtorGridIndex!=undefined){var h=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"curlocation"});var o=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"doctype"});if(!a){if(h&&$(h.target)){var j={key:"location",condition:"libcode",value:d};var c=base_path+"par/common/getInitData.do";$.post(c,j,function(i){try{$(h.target).combobox("loadData",i.rows)}catch(k){}},"json")}if(o&&$(o.target)){j={key:"doctype",condition:"libcode",value:d};var c=base_path+"par/common/getInitData.do";$.post(c,j,function(i){try{$(o.target).combobox("loadData",i.rows)}catch(k){}},"json")}}else{var g="";for(var e=0;e<_myLocationData.length;e++){if(_myLocationData[e].libcode.split("|")[0]==d){var n=_myLocationData[e].code;if(n){g+=n+","}}}var m=_initdata.rows[0].location;var l=[];for(var f=0;f<m.length;f++){var p=m[f].code+",";if(g.indexOf(p)>-1){l.push(m[f])}}if(h&&$(h.target)){$(h.target).combobox("loadData",l);$(h.target).combobox("setValue",l[0].code)}}}}}}}},{field:"curlocation",title:"??????",width:"20%",formatter:onShowLocationName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200px",groupField:"group",required:true,editable:false,data:$("#location").combobox("getData"),onChange:function(f,d){if(f!=undefined&&f!=d){if(eidtorGridIndex!=undefined){if(a){var b=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"doctype"});for(var c=0;c<_myLocationData.length;c++){if(_myLocationData[c].code==f){var e=_myLocationData[c].defdoctype;$(b.target).combobox("setValue",e);break}}}}}}}}},{field:"doctype",title:"??????",width:"20%",formatter:onShowDocTypeName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200px",groupField:"group",required:true,editable:false,data:$("#doctype").combobox("getData")}}},{field:"barcode",title:"?????",width:"20%",editor:{type:"text",options:{required:true}}},{field:"assetno",title:"?????",width:"20%",editor:{type:"text"}}]]});_checkBibObj.prototype.searchResult()};_checkBibObj.prototype.addHoldRecord=function(){var b=JSON.parse(_configData.rows[0].paramjson);var g={};g.libcode=getValue("libcode");g.curlocation=getValue("location");g.doctype=getValue("doctype");g.barcode=getValue("barcode");if(b.autobartoassetno=="1"){g.assetno=g.barcode}if(g.barcode.length==0){return openMessageDlg("????????????")}var a=eidtorGridObject.datagrid("getRows");for(var f=0;f<a.length;f++){if(g.barcode==a[f].barcode){return openMessageDlg("?????????????????")}}if(g.barcode.indexOf("-")>-1){var e=g.barcode.split("-");var d=e[1];var c=e[0];_checkBibObj.prototype.setHoldRecord(g,d,c,0)}else{_checkBibObj.prototype.setHoldRecordIsExit(g)}$("#barcode").textbox("textbox").focus().select()};_checkBibObj.prototype.setHoldRecordIsExit=function(c){var b={};b.barcode=c.barcode;b.loantime="999";var a=base_path+"hld/holding/getCheckHoldBarcode.do";$.post(a,b,function(d){if(d.status=="0"){if(d.total>0){openMessageDlg("????????????")}else{appendEidtorGridRow(c)}}else{openMessageDlg(d.message)}},"json")};_checkBibObj.prototype.setHoldRecord=function(g,e,c,b){var a=JSON.parse(_configData.rows[0].paramjson);if(parseInt(b)>=parseInt(e)){return}if(parseInt(e)>getValue("copies")){return openMessageDlg("????????????????????????")}if(parseInt(e)>0){var d=base_path+"hld/holding/getCheckHoldBarcode.do";var f={};f.barcode=c;f.loantime="999";$.post(d,f,function(i){if(i.status=="0"){if(i.total==0){var h={};h.libcode=g.libcode;h.curlocation=g.curlocation;h.doctype=g.doctype;h.barcode=c;if(a.autobartoassetno=="1"){h.assetno=h.barcode}appendEidtorGridRow(h);b=b+1}c=addOne(c);_checkBibObj.prototype.setHoldRecord(g,e,c,b)}else{openMessageDlg(i.message)}},"json")}};function appendRestulFun(){var c=eidtorGridObject.datagrid("getRows");var a=JSON.parse(_configData.rows[0].paramjson);if(a.assetno&&a.autobartoassetno=="0"){autoAssetnoRows=undefined;var b=base_path+"hld/holding/getNextAssetno.do";var d={};d.code=a.assetno;d.count=c.length;$.post(b,d,function(f){if(f.status=="0"){eidtorGridObject.datagrid("loadData",[]);autoAssetnoRows=f.rows;for(var e=0;e<c.length;e++){c[e].assetno=autoAssetnoRows[e];appendEidtorGridRow(c[e],"resutl")}}else{openMessageDlg(f.message)}},"json")}}function autoBarcodeByCopies(){var a=mystorage.get("cat_autobar");if(a){eidtorGridObject.datagrid("loadData",[]);_checkBibObj.prototype.setHoldRecordByAutoBar()}else{openMessageDlg("?????????-??????-?????????????????")}}_checkBibObj.prototype.setHoldRecordByAutoBar=function(){var a=mystorage.get("cat_autobar");var b=JSON.parse(_configData.rows[0].paramjson);var f=getValue("copies");if(a){autoBarRows=undefined;var e={};e.libcode=getValue("libcode");e.curlocation=getValue("location");e.doctype=getValue("doctype");e.barcode=getValue("barcode");var c=base_path+"hld/holding/getNextBarno.do";var d={};d.code=a;d.count=f;$.post(c,d,function(m){if(m.status=="0"){var r=m.rows;autoBarRows=r;var o=mystorage.get("cat_holdlist");if(o&&o.length>0){var l=JSON.parse(o);var h=[];var g=0;for(var n=0;n<l.length;n++){var p=parseInt(l[n].copies);for(var k=0;k<p;k++){var q={};q.libcode=l[n].libcode;q.curlocation=l[n].curlocation;q.doctype=l[n].doctype;q.barcode=r[g];if(b.autobartoassetno=="1"){q.assetno=q.barcode}appendEidtorGridRow(q);g++}}}else{for(var n=0;n<r.length;n++){var q={};q.libcode=e.libcode;q.curlocation=e.curlocation;q.doctype=e.doctype;q.barcode=r[n];if(b.autobartoassetno=="1"){q.assetno=q.barcode}appendEidtorGridRow(q)}}}else{openMessageDlg(m.message)}},"json")}};function checkbibReLoadData(a,c,b){eidtorGridIndex=undefined;_bibId=a;_orderid=c;_id=b;getMyStorageItemData();autoBarRows=undefined;autoAssetnoRows=undefined;clearGridData("checkhold_eidtorgrid");_checkBibObj.prototype.search()}function getMyStorageItemData(){_initdata=mystorage.get("cat_init_data");_configData=mystorage.get("cat_config");callNoItemList=mystorage.get("callNoItemList");if(!callNoItemList){callNoItemList=[]}barcodeItemList=mystorage.get("barcodeItemList");if(!barcodeItemList){barcodeItemList=[]}}function colseParentDlg(){parent.colseIframeDlg("checkbib_dlg",null,null)};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de