排课列

beetlsql3-dev
姚丹ab 2 years ago
parent 0a431ccfb6
commit c5fc6c5f9f

@ -138,60 +138,6 @@ var Common = {
error: function (info) {
Common.openConfirm(info)
},
post: function (url, paras, next) {
$.ajax({
url: Common.ctxPath + url,
type: "POST",
data: paras,
success: function (rsp) {
if (rsp.code != 0) {
Common.error(rsp.msg);
} else {
//成功
if (next != null) {
next(rsp.data);
} else {
Common.success(rsp.responseJSON.msg);
}
}
},
error: function (rsp) {
if(rsp.responseJSON && rsp.responseJSON.msg)
Common.error(rsp.responseJSON.msg);
else
Common.error('服务器错误,请联系管理员');
}
})
},
postJSON: function (url, paras, next) {
$.ajax({
url: Common.ctxPath + url,
type: "POST",
contentType:'application/json;charset=utf-8',
dataType:'json',
data: paras,
success: function (rsp) {
if (rsp.code != 0) {
Common.error(rsp.msg);
} else {
//成功
if (next != null) {
next(rsp.data);
} else {
Common.success(rsp.msg || rsp.responseJSON.msg);
}
}
},
error: function (rsp) {
if(rsp.responseJSON && rsp.responseJSON.msg)
Common.error(rsp.responseJSON.msg);
else
Common.error('服务器错误,请联系管理员');
}
})
},
downLoad: function (url, data, method) {
if(!method) {
method = 'POST';
@ -344,7 +290,66 @@ var Common = {
}
}
}, postAjax: function (url, paras) {
},
post: function (url, paras, next) {
$.ajax({
url: Common.ctxPath + url,
type: "POST",
data: paras,
success: function (rsp) {
if (rsp.code != 0) {
Common.error(rsp.msg);
} else {
//成功
if (next != null) {
next(rsp.data);
} else {
Common.success(rsp.responseJSON.msg);
}
}
},
error: function (rsp) {
if(rsp.responseJSON && rsp.responseJSON.msg)
Common.error(rsp.responseJSON.msg);
else
Common.error('服务器错误,请联系管理员');
}
})
},
postJSON: function (url, paras, next) {
var r = "";
$.ajax({
url: Common.ctxPath + url,
type: "POST",
contentType:'application/json;charset=utf-8',
dataType:'json',
data: paras,
async: false,
success: function (rsp) {
r = rsp;
if (rsp.code != 0) {
Common.error(rsp.msg);
} else {
//成功
if (next != null) {
next(rsp.data);
} else {
Common.success(rsp.msg || rsp.responseJSON.msg);
}
}
},
error: function (rsp) {
r = rsp.responseJSON;
if(rsp.responseJSON && rsp.responseJSON.msg)
Common.error(rsp.responseJSON.msg);
else
Common.error('服务器错误,请联系管理员');
}
})
return r;
},
postAjax: function (url, paras) {
var r = "";
$.ajax({
url: Common.ctxPath + url,
@ -362,7 +367,8 @@ var Common = {
}
});
return r;
},getAjax: function (url, paras) {
},
getAjax: function (url, paras) {
var r = "";
$.ajax({
url: Common.ctxPath + url,
@ -380,7 +386,8 @@ var Common = {
}
});
return r;
},stateMatching:function (state,sign){ //state状态-1作废 0计划换线 1待换/护线 2换/护线中 3待检验 4检验中 5样件通过 6:检验不通过 7待填单 sign类型1换线 2护线
},
stateMatching:function (state,sign){ //state状态-1作废 0计划换线 1待换/护线 2换/护线中 3待检验 4检验中 5样件通过 6:检验不通过 7待填单 sign类型1换线 2护线
var text = sign == 1?"换线":"护线";
return state == -1 ? text + "作废" :
state == 0 ? "计划" + text :

@ -36,6 +36,7 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
color: '#1e9fff',
},*/
});
/*反显开课星期*/
var weekDetail = $('#weekDetail').data('value');
if(!$.isEmpty(weekDetail)){
@ -43,8 +44,12 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
$("input:checkbox[value='"+value+"']").attr('checked','true');
})
}
if(!$.isEmpty(teacherOpenCourseScheduleSessionId)){
$('#kkJieciTable').data('value')
var kkJieciTableValue = $('#kkJieciTable').data('value');
if (!$.isEmpty(kkJieciTableValue)) {
//kkJieciTableData
console.log(kkJieciTableValue)
console.log(Object.values(kkJieciTableValue))
}
form.render();//刷新表单
@ -431,20 +436,12 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
url = "/jlw/teacherOpenCourseScheduleSession/editSession.json";
}
var ret = Common.postJSON(url,JSON.stringify(param));
layer.msg(ret.code == 0 ? "保存成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
layer.closeAll("loading");
if (ret.code == 0) {
parent.Lib.tableRefresh();
Lib.closeFrame();
}
});
if (ret.code == 0) {
parent.Lib.tableRefresh();
Lib.closeFrame();
}
});
$("#addButton-cancel").click(function(){
Lib.closeFrame();
});

@ -34,9 +34,9 @@
<label class="layui-form-label">开课课程</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline'
type="teacher_open_course_merge_course_info.course_info_name.course_info_status=1,course_info_type =1"
id="teacherOpenCourseId" name="teacherOpenCourseId"
value="${teacherOpenCourseScheduleSession.teacherOpenCourseId}"/>
type="teacher_open_course.teacher_open_course_title.1=1"
id="teacherOpenCourseId" name="teacherOpenCourseId"
value="${teacherOpenCourseScheduleSession.teacherOpenCourseId}"/>
</div>
</div>
</div>
@ -47,8 +47,8 @@
<label class="layui-form-label">上课教师</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="teacher.teacher_name.teacher_status=1"
id="teacherId" name="teacherId"
value="${teacherOpenCourseScheduleSession.teacherId}" layVerify=""/>
id="teacherId" name="teacherId"
value="${teacherOpenCourseScheduleSession.teacherId}" layVerify=""/>
</div>
</div>
</div>
@ -81,7 +81,7 @@
<label class="layui-form-label">开课节次</label>
<div class="layui-inline" style="width: 50%;">
<table id="kkJieciTable" class="layui-table" name="sessionTagList" lay-filter="kkJieciTable"
value='${teacherOpenCourseScheduleSession.teacherOpenCourseScheduleSessionClassList}'></table>
data-value='${teacherOpenCourseScheduleSession.teacherOpenCourseScheduleSessionClassList}'></table>
</div>
<div class="layui-inline">
<button type="button" class="layui-btn layui-btn-normal" id="resetClick"><i class="layui-icon">&#xe669;</i>重置</button>

Loading…
Cancel
Save