Edit D:\rfid\libsystem\page\iframe\js\iframe_per_subscribeorderper.js
var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var _orderPerObj=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(){_orderPerObj.prototype.batchno();_initdata=mystorage.get("per_init_data");_configData=mystorage.get("per_config");initJson=[{code:"finsources",key:"finsources"},{code:"binding",key:"binding"},{code:"docsources",key:"docsources"},{code:"ncy,orderncy",key:"ncy"},{code:"frequency",key:"frequency"},{code:"mediatype",key:"mediatype"},{code:"pertype",key:"pertype"},{code:"ordertype",key:"perordertype"},{code:"operid",key:"operid"},{code:"location",key:"location",condition:"libcode",value:vLibcode},{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","")}},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");_orderPerObj.prototype.search();_orderPerObj.prototype.initGrid();_bibPVG.prototype.rateFocus("orderprice","");_bibPVG.prototype.perYearPrice("yearprice","")});_orderPerObj.prototype.batchno=function(){if($("#batchno").length>0){var b={type:"2",page:"1",rows:"500"};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")}};_orderPerObj.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}}}]]})};_orderPerObj.prototype.search=function(){cleanJsonData("record");var a=base_path+"acq/collect/get.do";if(_urlflag=="1"){a=base_path+"lib/biblios/get.do"}var b={};if(parseInt(_id)>0){a=base_path+"per/order/get.do";b.pk=_id}else{if(parseInt(_bibId)>0){b.id=_bibId}}$.post(a,b,function(c){if(c.status=="0"){_orderPerObj.prototype.set(c)}else{openMessageDlg(c.message)}},"json")};_orderPerObj.prototype.set=function(c){var b=mystorage.get("acq_order_per_handler_type");var d=c.rows[0];if(parseInt(_id)>0){setJsonData(null,d);var a=d.allocation;if(a){_orderPerObj.prototype.setDataToEidtGird(a)}else{clearGridData("location_eidtorgrid")}$(".orderbib_tip").html("???:???????????????????"+_id+"??")}else{if(_bibId>0&&_type!=0&&b){b.id=null;setJsonData(null,b);var a=b.allocation;if(a){_orderPerObj.prototype.setDataToEidtGird(a)}else{clearGridData("location_eidtorgrid")}setValue("ordertype",_type);$(".orderbib_tip").html("???:?????????????????????????"+_bibId+"??")}else{clearGridData("location_eidtorgrid");_bibPVG.prototype.setVPG(c.rows[0],"");setTextShowStatus(false);setValue("orderno",d.orderno);_orderPerObj.prototype.setTextByConifg();setValue("ordertype","0");$(".orderbib_tip").html("???:?????????????????????????"+_bibId+"??")}}};_orderPerObj.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)}}};_orderPerObj.prototype.setTextByConifg=function(){var a=JSON.parse(_configData.rows[0].paramjson);for(var d=0;d<initJson.length;d++){var g=initJson[d];if(g.code){if(g.code.indexOf(",")>0){var e=g.code.split(",");for(var c=0;c<e.length;c++){var f=e[c];if(a[f]){setValue(f,a[f])}}}else{if(a[g.code]){setValue(g.code,a[g.code])}}}}if(a.order_batchno){setValue("batchno",a.order_batchno)}if(a.ncy){setValue("orderncy",a.ncy)}if(a.copies){setValue("copies",a.copies)}if(a.orderyear){setValue("orderyear",a.orderyear)}var b=getCurDateYMD();setValue("paydate",b);setValue("orderdate",b);setValue("libcode",vLibcode);setValue("bibid",_bibId)};_orderPerObj.prototype.save=function(c){acceptEidtorGrid();var d=getJsonData(null,"record");if(!d){openMessageDlg("??????");return}if(parseFloat(d.orderprice)<=0){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/order/insert.do";if(a>0){e=base_path+"per/order/update.do"}onHnadlerSvaeBntScreen("saveOrderBibBnt",true);$.post(e,d,function(j){onHnadlerSvaeBntScreen("saveOrderBibBnt",false);if(j.status=="0"){var i=j.rows[0];parent.orderPerSaveResult(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 orderPerReLoadData(a,c,b){autoSelect=true;eidtorGridIndex=undefined;_bibId=a;_id=c;_type=b;_initdata=mystorage.get("per_init_data");_configData=mystorage.get("per_config");_orderPerObj.prototype.search()}function colseParentDlg(){parent.colseIframeDlg("suborderper_dlg",null,null)};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de