var EpActive = {};

EpActive.addSubmit = function() {
	var id = $("#id").val();
	var active = $("#active").val();
	var activeMsg = $("#activeMsg").val();
	var da = {"id":id, "active":active, "activeMsg":activeMsg};
    var ajax = new $ax(Feng.ctxPath + "/admin/enterprise/setActive", function(data){
        Feng.info(data.msg);
        if (data.code == 200) {
        	window.parent.Enterprise.table.refresh();
        	parent.layer.close(window.parent.Enterprise.layerIndex);
		}
    },function(data){
        Feng.error("操作失败!" + data.responseJSON.message + "!");
    });
    ajax.set(da);
    ajax.start();
};

$(function () {	
	var activeTemp = $("#activeTemp").val();
	if (activeTemp!=null && activeTemp!='') {
		$("#active").val(activeTemp);
	}
});