123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
-
- Guid? RetakePlanID = new Guid(Request["RetakePlanID"]);
- }
- <style type="text/css">
- #studentDetail
- {
- width: 100%;
- border: 0px none;
- }
-
- #studentDetail tr
- {
- min-height: 30px;
- }
- </style>
- @section scripts{
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- //已开班
- var CreatedStatus = "@((int)EMIS.ViewModel.ER_RetakePlanStatus.Generated)";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RetakePlanStudentID);
- });
- return d;
- }
- //弹出添加名单页面
- function RetakePlan_AddStudent() {
- if ('@(Request["Status"])' == CreatedStatus) {
- $.messager.alert("系统提示", "已开班状态的信息无法添加。");
- return;
- }
- $.popupTopWindow('添加名单', CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanTask/StudentSelect?FromMNU='
- + mnu + "&RetakePlanID=" + '@RetakePlanID', 850, 500, reload);
- }
- //确定添加名单
- function Addstudents_Confirm(studentList) {
- if (studentList == null)
- return;
- var studentViewList = $("#dgStudentList").cmsXDataTable("getRows");
- $.each(studentList, function (index, value) {
- if ($.grep(studentViewList, function (row, index) { return value.UserID == row.UserID; }).length == 0) {
- studentViewList.push({
- UserID: value.UserID,
- LoginID: value.StaffCode,
- UserName: value.UserName,
- SexName: value.SexName,
- Years: value.Years,
- GrademajorName: value.GrademajorName,
- ClassmajorName: value.ClassmajorName,
- InSchoolStatusName: value.InSchoolStatusName,
- StudentStatusName: value.StudentStatusName
- });
- }
- });
- $("#dgStudentList").cmsXDataTable("loadData", { rows: studentViewList, total: studentViewList.length });
- }
- //删除重修计划名单
- function RetakePlan_DelStudent() {
- var msg = "";
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- if ('@(Request["Status"])' == CreatedStatus) {
- $.messager.alert("系统提示", "已开班状态的信息无法删除。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanTask/IsExistsApplyStudentByRetakePlanStudentID', { retakePlanStudentIDs: d }, function (data) {
- if (data.IsSuccess) {
- if (data.Data) {
- $.messager.defaults = { ok: "继续删除", cancel: "取消" };
- $.messager.confirm("选择提示", "检测到要删除的信息中存在已报名重修的学生名单,是否继续删除?", function (r) {
- if (r) {
- Delete(d);
- }
- else {
- return;
- }
- });
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- }
- else {
- Delete(d);
- }
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //确定删除重修计划名单
- function Delete(d) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanTask/DeleteStudent', { retakePlanStudentIDs: d }, function (data) {
- if (data.IsSuccess = true) {
- $("#dgStudentList").cmsXDataTable('load');
- }
- $.messager.alert("系统提示", data.Message);
- });
- }
- //Excel导出
- function RetakePlan_ExportStudent() {
- $("#formQuery").submit();
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- <div class="p_title">
- @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 重修计划名单</div>*@
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- @Html.ContextMenuBar("StuDetail")</div>
- </div>
- <div class="search_list">
- <table cellpadding="0" cellspacing="0" id="studentDetail">
- <tr>
- <td>
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn { HeaderText="", FieldName="RetakePlanStudentID" },
- new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.02 },
- new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
- new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
- new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.08 },
- new BoundFieldColumn { FieldName="CourseTypeDesc", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05 },
- new BoundFieldColumn { FieldName="CourseCredit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02 },
- new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
- //new BoundFieldColumn { FieldName="SchoolyearNumDesc", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="StarttermDesc", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="ApplyStatusName", HeaderText="报名状态", Align=AlignStyle.Center, Width=0.04 }
- },
- PageSize = 30,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/RetakePlanTask/StudentDetail?RetakePlanID=" + RetakePlanID),
- IsPostBack = true,
- ID = "dgStudentList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- MaxHeight = 400
- })
- </td>
- </tr>
- </table>
- </div>
- }
- <form id="formQuery" method="post" action="@Url.Content("~/RetakePlanTask/StudentDetail_Excel?RetakePlanID=" + RetakePlanID)">
- </form>
- </div>
|