var _bindPerObj=function(){};var _configData;var _initdata;var initJson;var myJsonRecord;var _updateMaxBarcode;$(function(){_bindPerObj.prototype.batchno();_initdata=mystorage.get("per_init_data");_configData=mystorage.get("per_config");initJson=[{code:"doctype",key:"doctype"},{code:"location,loccode",key:"location"},{code:"binding",key:"binding"},{code:"docsources",key:"docsources"},{code:"mediatype",key:"mediatype"},{code:"finsources",key:"finsources"},{code:"operid",key:"operid"},{code:"libcode",key:"libcode",condition:"code",value:vLibcode}];initJson.forEach(function(a,b,c){if(_initdata.rows[0][a.key]){_myPage.prototype.setData(_initdata.rows[0][a.key],a)}});$("#barcode").textbox("textbox").blur(function(a){_bindPerObj.prototype.addHoldRecord()});_bindPerObj.prototype.search();$(".easyui-panel").panel("resize");_bibPVG.prototype.rateFocus("orderprice","")});_bindPerObj.prototype.batchno=function(){if($("#batchno").length>0){var b={type:"3",page:"1",rows:"500"};var a=base_path+"par/batchno/page.do";$.post(a,b,function(h){var g=[];for(var e=0;e0){if(_id==0){openMessageDlg("条码号已["+getValue("barcode")+"]存在,请重新输入!")}}}else{openMessageDlg(c.message)}},"json")};_bindPerObj.prototype.search=function(){cleanJsonData("record");var a=base_path+"lib/biblios/get.do";var b={};b.id=_bibId;if(parseInt(_id)>0){a=base_path+"per/bind/get.do";b.pk=_id}else{if(parseInt(_bibId)>0){b.id=_bibId}}$.post(a,b,function(c){if(c.status=="0"){_bindPerObj.prototype.set(c)}else{openMessageDlg(c.message)}},"json")};_bindPerObj.prototype.save=function(){var b=getJsonData(null,"record");if(!b){openMessageDlg("记录异常");return}if(!b.barcode){openMessageDlg("条码号不能为空!");return}if(!b.price){openMessageDlg("价格不能为空!");return}if(!b.doctype){openMessageDlg("文献类型不能为空!");return}if(!b.loccode){openMessageDlg("馆藏地点不能为空!");return}var a=getValue("id");var c=base_path+"per/bind/insert.do";if(a>0){c=base_path+"per/bind/update.do"}$.post(c,b,function(d){if(d.status=="0"){if(_updateMaxBarcode&&_id==0){_AutoBarObj.prototype.updateAutoBarByMaxBar(_updateMaxBarcode,cataHoldSaveResultCallBack)}else{cataHoldSaveResultCallBack(d,b)}}else{openMessageDlg(d.message)}},"json")};function cataHoldSaveResultCallBack(b,a){parent.perBindHandlerSaveResult(b,a.bibid)}_bindPerObj.prototype.set=function(e){var h=e.rows[0];if(parseInt(_id)>0){setJsonData(null,h);if(!h.barcode){_bindPerObj.prototype.setHoldRecordByAutoBar()}if(!h.callno){setCheckCallNo()}$(".orderbib_tip").html("提示:请您确认当前装订记录号【"+_id+"】")}else{_bindPerObj.prototype.setHoldRecordByAutoBar();_bibPVG.prototype.setVPG(e.rows[0],"");_bibPVG.prototype.getCallno(e.rows[0],"callno");var k=JSON.parse(_configData.rows[0].paramjson);for(var f=0;f0){var g=b.code.split(",");for(var d=0;d0){var d=f.code.split(",");for(var b=0;b