Edit D:\rfid\libsystem\page\periodical\js\per_order_old.js
var initflag;var initJson;$(function(){initflag="page_,orderbib_";initJson=[{key:"sysid",condition:"type",value:"1"},{key:"ctrlno",condition:"libcode",value:vLibcode},{key:"z3950",condition:"libcode",value:vLibcode},{key:"bookseller",condition:"libcode",value:vLibcode},{key:"location",condition:"libcode",value:vLibcode},{key:"doctype",condition:"libcode",value:vLibcode},{key:"libcode",condition:"code",value:vLibcode}];var a={key:"perordertype"};initPageDataSingleElement("orderbib_ordertype",a,null);$(".check_batchno").hide();$(".bind_batchno").hide();initComboBoxSelectEvent();$(".easyui-panel").panel("resize");initRerFrequencyNum()});function initRerFrequencyNum(){var a=base_path+"par/common/getInitData.do";var b={};b.key="frequency";b.fmt="entity";$.post(a,b,function(c){$("#rerFrequencyNum").combobox({data:c.rows,valueField:"code",textField:"frequency",onLoadSuccess:function(){}})},"json")}function initComboBoxSelectEvent(){$("#orderbib_frequency").combobox({onSelect:function(a){if(a!=null){setValue("rerFrequencyNum",a.code);setValue("orderbib_issuenum",$("#rerFrequencyNum").combobox("getText"));ratePerHandlerMain("orderbib_",$("#rerFrequencyNum").combobox("getText"))}}})}function onSelectTabsGrid(b,a){if(a==1){$("#deleteOrderBib").show()}else{$("#deleteOrderBib").hide()}}function clearComBibGridData(){selectEditBibId=0;clearGridData("editBibGrid,acqDataGridList");$("#tabsGrid").tabs("select",0)}function onSelectAcqDataGridList(b,a){bindAcqDataGridDetailById(a.id);getInitGridDataByBibId(a.id)}function updateOrderBib(b,a){orderBibRecord(a,a.ordertype)}function orderBibRecord(e,d){cleanJsonData("orderbib_record");var c=$("#orderDataGridList").datagrid("getRows");var a="???";if(d==0){a+="???"}if(d==1){a+="???";if(c.length==0){return openMessageDlg("?????????,????????????")}e=$("#orderDataGridList").datagrid("getSelected");e.id=null}if(d==2){a+="???";if(c.length==0){return openMessageDlg("?????????,????????????")}e=$("#orderDataGridList").datagrid("getSelected");e.id=null}setValue("orderbib_ordertype",d);if(!e){if(getValue("page_order_batchno").length==0){return openMessageDlg("???????????,?????????????????????")}if(getValue("page_orderyear").length==0){return openMessageDlg("???????????,????????????????????")}var f=$("#acqDataGridList").datagrid("getSelected");if(!f){return openMessageDlg("????????????????,??????")}var b=getCurDateYMD();setValue("orderbib_id","");setValue("orderbib_paydate",b);setValue("orderbib_orderdate",b);$(".orderbib_tip").html("???:?????????????????????????"+f.id+"??");bibDataToDlgData(f,"orderbib_",a)}else{$(".orderbib_tip").html("");gridDataToDlgData(e,"orderbib_",a)}}function gridDataToDlgData(c,a,d){var b=$('[item-type="'+a+'record"]');b.each(function(f,h){var g=h.id.replace(a,"");if(h.id==""+a+"ordertype"){}else{if(h.id==""+a+"orderdate"||h.id==""+a+"paydate"||h.id==""+a+"checkdate"){if(c[g]){var e=c[g].toString();setValue(h.id,e)}}else{if(c[g]){setValue(h.id,c[g])}}}});$("#"+a+"dlg").dialog("setTitle",d);$("#"+a+"dlg").dialog("open")}function bibDataToDlgData(o,k,n){try{setValue(""+k+"id","0");if(!o){return openMessageDlg("????????????????,??????")}var c=$('[item-type="page_paramjson"]');setValue(""+k+"libcode",vLibcode);if(o.orderno){setValue(""+k+"orderno",o.orderno)}if(o.price){var h=/(\d{1,3})+(?:\.\d+)?/g;var m=o.price.match(h);var g=/[??$CNYUSD]/g;var l=o.price.match(g);var b="";if(l){for(var f=0;f<l.length;f++){b+=l[f]}}var d=$("#page_ncy").combobox("getData");var a=false;for(var f=0;f<d.length;f++){if(d[f].code==b){a=true}}if(a){setValue(""+k+"ncy",b)}else{setValue(""+k+"ncy","")}setValue(""+k+"price",m[0]);setValue(""+k+"totalprice",m[0])}setValue(""+k+"bibid",o.id);c.each(function(i,p){var e=getValue(p.id);if(p.id=="page_order_batchno"){setValue("orderbib_batchno",e)}else{if(p.id=="page_check_batchno"){setValue("checkbib_batchno",e)}else{if(p.id=="page_ncy"){setValue(""+k+"orderncy",e)}else{var r=""+k+""+p.id.replace("page_","");var q=$("#"+r);if(q){setValue(r,e)}}}}})}catch(j){}ratePerHandlerMain(k);$("#"+k+"dlg").dialog("setTitle",n);$("#"+k+"dlg").dialog("open")}function ratePerHandlerMain(d,b){var e=getValue(d+"price");if(e>0){var g=getValue(d+"orderprice");if(g==0||b){var c=0;var a=base_path+"par/rate/getRate.do";var f={};f.originalncy=getValue(d+"ncy");f.conversionncy=getValue(d+"orderncy");$.post(a,f,function(i){if(i.status=="0"){c=i.rows[0];if(e>0&&c>0){setValue(d+"orderprice",e*c);var h=getValue(d+"issuenum");if(b){h=parseInt(b)}if(h>0){setValue(d+"ordertotalprice",getValue(d+"orderprice")*h);setValue(""+d+"totalprice",getValue(d+"orderprice")*h)}else{setValue(d+"ordertotalprice",getValue(d+"orderprice"))}}}},"json")}}}function onOpenOrderDlg(){$("#orderbib_copies").numberbox().next("span").find("input").focus()}function saveOrderBib(){onHnadlerSvaeBntScreen("saveOrderBibBnt",true);var b=getJsonData("orderbib_","record");if(!b){openMessageDlg("??????");return}if(!b.copies){openMessageDlg("???????????0??");return}if(!b.orderprice){openMessageDlg("??????????????");return}var e=$("#orderDataGridList").datagrid("getSelected");var d;if(e){d=$("#orderDataGridList").datagrid("getRowIndex",e)}var a=getValue("orderbib_id");var c=base_path+"per/order/insert.do";if(a>0){c=base_path+"per/order/update.do"}$.post(c,b,function(f){onHnadlerSvaeBntScreen("saveOrderBibBnt",false);if(f.status=="0"){bindDataGridListByBibId(f.rows[0].bibid,"order",d);openMessageDlg(f.message,5000);$("#orderbib_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}else{openMessageDlg(f.message)}},"json")}function getInitGridDataByBibId(a){bindDataGridListByBibId(a,"order");bindDataGridListByBibId(a,"hold")}function bindDataGridListByBibId(b,d,a){if(b>0){var c=base_path+"per/"+d+"/page.do";if(d=="hold"){c=base_path+"hld/holding/page.do"}var e={};e.bibid=b;e.rows=10;e.page=1;$("#"+d+"DataGridList").datagrid({url:c,queryParams:e,onLoadSuccess:function(f){if(a>-1&&d=="order"){$("#orderDataGridList").datagrid("selectRow",a);$("#orderDataGridList").datagrid("scrollTo",a)}else{if(d=="order"){$("#orderDataGridList").datagrid("selectRow",0)}}},method:"post"})}else{deleteGridData(""+d+"DataGridList")}}function deleteOrderBib(){var a=$("#orderDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("?????????¤??????,??????")}openConfirmDlg("???????????????["+a.id+"]???????????",null,deleteOrderBibResult,null)}function deleteOrderBibResult(){var c=$("#orderDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"per/order/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bindDataGridListByBibId(c.bibid,"order")}else{openMessageDlg(d.message)}},"json")}function setPerPara(){$("#pageconfig_setpara_dlg").dialog("open")};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de