editpagebeanitem.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
layui.config({
	base: basePath, 
	version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui'], function (exports) {
	winui.renderColor();
	layui.use(['form'], function (form) {
		var index = parent.layer.getFrameIndex(window.name);
	    var $ = layui.$,
	    	form = layui.form;
	    
 		showGrid({
		 	id: "showForm",
15
		 	url: sysMainMation.rmprogramBasePath + "rmxcx033",
doc_wei's avatar
doc_wei 已提交
16 17 18
		 	params: {rowId: parent.pageId},
		 	pagination: false,
		 	template: getFileContent('tpl/rmmysmpropage/projectpageeditTemplate.tpl'),
W
weizhiqiang 已提交
19
		 	ajaxSendLoadBefore: function(hdb) {
doc_wei's avatar
doc_wei 已提交
20
		 	},
W
weizhiqiang 已提交
21
		 	ajaxSendAfter:function (json) {
doc_wei's avatar
doc_wei 已提交
22 23 24 25 26 27 28 29 30 31
		 		matchingLanguage();
		 		form.render();
			    form.on('submit(formEditBean)', function (data) {
			        if (winui.verifyForm(data.elem)) {
			        	var params = {
		        			name: $("#pageName").val(),
		        			filePath: $("#filePath").val(),
		        			fileName: $("#fileName").val(),
		        			rowId: parent.pageId
			        	};
32
			        	AjaxPostUtil.request({url: sysMainMation.rmprogramBasePath + "rmxcx034", params: params, type: 'json', callback: function (json) {
33 34
							parent.layer.close(index);
							parent.refreshCode = '0';
doc_wei's avatar
doc_wei 已提交
35 36 37 38 39 40 41
			 	   		}});
			        }
			        return false;
			    });
		 	}
 		});
	    
W
weizhiqiang 已提交
42
	    // 取消
doc_wei's avatar
doc_wei 已提交
43
	    $("body").on("click", "#cancle", function() {
doc_wei's avatar
doc_wei 已提交
44 45 46 47
	    	parent.layer.close(index);
	    });
	});
});