sysnoticetimeup.js 1.4 KB
Newer Older
doc_wei's avatar
doc_wei 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

var typeId = "";
var secondTypeId = "";
var layedit;

layui.config({
	base: basePath, 
	version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'tableSelect', 'laydate'], function (exports) {
	winui.renderColor();
	layui.use(['form', 'layedit'], function (form) {
		var index = parent.layer.getFrameIndex(window.name);
	    var $ = layui.$,
16 17 18
			form = layui.form,
			tableSelect = layui.tableSelect,
			laydate = layui.laydate;
doc_wei's avatar
doc_wei 已提交
19 20
	    layedit = layui.layedit;
	
21 22
 		// 定时通知时间选择器
 		laydate.render({elem: '#delayedTime', type: 'datetime'});
doc_wei's avatar
doc_wei 已提交
23 24 25 26 27 28 29 30 31 32 33
 	
 		matchingLanguage();
 		form.render();
 	    form.on('submit(formAddBean)', function (data) {
 	        if (winui.verifyForm(data.elem)) {
 	        	var params = {
 	        		rowId: parent.rowId,
 	        		title: parent.title,
 	        		delayedTime: $("#delayedTime").val()
 	        	};
        		if(isNull(params.delayedTime)){
doc_wei's avatar
doc_wei 已提交
34
        			winui.window.msg('请选择定时通知时间', {icon: 2, time: 2000});
doc_wei's avatar
doc_wei 已提交
35 36
 	        		return false;
        		}
37
    			AjaxPostUtil.request({url: sysMainMation.noticeBasePath + "notice011", params: params, type: 'json', callback: function (json) {
38 39
					parent.layer.close(index);
					parent.refreshCode = '0';
doc_wei's avatar
doc_wei 已提交
40 41 42 43 44
    			}});
 	        }
 	        return false;
 	    });
 	    
doc_wei's avatar
doc_wei 已提交
45
	    $("body").on("click", "#cancle", function() {
doc_wei's avatar
doc_wei 已提交
46 47 48 49
	    	parent.layer.close(index);
	    });
	});
});