EditTeachingMaterialPool.cshtml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @using EMIS.ViewModel;
  4. @{
  5. ViewBag.Title = "EditTeachingMaterialPool";
  6. ComboGridOptions Psop = new ComboGridOptions
  7. {
  8. TextField = "UnitName",
  9. ValueField = "PublishID",
  10. ID = "PublishDropdown",
  11. Name = "PublishDropdown",
  12. OnSelect = "QueryPublishDropdownList",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="UnitCode", HeaderText="单位编号", Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="UnitName", HeaderText="出版单位", Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Publisher/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false
  25. }
  26. };
  27. string IsOrdered = ViewData["IsOrdered"].ToString();
  28. }
  29. @section scripts{
  30. <script src="../../Scripts/Business/TeachingMaterial/TeachingMaterialPool.js" type="text/javascript"></script>
  31. <style type="text/css">
  32. .p_SearchTitle {
  33. display: none;
  34. }
  35. </style>
  36. <script type="text/javascript">
  37. $(document).ready(function () {
  38. var JsonDate = top.$("#@(Request["WindowID"])").data("inputData");
  39. $("#hidStudentsOrderIDs").val(JsonDate.StudentsOrderIDs);
  40. $("#hidCoursematerialID").val(JsonDate.CoursematerialID);
  41. $("#hidSpecialtyPlanIDs").val(JsonDate.SpecialtyPlanID);
  42. reload();
  43. });
  44. //确定指定教材
  45. function Students_SelectTeachingMaterialPool() {
  46. var studentsOrderIDs = $("#hidStudentsOrderIDs").val();
  47. var specialtyPlanIDs = $("#hidSpecialtyPlanIDs").val();
  48. var d = validChoose().join(',');
  49. if (d == "") {
  50. $.messager.alert("系统提示", "请选择您要指定的教材信息。");
  51. return;
  52. }
  53. //if (d.length > 1) {
  54. // $.messager.alert("系统提示", "只能指定一个教材。");
  55. // return;
  56. //}
  57. $.messager.confirm("系统提示", "是否确定当前年级专业修习的课程使用此本教材?", function (r) {
  58. if (r) {
  59. $.post('/StudentsOrder/EditTeachingMaterialPool', { studentsOrderID: studentsOrderIDs, teachingMaterialPoolID: d, specialtyPlanID: specialtyPlanIDs }, function (data) {
  60. if (data == "指定成功") {
  61. $.messager.alert("系统提示", "指定成功!", "info", function () {
  62. parent.$("#index_center_tabs").tabs('getSelected').find('iframe')[0].contentWindow.reload();
  63. top.$('#@(Request["WindowID"])').dialog('close');
  64. });
  65. } else {
  66. $.messager.alert("系统提示", data);
  67. }
  68. });
  69. }
  70. });
  71. }
  72. </script>
  73. }
  74. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  75. @Html.Hidden("hidStudentsOrderIDs")
  76. @Html.Hidden("hidSpecialtyPlanIDs")
  77. <div class="p_title">
  78. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  79. 待指定教材列表</div>*@
  80. @if (IsOrdered != "true")//如果已经提交、那么删除、增加按钮不显示
  81. {
  82. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("EditTeachingMaterialPool")</div>
  83. }
  84. </div>
  85. <form id="formQuery" method="post">
  86. @* <div class="p_SearchTitle">
  87. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  88. 查询条件</div>
  89. </div>*@
  90. @* @Html.PositionCondition()*@
  91. <div class="search_keyword">
  92. <div class="search_input">
  93. <ul>
  94. <li class="sn" style="padding-left: 5px;">出版单位:</li>
  95. <li class="sv">
  96. @Html.ComboGrid(Psop, new Dictionary<string, string> { { "data-condition", "dgTeachingMaterialPoolList" } })
  97. @Html.Hidden("hidCoursematerialID", "", new Dictionary<string, object> { { "data-condition", "dgTeachingMaterialPoolList" } })
  98. </li>
  99. <li class="sn" style="padding-left: 5px;">ISBN:</li>
  100. <li class="sv">
  101. @Html.TextBox(new TextBoxOptions { ID = "txtISBN", Name = "txtISBN" }, new Dictionary<string, string> { { "data-condition", "dgTeachingMaterialPoolList" } })
  102. </li>
  103. <li class="sn" style="padding-left: 5px;">教材名称:</li>
  104. <li class="sv">
  105. @Html.TextBox(new TextBoxOptions { ID = "TeachingMaterialName", Name = "TeachingMaterialName" }, new Dictionary<string, string> { { "data-condition", "dgTeachingMaterialPoolList" } })
  106. </li>
  107. <li class="sn" style="padding-left: 5px;"><a href="#this" class="easyui-linkbutton" onclick="reload()">查询</a></li>
  108. </ul>
  109. <ul>
  110. <li class="sn" style="padding-left: 5px;">
  111. 仅显示课程对应教材:
  112. </li>
  113. <li class="sv">
  114. @Html.CheckBox("isCheck", true, new Dictionary<string, object> { { "onclick", "checkBox()" }, { "data-condition", "dgTeachingMaterialPoolList" } })
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. </form>
  120. <div class="search_list">
  121. @Html.DataGrid(new DataGridOptions
  122. {
  123. Columns = new List<DataGridColumn>()
  124. {
  125. new CheckBoxFieldColumn{ HeaderText="", FieldName="TeachingMaterialPoolID" ,IsFrozenColumn=true},
  126. new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center },
  127. new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center },
  128. new BoundFieldColumn { FieldName="CoursematerialCode", HeaderText="课程代码", Align=AlignStyle.Center },
  129. new BoundFieldColumn { FieldName="CourseLevelName", HeaderText="课程级别", Align=AlignStyle.Center },
  130. new BoundFieldColumn { FieldName="CourseScienceName", HeaderText="课程科类", Align=AlignStyle.Center },
  131. new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center },
  132. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center },
  133. new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center},
  134. new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center },
  135. new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center },
  136. new BoundFieldColumn { FieldName="Price", HeaderText="单价", Align=AlignStyle.Center }
  137. },
  138. IsFitColumns = false,
  139. IsCheckOnSelect = true,
  140. IsPostBack = true,
  141. DataSourceUrl = Url.Content("~/TeachingMaterialPool/GetTeachingMaterialPoolIsEffectiveList"),
  142. ID = "dgTeachingMaterialPoolList",
  143. IsPagination = true,
  144. IsShowRowNumbers = true,
  145. IsSingleSelect = false,
  146. IsAutoLoad = false
  147. })
  148. </div>
  149. </div>