コード例 #1
0
 onCourtChange: function(areaCode, courtId){
     if(!search){
         // 组件:查询
         search = new PerSearch({
             element: '#search-list'
         });
     }else{
         search.searchListReload();
         cookie.set('areaCode', areaCode);
         cookie.set('courtId', courtId);
     };
 }
コード例 #2
0
 onCourtChange: function(areaCode, courtId){
     if(!search){
         // 组件:查询
         search = new PerSearch({
             element: '#search-list',
             onAjaxSuccess: function(){
                 focusParamName && paramName.focus();
             }
         });
     }else{
         focusParamName = false;
         search.searchListReload();
         cookie.set('areaCode', areaCode);
         cookie.set('courtId', courtId);
     };
 }
コード例 #3
0
"use strict";define("src/bus/investigation/investigationDetail/main",["bus/global/main","common/jquery","common/dialog","common/delegate","model/searchList/main","model/ajax/main","common/cookie","common/tip","common/validator","src/bus/investigation/investigationDetail/secondCheck-hbs","common/handlerbars","model/timer/main"],function(require,exports,module){require("bus/global/main");var $=require("common/jquery"),Dialog=require("common/dialog"),Delegate=require("common/delegate"),Ajax=(require("model/searchList/main"),require("model/ajax/main")),Cookie=require("common/cookie"),Validator=(require("common/tip"),require("common/validator")),secondCheckHbs=require("src/bus/investigation/investigationDetail/secondCheck-hbs"),Timer=require("model/timer/main");Cookie.setPath("/"),$("body").on("click","#logoutbtn",function(event){event.preventDefault(),Cookie.remove("InvestigationPID"),window.location.href="/loginOut.do"}),Delegate.on("click",'[data-target="resourceList"]',function(){var self=$(this),resourceId=self.data("resourceId");new Ajax({request:"/mercury/investigationRpc/checkDownLoadCount.json"}).on("ajaxSuccess",function(){"true"===Cookie.get("InvestigationPID")?window.open("/investfileOperation/download.json?fileIdStr="+resourceId):new Ajax({request:"/mercury/investigationRpc/checkIdCardCount.json"}).on("ajaxSuccess",function(){new Ajax({request:"/mercury/investigationRpc/sendMobileMsg.json"}).on("ajaxSuccess",function(){var dialog=Dialog.show(secondCheckHbs(),{width:500,events:{'click [data-trigger="getTime"]':function(e){var me=this;new Ajax({request:"/mercury/investigationRpc/sendMobileMsg.json"}).on("ajaxSuccess",function(){$("#messageText").text("验证码会在倒计时60秒内发送至你的手机,有效期为5分钟");var target=e.target;$(target).addClass("fn-hide"),$('[data-trigger="time"]').removeClass("fn-hide"),me.timer=new Timer({time:60}).on("progress",function(key){$('[data-trigger="time"]').val("倒计时:"+key+"s")}).on("end",function(){$("#messageText").text("如果未收到验证码,请点击获取验证码按钮"),$('[data-trigger="time"]').addClass("fn-hide"),$('[data-trigger="getTime"]').removeClass("fn-hide")})}).submit()},'click [data-trigger="submit"]':function(){this.validatorExp.execute(function(isErr){isErr||new Ajax({request:"/mercury/investigationRpc/checkAuthority.json",parseForm:dialog.element}).on("ajaxSuccess",function(val,msg,res){Cookie.set("InvestigationPID",res.isSuccess,1800),dialog.hide(),window.open("/investfileOperation/download.json?fileIdStr="+resourceId)}).submit()})}},autoShow:!1}).after("show",function(){this.validatorExp=Validator.use("#small-page",'[data-widget="validator"]'),this.timer=new Timer({time:60}).on("progress",function(key){$('[data-trigger="time"]').val("倒计时:"+key+"s")}).on("end",function(){$('[data-trigger="time"]').addClass("fn-hide"),$('[data-trigger="getTime"]').removeClass("fn-hide"),$("#messageText").text("如果未收到验证码,请点击获取验证码按钮")})}).before("hide",function(){this.timer.destroy()}).show()}).submit()}).submit()}).submit()})});
コード例 #4
0
 }).on('ajaxSuccess', function(val, msg, res) {
     Cookie.set('InvestigationPID', res.isSuccess, 1800);
     dialog.hide();
     window.open('/investfileOperation/download.json?fileIdStr=' + resourceId)
 }).submit();
