Esempio n. 1
0
define(function(require, exports, module) {

	//默认依赖一个全局都引用的业务模块
	require('bus/global/main');

	//依赖
	var $ = require('$'),
		delegate = require('common/delegate'),
		Scroller = require('common/scroller'),
		Ajax = require('model/ajax/main');

    //组件:滚动条
    Scroller.use('.JS-need-scroller'); 

    //事件:提交诉讼
    delegate.on('click', '.JS-trigger-click-submit', function(){
    	var self = $(this);
    	new Ajax({
    		autoSubmit: true,
    		request: '/suit/legalCaseRpc/submitLegalCase.json',
    		parseForm: '#pageParam',
    		onAjaxSuccess: function(){
    			this.redirect(self.data('href'));
    		}
    	});
    });

    

});
Esempio n. 2
0
define(function(require, exports, module) {

	//默认依赖一个全局都引用的业务模块
	require('bus/global/main');

	var Tab = require('model/tab/main');

    //依赖
	var $ = require('$'),
		Scroller = require('common/scroller');

	Tab.use('.JS-need-tab');
	
	 //组件:滚动条
    Scroller.use('.JS-need-scroller');


});
Esempio n. 3
0
"use strict";define("src/bus/paymentorder/court/divisionCase/divisionCase/main",["bus/global/main","common/jquery","common/handlerbars","model/ajax/main","common/validator","model/imgView/main","model/cascadeSelect/main","common/scroller"],function(require,exports,module){function displayResult(){var result={};result.deptName=$("input[name='deptName']").val(),result.trialName=$("input[name='trialName']").val(),result.clerkName=$("input[name='clerkName']").val(),result.remark=$("[name='remark']").val();var templat=handlerbars.compile($("#template").html());$(".content").html(templat(result)),$("#caseManage-form").remove()}require("bus/global/main");var $=require("common/jquery"),handlerbars=require("common/handlerbars"),Ajax=require("model/ajax/main"),Validator=require("common/validator"),ImgView=require("model/imgView/main"),CascadeSelect=require("model/cascadeSelect/main"),Scroller=require("common/scroller"),validatorExp=Validator.use("#caseManage-form");if($("#save").on("click",function(){validatorExp.execute(function(flag,err){flag||new Ajax({request:"/paymentorder/paymentOrderRpc/divisionCase.json?securityCaseId="+encodeURIComponent($("input[name='securityCaseId']").val()),paramName:"lassenCourtAssignDo",parseForm:$("#caseManage-form"),autoSuccessAlert:!0}).on("ajaxSuccess",function(rtv,msg,con){displayResult(rtv,msg,con)}).submit()})}),new ImgView,$("#load-more-details").on("click",function(){$("#more-details").removeClass("fn-hide"),Scroller.use(".JS-need-scroller"),$("#load-more-details").css("display","none")}),$(".JS-trigger-more-information").on("click",function(e){$("#court-more-information").removeClass("fn-hide"),Scroller.use(".JS-need-scroller"),$(e.target).parent().remove()}),$('[name="trialId"]').on("change",function(e){var trialCourt=$(e.target);$('[name="trialName"]').val(trialCourt.find("option:selected").text())}),$('[name="clerkId"]').on("change",function(e){var clerk=$(e.target);$('[name="clerkName"]').val(clerk.find("option:selected").text())}),$('[name="deptId"]').on("change",function(e){var dept=$(e.target);$('[name="deptName"]').val(dept.find("option:selected").text()),$('[name="trialName"]').val(""),$('[name="clerkName"]').val("")}),$(".cascadeSelect").size()>0){var deptUserJson=$('[name="deptUserJson"]').val();new CascadeSelect({deptUserJson:eval(deptUserJson),needInit:!0})}});
Esempio n. 4
0
 $(".JS-trigger-more-information").on('click', function(e){
 	$("#court-more-information").removeClass("fn-hide");
 	//组件:滚动条
 	Scroller.use('.JS-need-scroller'); 
 	$(e.target).parent().remove();
 });
Esempio n. 5
0
	$("#load-more-details").on('click', function(){
		$("#more-details").removeClass("fn-hide");
		Scroller.use('.JS-need-scroller'); 
		$("#load-more-details").css("display","none");
	});
