Edit D:\rfid\libsystem\page\iframe\js\iframe_per_checkdetail.js
var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var _perCheckItemList;var _perCheckDetailObj=function(){};var _row;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:"frequency",key:"frequency"},{code:"pertype",key:"pertype"},{code:"ordertype",key:"perordertype"},{code:"status",key:"percheckstatus"},{code:"operid",key:"operid"},{code:"bookseller",key:"bookseller",condition:"libcode",value:vLibcode},{code:"libcode,hldlibcode",key:"libcode",condition:"code",value:vLibcode},{code:"location",key:"location",condition:"libcode",value:vLibcode},{code:"doctype",key:"doctype",condition:"libcode",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"))}},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");_perCheckDetailObj.prototype.search();_perCheckDetailObj.prototype.initGrid();_bibPVG.prototype.rateFocus("orderprice","");setPrintItemList()});_perCheckDetailObj.prototype.initGrid=function(){var b=[{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(f,e){if(f!=undefined&&f!=e){if(eidtorGridIndex!=undefined){var g=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"location"});var c={key:"location",condition:"libcode",value:f};var d=base_path+"par/common/getInitData.do";$.post(d,c,function(h){try{$(g.target).combobox("loadData",h.rows)}catch(i){}},"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}}}];_perCheckDetailObj.prototype.initGridByParam(b,"??????");var a=JSON.parse(_configData.rows[0].paramjson);if(a.spehld){_perCheckDetailObj.prototype.initSepGridByParam("?????????");$("#fen-pei").tabs("enableTab",1)}else{$("#fen-pei").tabs("disableTab",1)}};_perCheckDetailObj.prototype.initGridByParam=function(a,b){eidtorGridObject=$("#location_eidtorgrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-table",toolbar:locToolbar,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,fit:true,onClickRow:onClickEditorRow,columns:[a]})};_perCheckDetailObj.prototype.initSepGridByParam=function(b){var a=[{field:"libcode",title:"??????",width:"30%",formatter:onShowLibName},{field:"loccode",title:"??????",formatter:onShowLocationNameByMyStorage,width:"30%"},{field:"barcode",title:"?????",width:"20%"},{field:"volinfo",title:"??????",width:"20%"}];$("#spehold_eidtorgrid").datagrid({iconCls:"e-icon fa fa-table",fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,fit:true,columns:[a]});setDataToLocGrid()};function setDataToLocGrid(){var a=base_path+"per/detailcheck/listBarcode.do";var b={};if(parseInt(_id)>0){b.id=_id;$("#spehold_eidtorgrid").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}}_perCheckDetailObj.prototype.search=function(){_row=null;cleanJsonData("record");var a=base_path+"per/check/get.do";var b={};if(parseInt(_id)>0){a=base_path+"per/detailcheck/get.do";b.pk=_id}else{if(parseInt(_checkId)>0){b.pk=_checkId}}$.post(a,b,function(c){if(c.status=="0"){_perCheckDetailObj.prototype.set(c)}else{openMessageDlg(c.message)}},"json")};_perCheckDetailObj.prototype.set=function(b){var c=b.rows[0];if(parseInt(_id)>0){_row=c;if(_flag=="add"){_perCheckDetailObj.prototype.addCheckDetail(c)}else{setJsonData(null,c)}var a=c.allocation;if(a){_perCheckDetailObj.prototype.setDataToEidtGird(a)}else{clearGridData("location_eidtorgrid")}if(c.status=="0"){setValue("copies",_copies);setValue("status","1")}}else{clearGridData("location_eidtorgrid");_bibPVG.prototype.setVPG(b.rows[0],"");setTextShowStatus(false);setValue("orderno",c.orderno);_perCheckDetailObj.prototype.setTextByConifg()}};_perCheckDetailObj.prototype.addCheckDetail=function(a){setJsonData(null,a);if(a.issue){setValue("issue","??"+a.issue)}if(a.totalissue){setValue("issue","??"+a.totalissue)}setValue("id",0)};_perCheckDetailObj.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)}}};_perCheckDetailObj.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("checkid",_checkId);setValue("libcode",vLibcode);setValue("bibid",_bibId);setValue("id",0)};_perCheckDetailObj.prototype.save=function(){acceptEidtorGrid();var b=getJsonData(null,"record");if(!b){openMessageDlg("??????");return}if(!b.copies){openMessageDlg("???????????0??");return}if(!b.price){openMessageDlg("???????????");return}if(!b.year){openMessageDlg("????????????");return}if(!b.issuenum){openMessageDlg("??????????????");return}if(!b.issue){openMessageDlg("????????????");return}if(!b.expectdate){openMessageDlg("??????????????");return}var a=eidtorGridObject.datagrid("getRows");var d=0;var e="";if(a.length>0){for(var c=0;c<a.length;c++){d+=parseInt(a[c].copies);e+=a[c].libcode+":"+a[c].location+":"+a[c].copies+","}e=e.substring(0,e.length-1);if(d>0&&d!=b.copies){return openMessageDlg("???????????????????????!")}}b.allocation=e;var f=_row;if(_row&&((b.volume&&f.volume!=b.volume)||(b.issue&&f.issue!=b.issue)||(b.totalissue&&f.totalissue!=b.totalissue)||(b.expectdate&&f.expectdate!=b.expectdate))){openConfirmDlg("????????????????????????????",null,_perCheckDetailObj.prototype.saveUpdateCheckDetaile,_perCheckDetailObj.prototype.saveCancleCheckDetaile)}else{b.updateFlag=0;_perCheckDetailObj.prototype.saveResult(b)}};_perCheckDetailObj.prototype.saveUpdateCheckDetaile=function(){var a=getJsonData(null,"record");a.updateFlag=1;_perCheckDetailObj.prototype.saveResult(a)};_perCheckDetailObj.prototype.saveCancleCheckDetaile=function(){var a=getJsonData(null,"record");a.updateFlag=0;_perCheckDetailObj.prototype.saveResult(a)};_perCheckDetailObj.prototype.saveResult=function(b){var a=getValue("id");var c=base_path+"per/detailcheck/insert.do";if(a>0){c=base_path+"per/detailcheck/check.do"}if(_sortfld){b.sortfld=_sortfld}onHnadlerSvaeBntScreen("saveOrderBibBnt",true);$.post(c,b,function(e){setPrintItemList(1);onHnadlerSvaeBntScreen("saveOrderBibBnt",false);if(e.status=="0"){var d=e.rows[0];parent.checkPerDetailSaveResult(e,d.checkid)}else{openMessageDlg(e.message)}},"json")};function setPrintItemList(e){_perCheckItemList=mystorage.get("perCheckItemList");if(!_perCheckItemList){_perCheckItemList=[]}if(e){var a=$("#spehold_eidtorgrid").datagrid("getRows");for(var d=0;d<a.length;d++){if(_perCheckItemList.length>0){var c=false;for(var b=0;b<_perCheckItemList.length;b++){if(_perCheckItemList[b].barcode==a[d].barcode){c=true;break}}if(!c){_perCheckItemList.push({barcode:a[d].barcode,volinfo:a[d].volinfo})}}else{_perCheckItemList.push({barcode:a[d].barcode,volinfo:a[d].volinfo})}}mystorage.set("perCheckItemList",_perCheckItemList)}}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 percheckdetailReLoadData(c,b,e,d,a){eidtorGridIndex=undefined;autoSelect=true;_checkId=c;_bibId=b;_sortfld=d;_id=e;_flag=a;_initdata=mystorage.get("per_init_data");_configData=mystorage.get("per_config");_perCheckDetailObj.prototype.search();_perCheckDetailObj.prototype.initGrid();setPrintItemList()}function colseParentDlg(){parent.colseIframeDlg("percheckdetail_dlg",null,null)}_perCheckDetailObj.prototype.addHoldRecord=function(){var a={};a.libcode=getValue("libcode");a.curlocation=getValue("location");a.doctype=getValue("doctype");a.barcode=getValue("barcode");appendEidtorOtherGridRow(a);$("#barcode").textbox("textbox").focus().select()};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de