Edit D:\rfid\libsystem\page\acquisition\js\acq_orderhandler_old.js
var initflag;var initJson;var linkid;var checkedItems=[];var orderType=0;var successcount=0;$(function(){initflag="page_,orderbib_";initJson=[{key:"sysid",condition:"type",value:vType},{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},{key:"acqstatus"}];$("#acqDataGridList").datagrid({idField:"id",onCheck:function(b,a){addcheckItem()},onUncheck:function(b,a){removeSingleItem(b,a)},onCheckAll:function(a){addcheckItem()},onUncheckAll:function(a){removeAllItem(a)}});$(".acceptTextTip").hide();setTimeout(initDefaultSelect,100)});function initDefaultSelect(){var a=$("#page_sysid").combobox("getData");if(a.length>0){$("#page_sysid").combobox("select",a[0].code);initOrderMenu(getValue("page_sysid"));return}else{setTimeout(initDefaultSelect,100)}}function initOrderMenu(c){var a=base_path+"acq/collectcata/page.do";var b={};b.status="1";b.sysid=c;$.post(a,b,function(d){$("#catacode").combobox({data:d.rows,valueField:"code",textField:"name",onLoadSuccess:function(){var e=$(this).combobox("getData");if(e.length>0){$(this).combobox("select",e[0].code)}}})},"json")}function orderBibRecord(c){orderType=0;var a="??????";$(".order-type-div").hide();setTextShowStatus(false);if(!c){cleanJsonData("orderbib_record");if(getValue("page_order_batchno").length==0){return openMessageDlg("???????????,?????????????????????")}var d=$("#acqDataGridList").datagrid("getSelected");if(!d){return openMessageDlg("????????????????,??????")}if(!d.classno){return openMessageDlg("????????????????????????,???????????????????????!")}var b=getCurDateYMD();setValue("orderbib_paydate",b);setValue("orderbib_orderdate",b);setValue("orderbib_catacode",getValue("catacode"));setValue("orderbib_order_ids",d.id);setValue("orderbib_order_type",0);$(".orderbib_tip").html("???:?????????????????????????"+d.id+"??");bibDataToDlgData(d,"orderbib_",a)}else{$(".orderbib_tip").html("");gridDataToDlgData(c,"orderbib_",a)}}function bacthOrderBibRecord(){orderType=1;$(".order-type-div").show();var d=checkedItems.join(",");var b="?????";setTextShowStatus(true);cleanJsonData("orderbib_record");var c=getCurDateYMD();setValue("orderbib_paydate",c);setValue("orderbib_orderdate",c);setValue("orderbib_catacode",getValue("catacode"));setValue("orderbib_libcode",vLibcode);setValue("orderbib_order_type",0);$(".orderbib_tip").html("???:??????????????????,???????"+checkedItems.length+"??????");var a=$('[item-type="page_paramjson"]');a.each(function(f,g){var e=getValue(g.id);if(g.id=="page_order_batchno"){setValue("orderbib_batchno",e)}else{if(g.id=="page_ncy"){setValue("orderbib_orderncy",e)}else{var i="orderbib_"+g.id.replace("page_","");var h=$("#"+i);if(h){setValue(i,e)}}}});$("#orderbib_dlg").dialog("setTitle",b);$("#orderbib_dlg").dialog("open")}function setTextShowStatus(a){if(a){$("#orderbib_price").numberbox("disable");$("#orderbib_orderprice").numberbox("disable");$("#orderbib_ordertotalprice").numberbox("disable");$("#orderbib_totalprice").numberbox("disable");$("#orderbib_volumes").textbox("disable");$("#orderbib_volumes").textbox("disable")}else{$("#orderbib_price").numberbox("enable");$("#orderbib_orderprice").numberbox("enable");$("#orderbib_ordertotalprice").numberbox("enable");$("#orderbib_totalprice").numberbox("enable");$("#orderbib_volumes").textbox("enable");$("#orderbib_volumes").textbox("enable")}}function ischeckItem(){for(var a=0;a<checkedItems.length;a++){$("#acqDataGridList").datagrid("selectRecord",checkedItems[a])}}function findCheckedItem(a){for(var b=0;b<checkedItems.length;b++){if(checkedItems[b]==a){return b}}return -1}function addcheckItem(){var b=$("#acqDataGridList").datagrid("getChecked");for(var a=0;a<b.length;a++){if(findCheckedItem(b[a].id)==-1){checkedItems.push(b[a].id)}}}function removeAllItem(c){for(var b=0;b<c.length;b++){var a=findCheckedItem(c[b].id);if(a!=-1){checkedItems.splice(b,1)}}}function removeSingleItem(c,b){var a=findCheckedItem(b.id);if(a!=-1){checkedItems.splice(a,1)}}function updateOrderBib(b,a){orderBibRecord(a)}function saveOrderBib(b){var c=getJsonData("orderbib_","record");if(!c){openMessageDlg("??????");return}if(!c.orderprice){openMessageDlg("??????????????");return}c.ordstatus="0";if(orderType==0){var a=getValue("orderbib_id");var d=base_path+"acq/collect/orderCollectbibs.do";if(a>0){d=base_path+"acq/order/update.do"}c.page=1;c.rows=1;$.post(d,c,function(e){if(e.status=="0"){openMessageDlg(e.message,5000);bindDataGridListByBibId(linkid,"order");$("#orderbib_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}else{openMessageDlg(e.message)}},"json")}else{if(b){onBacthMianFun(b,c)}else{$.messager.confirm("??????","?????????????????????",function(e){if(e){c.order_ids=checkedItems.join(",");onBacthMianFun(b,c)}})}}}function checkErrorFile(){var c=base_path+"com/webuploader/download.do?filename="+errorfile;var b=window.open(c)}function onBacthMianFun(a,c){if(!a){$.messager.progress({title:"????????",msg:"?????????,?????..."})}if(a){c=a}else{c.rows=200;c.page=1;successcount=0}var b=base_path+"acq/collect/orderCollectbibs.do";$.post(b,c,function(d){$.messager.progress("close");if(d.status=="0"){var e=d.rows[0];if(e){errorfile=e.errorfile;successcount+=parseInt(e.successcount);if(e.nextpage&&e.nextpage>0){$.messager.progress({title:"????????",msg:"??????????? ..."});c.page=e.nextpage;saveOrderBib(c)}else{$(".handlecount").html("?????"+successcount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???[0]??");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}else{openMessageDlg(d.message)}}else{openMessageDlg(d.message)}},"json")}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+"acq/order/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bindDataGridListByBibId(linkid,"order")}else{openMessageDlg(d.message)}},"json")}function cancelOrderBibRecord(){var a=$("#orderDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("?????????¤??????,??????????")}if(a.ordstatus=="1"){return openMessageDlg("????????????????????????!")}openConfirmDlg("??????????????"+a.id+"]??????????????????",null,cancelOrderBibRecordResult,null)}function cancelOrderBibRecordResult(){var c=$("#orderDataGridList").datagrid("getSelected");var b={};b.id=c.id;var a=base_path+"acq/order/cancelOrder.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bindDataGridListByBibId(c.bibid,"order")}else{openMessageDlg(d.message)}},"json")}function bindDataGridListByBibId(a,c){if(a>0){var b=base_path+"acq/"+c+"/page.do";if(c=="hold"){b=base_path+"hld/holding/page.do"}var d={};d.bibid=a;d.rows=10;d.page=1;$("#"+c+"DataGridList").datagrid({url:b,queryParams:d,onLoadSuccess:function(e){},method:"post"})}else{deleteGridData(""+c+"DataGridList")}}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+"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(d,b,c){setValue(""+b+"id","0");if(!d){return openMessageDlg("????????????????,??????")}var a=$('[item-type="page_paramjson"]');setValue(""+b+"libcode",vLibcode);setVolumesByBibPage(d,b);setValue(""+b+"bibid",d.id);a.each(function(f,g){var e=getValue(g.id);if(g.id=="page_order_batchno"){setValue("orderbib_batchno",e)}else{if(g.id=="page_check_batchno"){setValue("checkbib_batchno",e)}else{if(g.id=="page_ncy"){setValue(""+b+"orderncy",e)}else{var i=""+b+""+g.id.replace("page_","");var h=$("#"+i);if(h){setValue(i,e)}}}}});setValue("checkbib_hold","");$("#"+b+"dlg").dialog("setTitle",c);$("#"+b+"dlg").dialog("open")}function onSelectAcqDataGridList(b,a){linkid=a.linkid;bindAcqDataGridDetailById(a.id);bindDataGridListByBibId(linkid,"order");bindDataGridListByBibId(linkid,"hold");bindRecommendDataGridListByBibId(a.id)}function bindRecommendDataGridListByBibId(a){if(a>0){var b=base_path+"acq/recommend/pageUnion.do";var c={};c.colid=a;c.rows=10;c.page=1;$("#recommendDataGridList").datagrid({url:b,queryParams:c,onLoadSuccess:function(d){},method:"post"})}else{deleteGridData("recommendDataGridList")}}function onSelectTabsGrid(b,a){if(a==1){$("#deleteOrderBib").show();$("#cancelOrderBibRecord").show()}else{$("#deleteOrderBib").hide();$("#cancelOrderBibRecord").hide()}}function clearComBibGridData(){selectEditBibId=0;clearGridData("editBibGrid,acqDataGridList,orderDataGridList,holdDataGridList");$("#tabsGrid").tabs("select",0)}function onOpenOrderDlg(){$("#orderbib_copies").numberbox().next("span").find("input").focus()}function setPerPara(){$("#pageconfig_setpara_dlg").dialog("open")};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de