Edit D:\rfid\apache-tomcat-8.5.32\webapps\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()}}];var speHoldToolbar=[{text:"???",iconCls:"e-icon fa fa-remove",handler:function(){deleteSpeHoldGridRow()}}];$(function(){_bibPVG.prototype.batchnoComBox("batchno","5");_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}});$("#status").combobox({onSelect:function(a){if(a!=null&&!autoSelect){if(a.code=="0"||a.code=="1"||a.code=="2"){$.messager.alert("???","?????????????????????????????");return}}},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:globalLibName+"???",width:"30%",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:"30%",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:"15%",editor:{type:"numberbox",options:{required:true}}},{field:"shelfno",title:"?????",width:"25%",editor:{type:"textbox",}}];_perCheckDetailObj.prototype.initGridByParam(b,"??????");var a=JSON.parse(_configData.rows[0].paramjson);_perCheckDetailObj.prototype.initSepGridByParam("?????????")};_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:globalLibName+"???",width:"16%",formatter:onShowLibName},{field:"barcode",title:"?????",width:"20%"},{field:"location",title:"??????",formatter:onShowLocationName,width:"16%"},{field:"doctype",title:"??????",formatter:onShowDocTypeName,width:"16%"},{field:"shelfno",title:"?????",width:"16%"},{field:"volumeinfo",title:"??????",width:"16%"}];$("#spehold_eidtorgrid").datagrid({iconCls:"e-icon fa fa-table",fitColumns:true,singleSelect:true,toolbar:speHoldToolbar,border:true,nowrap:false,striped:true,fit:true,columns:[a]});setDataToLocGrid()};function setDataToLocGrid(){var a=base_path+"per/detailcheck/listBarcode.do";a=base_path+"hld/holding/list.do";var b={};if(parseInt(_id)>0){b["limit[0].condition"]="pdcheckid";b["limit[0].value"]=_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(c){var d=c.rows[0];if(parseInt(_id)>0){_row=d;if(_flag=="add"){_perCheckDetailObj.prototype.addCheckDetail(d)}else{setJsonData(null,d)}var b=d.allocation;if(b){_perCheckDetailObj.prototype.setDataToEidtGird(b)}else{clearGridData("location_eidtorgrid")}if(d.status=="0"){setValue("copies",_copies);setValue("status","1")}if(!d.batchno){var a=JSON.parse(_configData.rows[0].paramjson);if(a.per_check_batchno){setValue("batchno",a.per_check_batchno)}}}else{clearGridData("location_eidtorgrid");_bibPVG.prototype.setVPG(c.rows[0],"");setTextShowStatus(false);setValue("orderno",d.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(f){clearGridData("location_eidtorgrid");if(f.length>0){var g=[];try{g=JSON.parse(f)}catch(h){}for(var d=0;d<g.length;d++){var c={};var b=g[d];var a={};a.libcode=b.libcode;a.location=b.location;a.copies=b.copies;a.shelfno=b.shelfno;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)}if(a.per_check_batchno){setValue("batchno",a.per_check_batchno)}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 e=0;var d=[];if(a.length>0){for(var c=0;c<a.length;c++){e+=parseInt(a[c].copies);var g={};g.libcode=a[c].libcode;g.location=a[c].location;g.copies=a[c].copies;g.shelfno=a[c].shelfno;d.push(g)}}b.allocation=JSON.stringify(d);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))){$.messager.confirm("??????","????????????????????????????",function(h){if(h){_perCheckDetailObj.prototype.saveUpdateCheckDetaile(b)}else{_perCheckDetailObj.prototype.saveCancleCheckDetaile(b)}})}else{b.updateFlag=0;_perCheckDetailObj.prototype.saveResult(b)}};_perCheckDetailObj.prototype.saveUpdateCheckDetaile=function(a){if(!a){a=getJsonData(null,"record")}a.updateFlag=1;_perCheckDetailObj.prototype.saveResult(a)};_perCheckDetailObj.prototype.saveCancleCheckDetaile=function(a){if(!a){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,f,d,a,e){eidtorGridIndex=undefined;autoSelect=true;_checkId=c;_bibId=b;_sortfld=d;_id=f;_flag=a;_copies=e;_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()};function deleteSpeHoldGridRow(){var a=$("#spehold_eidtorgrid").datagrid("getSelected");if(a){openConfirmDlg("???????????",null,deleteSpeHoldGridRowOk,null)}}function deleteSpeHoldGridRowOk(){var c=$("#spehold_eidtorgrid").datagrid("getSelected");var b=c.id;var a=base_path+"per/allocation/delete.do";a=base_path+"hld/holding/delete.do";var d={pk:b};$.post(a,d,function(e){openMessageDlg(e.message);if(e.status=="0"){setDataToLocGrid()}},"json")};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de