Esempio n. 6
0
"use strict";define("src/model/caseManagement/main",["common/jquery","common/myWidget","model/multiple/main","model/imgView/main","common/handlerbars","common/util","common/promise","common/limit","common/limit-dom","model/ajax/main","common/scroller","model/modal/main","model/cascadeSelect/main","common/validator"],function(require,exports,module){function dateToString(date){if(date instanceof Date){var year=date.getFullYear(),month=date.getMonth()+1;month=month<10?"0"+month:month;var day=date.getDate();day=day<10?"0"+day:day;var hour=date.getHours();hour=hour<10?"0"+hour:hour;var minus=date.getMinutes();minus=minus<10?"0"+minus:minus;var seconds=date.getSeconds();return seconds=seconds<10?"0"+seconds:seconds,""+year+"-"+month+"-"+day+" "+hour+":"+minus+":"+seconds}return""}var $=require("common/jquery"),MyWidget=require("common/myWidget"),Multiple=require("model/multiple/main"),ImgView=require("model/imgView/main"),Handlerbars=require("common/handlerbars"),util=require("common/util"),Ajax=require("model/ajax/main"),Scroller=require("common/scroller"),Modal=require("model/modal/main"),CascadeSelect=require("model/cascadeSelect/main"),Validator=require("common/validator"),CaseManagement=MyWidget.extend({clssName:"CaseManagement",attrs:{element:"body",multiple:null,theConclusion:null,multipleMap:null,buttonSave:'<input type="button" class="fn-btn fn-btn-primary fn-btn-sm fn-W60 JS-trigger-click-save" value="保存"/>',buttonCommitSyn:'<input type="button" class="fn-btn fn-btn-primary fn-btn-sm fn-W70 JS-trigger-click-commit-syn" value="提交同步"/><span class="fn-PL5 fn-color-F00">您好!提交后便进入审判系统进行立案。<span>'},events:{'change [name="conclusion"]':function(e){var me=this,node=$(e.target);"return"===node.val()||"not_accepted"===node.val()?(me.show("#multiple"),me.disabledFalse(node.next())):(me.hide("#multiple"),me.disabledTrue(node.next())),"make"===node.val()?"y"==$('input[name="fromTongdahai"]').val()?($('[name="remark"]').val(""),$("#remarkTr").addClass("fn-hide"),$("#buttonTd").html(me.get("buttonCommitSyn"))):me.show("#caseCodeTr"):"y"==$('input[name="fromTongdahai"]').val()?($("#remarkTr").removeClass("fn-hide"),$("#buttonTd").html(me.get("buttonSave"))):($("[name='caseCode'], [name='dept'], [name='trialCourt'], [name='clerk']").val(""),$("[name=dept]").trigger("change"),me.hide("#caseCodeTr"))},"click .JS-trigger-click-save":function(){var me=this;me.valExp.execute(function(isErr,errList){if(!isErr){var reasonStr=$("input[name='reason']").val(),conclusion=$("select[name='conclusion']").val();if(reasonStr&&reasonStr.indexOf("other")>=0&&!$("textarea[name='remark']").val())"not_accepted"===conclusion?Modal.alert(0,'选择其他"不予受理"原因,备注不能为空。'):"return"===conclusion&&Modal.alert(0,'选择其他"退回"原因,备注不能为空。');else{var submitAjax=new Ajax({element:"#caseManage-form",autoSuccessAlert:!0,autoDestroy:!1}).on("ajaxSuccess",function(rtv,msg,res){return location.reload()});"make"===conclusion?Modal.confirm("提醒",'<span style="font-size:13px;font-weight:bold;">立案后不可跳回,确定要立案吗?</span>',function(){submitAjax.submit()}):submitAjax.submit()}}})},"click .JS-trigger-click-commit-syn":function(){var me=this;me.valExp.execute(function(isErr,errList){if(!isErr){var reasonStr=$("input[name='reason']").val(),conclusion=$("select[name='conclusion']").val();if(reasonStr&&reasonStr.indexOf("other")>=0&&!$("textarea[name='remark']").val())"not_accepted"===conclusion?Modal.alert(0,'选择其他"不予受理"原因,备注不能为空。'):"return"===conclusion&&Modal.alert(0,'选择其他"退回"原因,备注不能为空。');else{var commitSynAction=new Ajax({request:"/court/courtHandlerRpc/courtFileByYunjia.json?",paramName:"lassenCourtFilingVo",param:{securityCaseId:encodeURIComponent($("input[name='securityCaseId']").val()),courtId:encodeURIComponent($("input[name='courtId']").val())},autoSuccessAlert:!0}).on("ajaxSuccess",function(){location.reload(),$("#caseManage-form").replaceWith($("#template-caseManage-syn").html())});"make"===conclusion?Modal.confirm("提醒",'<span style="font-size:13px;font-weight:bold;">立案后不可跳回,确定要立案吗?</span>',function(){commitSynAction.submit()}):commitSynAction.submit()}}})},'change [name="trialCourt"]':function(e){var me=this,trialCourt=$(e.target);me.$('[name="trialCourtName"]').val(trialCourt.find("option:selected").text())},'change [name="clerk"]':function(e){var me=this,clerk=$(e.target);me.$('[name="clerkName"]').val(clerk.find("option:selected").text())},'change [name="dept"]':function(e){var me=this,dept=$(e.target);me.$('[name="deptName"]').val(dept.find("option:selected").text()),me.$('[name="clerkName"]').val(""),me.$('[name="trialCourtName"]').val("")},"click .JS-trigger-more-information":function(e){var me=this;me.$("#court-more-information").removeClass("fn-hide"),Scroller.use(".JS-need-scroller"),me.$(e.target).parent().remove()}},initProps:function(){var me=this;me.templateCaseManage=Handlerbars.compile("#template-caseManage",!0),me.valExp=Validator.use("#caseManage-form")},setup:function(){var me=this;if(new ImgView,0==me.$("select[name='conclusion']").size()&&me.$("#multiple")){var code=me.$("#multiple").data("reason");null!=code&&""!=code&&me.$("#multiple").html(me.getReasons(code))}if(me.$("select[name='conclusion']").size()>0&&new Multiple({trigger:"#multiple",width:420,data:me.get("multipleMap")}),me.$(".cascadeSelect").size()>0){var deptUserJson=me.$('[name="deptUserJson"]').val();new CascadeSelect({deptUserJson:eval(deptUserJson),needInit:!0})}},getReasons:function(code){var me=this,description="";if(code)for(var codes=code.split(","),c=0;c<codes.length;c++)description=""!=description?description+", "+me.get("multiple")[codes[c]]:me.get("multiple")[codes[c]];return description}});return CaseManagement});