Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev
commit
9c69cef5d2
@ -0,0 +1,38 @@
|
||||
layui.define([ 'form', 'laydate', 'table','studentClientLinkApi'], function(exports) {
|
||||
var form = layui.form;
|
||||
var studentClientLinkApi = layui.studentClientLinkApi;
|
||||
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 studentClientLinkId = $("#addForm input[name='studentClientLinkId']").val();
|
||||
if(!$.isEmpty(studentClientLinkId)){
|
||||
studentClientLinkApi.updateStudentClientLink($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("更新成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}else{
|
||||
studentClientLinkApi.addStudentClientLink($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("添加成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#addButton-cancel").click(function(){
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
exports('add',view);
|
||||
});
|
Loading…
Reference in New Issue