You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.6 KiB
JavaScript
39 lines
1.6 KiB
JavaScript
layui.define([ 'form', 'laydate', 'table','teacherOpenCourseMergeStudentApi'], function(exports) {
|
|
var form = layui.form;
|
|
var teacherOpenCourseMergeStudentApi = layui.teacherOpenCourseMergeStudentApi;
|
|
var index = layui.index;
|
|
var view = {
|
|
init:function(){
|
|
Lib.initGenrealForm($("#addForm"),form);
|
|
this.initSubmit();
|
|
},
|
|
initSubmit:function(){
|
|
$("#addButton").click(function(){
|
|
form.on('submit(form)', function(){
|
|
var teacherOpenCourseSchoolClassMergeStudentId = $("#addForm input[name='teacherOpenCourseSchoolClassMergeStudentId']").val();
|
|
if(!$.isEmpty(teacherOpenCourseSchoolClassMergeStudentId)){
|
|
teacherOpenCourseMergeStudentApi.updateTeacherOpenCourseMergeStudent($('#addForm'),function(){
|
|
parent.window.dataReload();
|
|
Common.info("更新成功");
|
|
Lib.closeFrame();
|
|
});
|
|
}else{
|
|
teacherOpenCourseMergeStudentApi.addTeacherOpenCourseMergeStudent($('#addForm'),function(){
|
|
parent.window.dataReload();
|
|
Common.info("添加成功");
|
|
Lib.closeFrame();
|
|
});
|
|
}
|
|
|
|
});
|
|
});
|
|
|
|
$("#addButton-cancel").click(function(){
|
|
Lib.closeFrame();
|
|
});
|
|
}
|
|
|
|
}
|
|
exports('add',view);
|
|
});
|