コード例 #5
0
"use strict";define("src/bus/courtmanage/courtmanage/main",["bus/global/main","common/jquery","common/cookie","common/myWidget","common/domUtil","common/util","common/promise","common/limit","common/limit-dom","common/handlerbars","model/modal/main","model/ajax/main","model/perSearch/main","src/bus/courtmanage/common/coutAddress","model/address/select","common/validator","src/bus/courtmanage/common/tpl","model/selectpicker/main","model/multiple/main","model/upload/main"],function(require,exports,module){function initTpl(data){new Ajax({request:"/courtmanage/courtManageRpc/getCourtByAreaCode.json"}).on("ajaxSuccess",function(val,msg){$.extend(data,{courtList:val}),new Tpl({request:"/courtmanage/courtManageRpc/saveCourtData.json",template:"#courtmanage-template",paramName:"courtVo",data:data,onAjaxSuccess:function(){coutAddressExp.set("defaultCourtId",cookie.get("courtId")).incChange()},events:{'click [data-role="submit"]':function(e){var me=this;me.validatorExe.execute(function(err){err||(data.title&&"y"==me.$('[name="isDocking"]:checked').val()?Modal.confirm("提醒","确定该法院同步通达海?",function(){me.dataPost()}):me.dataPost())})}}})}).submit()}require("bus/global/main");var search,$=require("common/jquery"),cookie=require("common/cookie"),MyWidget=require("common/myWidget"),Modal=(require("common/domUtil"),require("model/modal/main")),Ajax=require("model/ajax/main"),PerSearch=require("model/perSearch/main"),CoutAddress=require("src/bus/courtmanage/common/coutAddress"),Tpl=(require("common/validator"),require("src/bus/courtmanage/common/tpl")),coutAddressExp=new CoutAddress({defaultCourtId:cookie.get("courtId"),defaultFocus:cookie.get("areaCode"),onCourtChange:function(areaCode,courtId){search?(search.searchListReload(),cookie.set("areaCode",areaCode),cookie.set("courtId",courtId)):search=new PerSearch({element:"#search-list"})}});new(MyWidget.extend({attrs:{element:"body"},events:{'click [data-role="add"]':function(e){initTpl({title:$(e.target).prop("title")})},'click [data-role="editor"]':function(e){new Ajax({request:"/courtmanage/courtManageRpc/getCourtBySecId.json",param:$(e.target).data("param")}).on("ajaxSuccess",function(content){initTpl(content)}).submit()},'click [data-role="delete"]':function(e){Modal.confirm("提示","您确定要删除吗?",function(){new Ajax({request:"/courtmanage/courtManageRpc/deleteCourtData.json",param:$(e.target).data("param")}).on("ajaxSuccess",function(val,msg){coutAddressExp.incChange(),Modal.alert(1,msg)}).submit()})}}}))});
コード例 #6
0
"use strict";define("src/bus/courtmanage/lawyersListManage/main",["bus/global/main","common/jquery","common/cookie","common/delegate","common/dialog","common/myWidget","common/domUtil","common/util","common/promise","common/limit","common/limit-dom","common/handlerbars","model/modal/main","common/validator","common/calendar","model/ajax/main","model/upload/main","model/perSearch/main","src/bus/courtmanage/common/firmAddress","model/address/select","src/bus/courtmanage/common/tpl","model/selectpicker/main","model/multiple/main"],function(require,exports,module){function initTpl(data){return new Tpl({request:"/courtmanage/lassenFirmLawyerRpc/editFirmLawyer.json",template:"#courtmanage-template",paramName:"lassenFirmLawyerVo",data:data,onAjaxSuccess:function(){search.searchListReload()},onAddressChange:function(id){var me=this;new Ajax({request:"/courtmanage/firmManageRpc/getFirmByAreaCode.json",param:{areaCode:id}}).on("ajaxSuccess",function(content){content.unshift({firmName:"请选择",securityId:""}),domUtil.selectSerialize(me.$('[name="securityFirmId"]')[0],$.map(content,function(val){return{key:val.firmName,value:val.securityId}})),me.checkSelect(),me.$('[name="securityFirmId"]').trigger("change")}).submit()},onComplete:function(){var me=this;me.calendar=new Calendar({trigger:me.$('[name="startWorkTime"]')})},onUnComplete:function(){var me=this;me.calendar.destroy()}})}function exceTpl(data){return new Tpl({request:"/courtmanage/lassenFirmLawyerRpc/saveWithFirm.json",template:"#excel",data:data,events:{'click [data-role="triggleSure"]':function(e){var me=this,securityId=this.$('[name="securityId"]').val(),firmId=this.$('[name="firmId"]').val();new Ajax({request:"/courtmanage/lassenFirmLawyerRpc/saveWithFirm.json",param:$.extend({},{securityId:securityId},{firmId:firmId}),paramName:"filterMap"}).on("onSuccess",function(rtv,msg,con){me.hide(),Modal.alert(1,msg,function(){searchListExp[0].searchListAjax()})}).submit()}},onAjaxSuccess:function(){search.searchListReload()},onAddressChange:function(id){var me=this;new Ajax({request:"/courtmanage/firmManageRpc/getFirmByAreaCode.json",param:{areaCode:id}}).on("ajaxSuccess",function(content){content.unshift({firmName:"请选择",securityId:""}),domUtil.selectSerialize(me.$('[name="securityFirmId"]')[0],$.map(content,function(val){return{key:val.firmName,value:val.securityId}})),me.checkSelect(),me.$('[name="securityFirmId"]').trigger("change")}).submit()}})}require("bus/global/main");var search,$=require("common/jquery"),cookie=require("common/cookie"),delegate=require("common/delegate"),Dialog=require("common/dialog"),MyWidget=require("common/myWidget"),domUtil=require("common/domUtil"),Modal=require("model/modal/main"),Validator=require("common/validator"),Calendar=require("common/calendar"),Ajax=require("model/ajax/main"),Upload=require("model/upload/main"),PerSearch=require("model/perSearch/main"),FirmAddress=require("src/bus/courtmanage/common/firmAddress"),Tpl=require("src/bus/courtmanage/common/tpl"),paramName=$('[name="name"]'),focusParamName=($('[name="firmId"]'),!1);new FirmAddress({defaultFirmId:cookie.get("firmId"),defaultFocus:cookie.get("areaCode"),onFirmChange:function(areaCode,firmId){search?(focusParamName=!1,search.searchListReload(),cookie.set("areaCode",areaCode),cookie.set("firmId",firmId)):search=new PerSearch({element:"#search-list",onAjaxSuccess:function(){focusParamName&&paramName.focus()}})}});Validator.use("#excel");Calendar.use(),new(MyWidget.extend({attrs:{element:"body"},events:{'click [data-role="add"]':function(e){initTpl({title:$(e.target).prop("title")})},'click [data-role="editor"]':function(e){new Ajax({request:"/courtmanage/lassenFirmLawyerRpc/getLawyer.json",param:$(e.target).data("param")}).on("ajaxSuccess",function(content){initTpl(content)}).submit()},'click [data-role="search"]':function(e){focusParamName=!0,search.searchListReload()},'keypress [name="name"]':function(e){13===e.charCode&&(focusParamName=!0,search.searchListReload())},'click [data-role="delete"]':function(e){Modal.confirm("提示","您确定要删除吗?",function(){new Ajax({request:"/courtmanage/lassenFirmLawyerRpc/delFirmLawyer.json",param:$(e.target).data("param")}).on("ajaxSuccess",function(val,msg){search.searchListAjax(),Modal.alert(1,msg)}).submit()})}}})),delegate.on("click",'[data-role="excel"]',function(e){exceTpl().after("show",function(){var me=this;Upload.use(me.$('[data-widget="upload"]'),{onSuccess:function(res){var me=this;me.get("parentNode").find('[name="securityId"]').val(res.comments),me.element.html(res.fileName)}})}).before("hide",function(){Upload.remove(this.$('[data-widget="upload"]'))}).show()}),delegate.on("click",'[data-role="photo"]',function(){Dialog.showTemplate("#photo",null,{width:450,autoShow:!1}).after("show",function(){var me=this;Upload.use(me.$('[data-widget="upload"]'),{onSuccess:function(res){me.hide(),search.searchListReload()}})}).before("hide",function(){Upload.remove(this.$('[data-widget="upload"]'))}).show()})});