actFlowEdit.js 1.4 KB
Newer Older
1 2 3 4 5 6

layui.config({
	base: basePath, 
	version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
doc_wei's avatar
doc_wei 已提交
7
}).define(['window', 'jquery', 'winui', 'form', 'eleTree'], function (exports) {
8 9 10 11 12 13 14 15 16 17 18 19 20
	winui.renderColor();
	var index = parent.layer.getFrameIndex(window.name);
	var $ = layui.$,
		form = layui.form;

	showGrid({
		id: "showForm",
		url: flowableBasePath + "queryActFlowMationById",
		params: {id: parent.rowId},
		method: 'GET',
		pagination: false,
		template: $("#beanTemplate").html(),
		ajaxSendAfter:function (json) {
doc_wei's avatar
doc_wei 已提交
21 22 23

			treeSelectUtil.init({
				eleTree: layui.eleTree,
24
				elem: 'applyServiceClassName',
doc_wei's avatar
doc_wei 已提交
25
				url: reqBasePath + "queryServiceClassForTree",
26
				defaultId: json.bean.applyServiceClassName
doc_wei's avatar
doc_wei 已提交
27
			});
28 29 30 31 32 33 34 35 36

			matchingLanguage();
			form.render();
			form.on('submit(formEditBean)', function (data) {
				if (winui.verifyForm(data.elem)) {
					var params = {
						id: parent.rowId,
						flowName: $("#flowName").val(),
						modelKey: $("#modelKey").val(),
37
						applyServiceClassName: $("#applyServiceClassName").attr("applyServiceClassName")
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
					};

					AjaxPostUtil.request({url: flowableBasePath + "writeActFlowMation", params: params, type: 'json', method: 'POST', callback: function (json) {
						parent.layer.close(index);
						parent.refreshCode = '0';
					}});
				}
				return false;
			});
		}
	});

	$("body").on("click", "#cancle", function() {
		parent.layer.close(index);
	});
});