layui.define([ 'jquery','form', 'laydate', 'table', 'channelApi'], function(exports) {
	var jquery = layui.jquery;
	var form = layui.form;
	var laydate = layui.laydate;
	var formSelects = layui.formSelects;
	var channelApi = layui.channelApi;

	var index = layui.index;
	var view = {
        init:function() {
            Lib.initGenrealForm($("#addForm"),form);
            $('#closeButton').click(function(){
                Lib.closeFrame();
            });

            this.initSubmit();
        },

        initSubmit:function(){
        },

	};


    form.on('submit(submitButton)', function (data) {
        channelApi.add($('#addForm'), function(data){
            Common.info("添加成功");
            Lib.closeFrame();
            parent.window.dataReload();
        });
    });



	 exports('add',view);

});