Edit D:\rfid\libsystem\page\periodical\js\allocationgrid.js
var setCheckLocationTitle="";var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var libComBoxData;var locationComBoxData;var allocationType;$(function(){eidtorGridObject=$("#allocationeidtorgrid")});function setCheckLocation(f){allocationType=f;var e="";if(vCurPageFlag=="percheck"){if(f=="checkper"){if(getValue("checkper_copies").length==0){return openMessageDlg("????????????")}e=getValue("checkper_allocation")}if(f=="checkdetail"){if(getValue("checkdetail_copies").length==0){return openMessageDlg("??????????????")}e=getValue("checkdetail_allocation")}setCheckLocationTitle="??????"}else{if(vCurPageFlag=="per"){if(getValue("orderbib_copies").length==0){return openMessageDlg("????????????")}setCheckLocationTitle="??????";e=getValue("orderbib_allocation")}}initAllocation();eidtorGridObject.datagrid("loadData",[]);if(e.length>0){var g=e.split(",");for(var d=0;d<g.length;d++){var c={};var b=g[d].split(":");var a={};a.libcode=b[0];a.location=b[1];a.num=b[2];appendEidtorGridRow(a)}}$("#allocationdlg").dialog("setTitle",setCheckLocationTitle);$("#allocationdlg").dialog("open")}function initAllocation(){var a=$("#orderbib_libcode");if(a.length>0){libComBoxData=$("#orderbib_libcode").combobox("getData")}a=$("#checkdetail_libcode");if(a.length>0){libComBoxData=$("#checkdetail_libcode").combobox("getData")}locationComBoxData=$("#page_location").combobox("getData");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-table",title:"",fit:true,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,onClickRow:onClickEditorRow,columns:[[{field:"libcode",title:"??????",width:"25%",formatter:onShowLibName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",required:true,data:libComBoxData,onChange:function(e,d){if(e!=undefined&&e!=d){if(eidtorGridIndex!=undefined){var f=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"location"});var b={key:"location",condition:"libcode",value:e};var c=base_path+"par/common/getInitData.do";$.post(c,b,function(g){$(f.target).combobox("loadData",g.rows)},"json")}}}}}},{field:"location",title:"??????",width:"25%",formatter:onShowLocationName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",required:true,data:locationComBoxData}}},{field:"num",title:"???",width:"25%",editor:{type:"numberbox",options:{required:true}}}]]})}function addAllocationRecord(){var a={};a.location=getValue("page_location");a.num="1";appendEidtorGridRow(a)}function handlerEidtorGrid(){}function saveAllocationRecord(){var d=allocationType;acceptEidtorGrid();var a=eidtorGridObject.datagrid("getRows");if(a.length==0){return openMessageDlg("????????????")}var b=0;var e="";for(var c=0;c<a.length;c++){b+=parseInt(a[c].num);e+=a[c].libcode+":"+a[c].location+":"+a[c].num+","}e=e.substring(0,e.length-1);if(vCurPageFlag=="per"){if(getValue("orderbib_copies")!=b){openConfirmDlg("?????????????????????????????",null,updateAllocationRecord,null)}else{setValue("orderbib_allocation",e)}}else{if(vCurPageFlag=="percheck"){if(d=="checkper"){if(getValue("checkper_copies")!=b){openConfirmDlg("?????????????????????????????",null,updateAllocationRecord,null)}else{setValue("checkper_allocation",e)}}if(d=="checkdetail"){if(getValue("checkdetail_copies")!=b){openConfirmDlg("??????????????????????????????",null,updateAllocationRecord,null)}else{setValue("checkdetail_allocation",e)}}}}$("#allocationdlg").dialog("close")}function updateAllocationRecord(){var d=allocationType;var a=eidtorGridObject.datagrid("getRows");var b=0;var e="";for(var c=0;c<a.length;c++){b+=parseInt(a[c].num);e+=a[c].libcode+":"+a[c].location+":"+a[c].num+","}e=e.substring(0,e.length-1);if(vCurPageFlag=="percheck"){if(d=="checkper"){setValue("checkper_copies",b);setValue("checkper_allocation",e)}if(d=="checkdetail"){setValue("checkdetail_copies",b);setValue("checkdetail_allocation",e)}}else{if(vCurPageFlag=="per"){setValue("orderbib_copies",b);setValue("orderbib_allocation",e)}}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de