Edit D:\rfid\libsystem\page\iframe\js\iframe_per_check.js
var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var _perCheckObj=function(){};var _configData;var initJson;var _initdata;var autoSelect=true;var locToolbar=[{text:"???",iconCls:"e-icon fa fa-plus",handler:function(){var a={};appendEidtorGridRow(a)}},"-",{text:"???",iconCls:"e-icon fa fa-remove",handler:function(){removeitEidtorGridRow()}}];$(function(){_initdata=mystorage.get("per_init_data");_configData=mystorage.get("per_config");initJson=[{code:"finsources",key:"finsources"},{code:"mediatype",key:"mediatype"},{code:"binding",key:"binding"},{code:"docsources",key:"docsources"},{code:"ncy,orderncy",key:"ncy"},{code:"pertype",key:"pertype"},{code:"operid",key:"operid"},{code:"ordertype",key:"perordertype"},{code:"rerFrequencyNum",key:"rerFrequencyNum"},{code:"frequency",key:"frequency"},{code:"bookseller",key:"bookseller",condition:"libcode",value:vLibcode},{code:"libcode",key:"libcode",condition:"code",value:vLibcode}];$("#rerFrequencyNum").combobox({data:_initdata.rows[0].frequency,valueField:"code",textField:"frequency",onLoadSuccess:function(){}});$("#frequency").combobox({onSelect:function(a){if(a!=null&&!autoSelect){setValue("rerFrequencyNum",a.code);setValue("issuenum",$("#rerFrequencyNum").combobox("getText"));_bibPVG.prototype.perRate("",$("#rerFrequencyNum").combobox("getText"));_bibPVG.prototype.setPerYearPrice("yearprice","","price")}},onClick:function(b,a){autoSelect=false}});initJson.forEach(function(a,b,c){if(_initdata.rows[0][a.key]){_myPage.prototype.setData(_initdata.rows[0][a.key],a)}});$(".easyui-panel").panel("resize");_perCheckObj.prototype.search();_perCheckObj.prototype.initGrid();_bibPVG.prototype.perYearPrice("yearprice","","price")});_perCheckObj.prototype.initGrid=function(){eidtorGridObject=$("#location_eidtorgrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-table",title:"??????",fit:true,toolbar:locToolbar,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,onClickRow:onClickEditorRow,columns:[[{field:"libcode",title:"??????",width:"33%",formatter:onShowLibName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"160px",required:true,editable:false,data:$("#libcode").combobox("getData"),onChange:function(d,c){if(d!=undefined&&d!=c){if(eidtorGridIndex!=undefined){var e=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"location"});var a={key:"location",condition:"libcode",value:d};var b=base_path+"par/common/getInitData.do";$.post(b,a,function(f){try{$(e.target).combobox("loadData",f.rows)}catch(g){}},"json")}}}}}},{field:"location",title:"??????",width:"33%",formatter:onShowLocationNameByMyStorage,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"160px",groupField:"group",required:true,editable:false,data:_initdata.rows[0].location}}},{field:"copies",title:"???",width:"34%",editor:{type:"numberbox",options:{required:true}}}]]})};_perCheckObj.prototype.search=function(){cleanJsonData("record");var a=base_path+"lib/biblios/get.do";var b={};if(parseInt(_id)>0){a=base_path+"per/check/get.do";b.pk=_id}else{if(parseInt(_bibId)>0){b.id=_bibId}}$.post(a,b,function(c){if(c.status=="0"){_perCheckObj.prototype.set(c)}else{openMessageDlg(c.message)}},"json")};_perCheckObj.prototype.set=function(b){var c=b.rows[0];if(parseInt(_id)>0){setJsonData(null,c);var a=c.allocation;if(a){_perCheckObj.prototype.setDataToEidtGird(a)}else{clearGridData("location_eidtorgrid")}$(".orderbib_tip").html("???:????????????????????"+_id+"??")}else{clearGridData("location_eidtorgrid");_bibPVG.prototype.setVPG(b.rows[0],"");setTextShowStatus(false);setValue("orderno",c.orderno);_perCheckObj.prototype.setTextByConifg();$(".orderbib_tip").html("???:?????????????????????????"+_bibId+"??")}};_perCheckObj.prototype.setDataToEidtGird=function(e){clearGridData("location_eidtorgrid");if(e.length>0){var f=e.split(",");for(var d=0;d<f.length;d++){var c={};var b=f[d].split(":");var a={};a.libcode=b[0];a.location=b[1];a.copies=b[2];appendEidtorGridRow(a)}}};_perCheckObj.prototype.setTextByConifg=function(){var a=JSON.parse(_configData.rows[0].paramjson);for(var c=0;c<initJson.length;c++){var f=initJson[c];if(f.code){if(f.code.indexOf(",")>0){var d=f.code.split(",");for(var b=0;b<d.length;b++){var e=d[b];if(a[e]){setValue(e,a[e])}}}else{if(a[f.code]){setValue(f.code,a[f.code])}}}}if(a.copies){setValue("copies",a.copies)}if(a.orderyear){setValue("year",a.orderyear)}setValue("libcode",vLibcode);setValue("bibid",_bibId);setValue("id",0)};_perCheckObj.prototype.save=function(c){acceptEidtorGrid();var d=getJsonData(null,"record");if(!d){openMessageDlg("??????");return}if(!d.copies){openMessageDlg("???????????0??");return}if(!d.price){openMessageDlg("???????????");return}var b=eidtorGridObject.datagrid("getRows");var g=0;var h="";if(b.length>0){for(var f=0;f<b.length;f++){g+=parseInt(b[f].copies);h+=b[f].libcode+":"+b[f].location+":"+b[f].copies+","}h=h.substring(0,h.length-1);if(g>0&&g!=d.copies){return openMessageDlg("?????????????????????!")}}d.allocation=h;var a=getValue("id");var e=base_path+"per/check/insert.do";if(a>0){e=base_path+"per/check/update.do"}onHnadlerSvaeBntScreen("saveOrderBibBnt",true);$.post(e,d,function(j){onHnadlerSvaeBntScreen("saveOrderBibBnt",false);if(j.status=="0"){var i=j.rows[0];parent.perCheckSaveResult(j,i.bibid)}else{openMessageDlg(j.message)}},"json")};function setTextShowStatus(a){}function onShowLocationNameByMyStorage(b,c){var d=_initdata.rows[0].location;if(b){for(var a=0;a<d.length;a++){if(b==d[a].code){return d[a].name}}return b}else{return b}}function percheckReLoadData(a,b){autoSelect=true;eidtorGridIndex=undefined;_bibId=a;_id=b;_perCheckObj.prototype.search()}function colseParentDlg(){parent.colseIframeDlg("percheck_dlg",null,null)};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de