EducationMissionConjunctionList.cshtml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "Edit";
  5. ComboGridOptions cgop = new ComboGridOptions
  6. {
  7. TextField = "ClassName",
  8. ValueField = "EducationMissionID",
  9. GridOptions = new DataGridOptions
  10. {
  11. Columns = new List<DataGridColumn>()
  12. {
  13. new BoundFieldColumn { FieldName="ClassName", HeaderText="班级名称", Align=AlignStyle.Center }
  14. },
  15. IsCheckOnSelect = true,
  16. DataSourceUrl = Url.Content("~/EducationMissionClass/EducationMissionClassConjunctionList"),
  17. IsPagination = true,
  18. IsShowRowNumbers = true,
  19. IsSingleSelect = false,
  20. }
  21. };
  22. ComboGridOptions cgopCoursematerial = new ComboGridOptions
  23. {
  24. TextField = "CourseName",
  25. ValueField = "CoursematerialID",
  26. Name = "ComboGridCoursematerial",
  27. GridOptions = new DataGridOptions
  28. {
  29. Columns = new List<DataGridColumn>()
  30. {
  31. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  32. },
  33. IsCheckOnSelect = true,
  34. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  35. IsPagination = true,
  36. IsShowRowNumbers = true,
  37. IsSingleSelect = false,
  38. }
  39. };
  40. ComboGridOptions cgopCollege = new ComboGridOptions
  41. {
  42. TextField = "Name",
  43. ValueField = "CollegeID",
  44. Name = "ComboGridCollege",
  45. GridOptions = new DataGridOptions
  46. {
  47. Columns = new List<DataGridColumn>()
  48. {
  49. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  50. },
  51. IsCheckOnSelect = true,
  52. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false,
  56. }
  57. };
  58. }
  59. @section scripts{
  60. <script src="~/Scripts/Business/EducationManage/EducationMissionConjunctionList.js" type="text/javascript"></script>
  61. <script type="text/javascript">
  62. function EducationMissionConjunction_Confirm() {
  63. var data = validChoose();
  64. var teachingModeIDArr = $.map(data, function (v) { return v.TeachingModeIDs });
  65. var coursematerialIDArr = $.map(data, function (v) { return v.CoursematerialID });
  66. var schoolyearIDArr = $.map(data, function (v) { return v.SchoolyearID });
  67. for (var i = 0; i < data.length; i++) {
  68. if (data[i].TeachingModeIDs.toString() != data[0].TeachingModeIDs.toString()) {
  69. $.messager.alert("系统提示", "选择的合班数据存在授课方式不一致,请检查!");
  70. return;
  71. }
  72. }
  73. var teachingModeNewArry = $.unique(teachingModeIDArr);
  74. var coursematerialIDNewArry = $.unique(coursematerialIDArr);
  75. var schoolyearNewArry = $.unique(schoolyearIDArr);
  76. if (coursematerialIDNewArry.length > 1) {
  77. $.messager.alert("系统提示", "选择的合班数据存在课程名称或课程代码不一致,请检查!");
  78. return;
  79. }
  80. if (schoolyearNewArry.length > 1) {
  81. $.messager.alert("系统提示", "选择的合班数据存在学年学期不一致,请检查!");
  82. return;
  83. }
  84. top.$("#@(Request["WindowID"])").data("resultData", validChoose());
  85. top.$("#@(Request["WindowID"])").dialog("close");
  86. }
  87. </script>
  88. }
  89. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  90. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  91. {
  92. <div class="p_title">
  93. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  94. 教学任务列表
  95. </div>
  96. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  97. <div class="current_navbar toolbar">
  98. <div class="func_info">
  99. <a class="easyui-linkbutton" href="javascript:EducationMissionConjunction_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  100. onfocus="this.blur()">选中</a>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="search_keyword" style="margin: 0px">
  106. <div class="search_input">
  107. <ul>
  108. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  109. <li class="sv">
  110. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), Name = "SchoolyearDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgEducationMissionConjunctionList" } })
  111. </li>
  112. <li class="sn" style="padding-left: 5px;">任务班名称:</li>
  113. <li class="sv">
  114. @Html.TextBox(new TextBoxOptions { Name = "TextClassName" }, new Dictionary<string, string> { { "data-condition", "dgEducationMissionConjunctionList" } })
  115. </li>
  116. <li class="sn" style="padding-left: 5px;">课程名称:</li>
  117. <li class="sv">
  118. @Html.ComboGrid(cgopCoursematerial, new Dictionary<string, string> { { "data-condition", "dgEducationMissionConjunctionList" } })
  119. </li>
  120. </ul>
  121. <ul>
  122. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  123. <li class="sv">
  124. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgEducationMissionConjunctionList" } })
  125. </li>
  126. <li class="sn" style="padding-left: 20px;"><a href="javascript:void(0)" class="easyui-linkbutton"
  127. data-options="iconCls:'icon-search'" onclick="reload();">查询</a></li>
  128. </ul>
  129. </div>
  130. </div>
  131. <div class="search_list">
  132. @Html.DataGrid(new DataGridOptions
  133. {
  134. Columns = new List<DataGridColumn>()
  135. {
  136. new CheckBoxFieldColumn{ HeaderText="", FieldName="EducationMissionID" },
  137. new BoundFieldColumn { FieldName="SchoolYearCode", HeaderText="学年学期", Align=AlignStyle.Center },
  138. new BoundFieldColumn { FieldName="ClassName", HeaderText="班级名称", Align=AlignStyle.Center, OverflowLength = 30 },
  139. new BoundFieldColumn { FieldName="CoursematerialID", HeaderText="课程ID",IsHidden=true, Align=AlignStyle.Center },
  140. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center },
  141. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  142. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  143. new BoundFieldColumn { FieldName="Population", HeaderText="班级人数", Align=AlignStyle.Center },
  144. new BoundFieldColumn { FieldName="TeachingModeNames", HeaderText="授课方式", Align=AlignStyle.Center }
  145. },
  146. IsCheckOnSelect = true,
  147. DataSourceUrl = Url.Content("~/EducationMissionClass/EducationMissionConjunctionList"),
  148. ID = "dgEducationMissionConjunctionList",
  149. IsPagination = true,
  150. IsShowRowNumbers = true,
  151. IsSingleSelect = false
  152. })
  153. </div>
  154. }
  155. </div>