var rdrfieldComBoxData=[{field:"lib_cir_reader.libcode",code:"libcode",name:"分馆代码"},{field:"lib_cir_reader.rdrno",code:"rdrno",name:"读者证号"},{field:"lib_cir_reader.name",code:"name",name:"读者姓名"},{field:"lib_cir_reader.idcard",code:"idcard",name:"身份证号"},{field:"lib_cir_reader.otherno",code:"otherno",name:"其他编号"},{field:"lib_cir_reader.password",code:"password",name:"读者密码"},{field:"lib_cir_reader.status",code:"rdrstatus",name:"读者状态"},{field:"lib_cir_reader.rdrtype",code:"rdrtype",name:"读者类型"},{field:"lib_cir_reader.rdrfld1",code:"rdrfld1",name:mystorage.get("rdr_fld1")},{field:"lib_cir_reader.rdrfld2",code:"rdrfld2",name:mystorage.get("rdr_fld2")},{field:"lib_cir_reader.rdrfld3",code:"rdrfld3",name:mystorage.get("rdr_fld3")},{field:"lib_cir_reader.rdrfld4",code:"rdrfld4",name:mystorage.get("rdr_fld4")},{field:"lib_cir_reader.birthday",code:"birthday",name:"生日"},{field:"lib_cir_reader.gender",code:"gender",name:"性别"},{field:"lib_cir_reader.hobby",code:"hobby",name:"爱好"},{field:"lib_cir_reader.specialty",code:"specialty",name:"特长"},{field:"lib_cir_reader.telephone",code:"telephone",name:"电话号码"},{field:"lib_cir_reader.email",code:"email",name:"email"},{field:"lib_cir_reader.nation",code:"nation",name:"民族"},{field:"lib_cir_reader.nativeplace",code:"nativeplace",name:"籍贯"},{field:"lib_cir_reader.address",code:"address",name:"通讯地址"},{field:"lib_cir_reader.unit",code:"unit",name:"工作单位"},{field:"lib_cir_reader.createdate",code:"createdate",name:"办证日期"},{field:"lib_cir_reader.startdate",code:"startdate",name:"起始日期"},{field:"lib_cir_reader.enddate",code:"enddate",name:"终止日期"},{field:"lib_cir_reader.canceldate",code:"canceldate",name:"注销日期"},{field:"lib_cir_reader.note",code:"note",name:"备注"}];var typeHandlerComBoxData=[{code:"0",name:"等于"},{code:"1",name:"前方一致"},{code:"3",name:"包含"},{code:"4",name:"小于"},{code:"5",name:"小于等于"},{code:"6",name:"大于"},{code:"7",name:"大于等于"},{code:"8",name:"不等于"},{code:"9",name:"不在"},{code:"10",name:"为空"},{code:"11",name:"不为空"}];$(function(){var b=[{code:"email",key:"email",condition:"libcode",value:mystorage.get("libcode")},{code:"type",key:"scheduledtasktype"},];commonSetParaInit(null,"paramjson",null,b);var a=[{code:"type",key:"scheduledtasktype"},];commonSetParaInit(null,"record",null,a);$("#type").combobox({onChange:function(d,c){if(d=="0"||d=="4"){if(d=="4"){$("#day-tips").text("超期提醒天数")}else{$("#day-tips").text("提前催还天数")}$(".days-text").show();$(".update-rdr-text").hide();$(".email-text").show()}else{if(d=="7"){$(".days-text").hide();$(".update-rdr-text").show();$(".email-text").hide()}else{$(".days-text").hide();$(".email-text").show();$(".update-rdr-text").hide()}}}});initRdrFld()});function initRdrFld(){$("#1").combobox({data:rdrfieldComBoxData,valueField:"code",textField:"name",onLoadSuccess:function(){$(this).combobox("select","rdrtype")}});var b={};b=[{field:"oldvalue",title:"原值",width:"50%",editor:"textbox"},{field:"newvalue",title:"新值",width:"50%",editor:"textbox"},];eidtorOtherGridObject=$("#2");eidtorOtherGridObject.datagrid({iconCls:"e-icon fa fa-cog",fit:true,title:"设置修改对应关系",fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,toolbar:toolbarOther,onClickRow:onClickOtherEditorRow,columns:[b]});var a={};a=[{field:"condition",title:"字段名称",width:"30%",formatter:onShowJosnRdrComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",required:true,editable:false,data:rdrfieldComBoxData}}},{field:"typeHandler",title:"类型",width:"30%",formatter:onShowJosnTypeHandlerComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",required:true,editable:false,data:typeHandlerComBoxData}}},{field:"value",title:"值",width:"40%",editor:"textbox"},];eidtorGridObject=$("#3");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-cog",fit:true,title:"设置限定条件",fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,toolbar:toolbar,onClickRow:onClickEditorRow,columns:[a]})}function openWin(a){cleanJsonData("record");if(!a){setValue("1","rdrtype")}$("#win").window("open")}function saveRecord(){acceptEidtorGrid();acceptEidtorOtherGrid();var a=getJsonData(null,"record");if(!a){openMessageDlg("记录异常");return}if(a.type=="7"){setValue("email","1")}if(verifyRequiredFields()){openMessageDlg("必填字段不能为空!");return}if(verifyReasonableData(a)){return}var b=$('[insert-check="repeat"]');if(operation=="insert.do"&&b.length>0){verifyRepeatData(a,b)}else{saveRecordOk(a)}}function onShowJosnTypeHandlerComBoxData(b,c){var d=typeHandlerComBoxData;if(b){for(var a=0;a