List.cshtml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "List";
  5. ComboGridOptions Csop = new ComboGridOptions
  6. {
  7. TextField = "CourseName",
  8. ValueField = "CoursematerialID",
  9. ID = "CourseDropdown",
  10. Name = "CourseDropdown",
  11. OnSelect = "QueryCourseDropdownList",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. //new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  17. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. ComboGridOptions Library = new ComboGridOptions
  27. {
  28. TextField = "LibraryName",
  29. ValueField = "LibraryID",
  30. ID = "LibraryDropdown",
  31. Name = "LibraryDropdown",
  32. OnSelect = "QueryLibraryDropdownList",
  33. GridOptions = new DataGridOptions
  34. {
  35. Columns = new List<DataGridColumn>()
  36. {
  37. new BoundFieldColumn { FieldName="LibraryName",HeaderText="书库名称", Align=AlignStyle.Center }
  38. },
  39. IsCheckOnSelect = true,
  40. DataSourceUrl = Url.Content("~/Library/List"),
  41. IsPagination = true,
  42. IsShowRowNumbers = true,
  43. IsSingleSelect = false
  44. }
  45. };
  46. ComboGridOptions Psop = new ComboGridOptions
  47. {
  48. TextField = "UnitName",
  49. ValueField = "PublishID",
  50. ID = "PublishDropdown",
  51. Name = "PublishDropdown",
  52. OnSelect = "QueryPublishDropdownList",
  53. GridOptions = new DataGridOptions
  54. {
  55. Columns = new List<DataGridColumn>()
  56. {
  57. // new BoundFieldColumn { FieldName="UnitCode", HeaderText="单位编号", Align=AlignStyle.Center },
  58. new BoundFieldColumn { FieldName="UnitName", HeaderText="出版单位", Align=AlignStyle.Center }
  59. },
  60. IsCheckOnSelect = true,
  61. DataSourceUrl = Url.Content("~/Publisher/List"),
  62. IsPagination = true,
  63. IsShowRowNumbers = true,
  64. IsSingleSelect = false
  65. }
  66. };
  67. ComboGridOptions MaterialCode = new ComboGridOptions
  68. {
  69. TextField = "TeachingMaterialCode",
  70. ValueField = "TeachingMaterialPoolID",
  71. ID = "TeachingMaterialDropdown",
  72. Name = "TeachingMaterialDropdown",
  73. OnSelect = "QueryTeachingMaterialDropdownList",
  74. GridOptions = new DataGridOptions
  75. {
  76. Columns = new List<DataGridColumn>()
  77. {
  78. // new BoundFieldColumn { FieldName="TeachingMaterialCode",HeaderText="教材编号", Align=AlignStyle.Center },
  79. new BoundFieldColumn { FieldName="TeachingMaterialName",HeaderText="教材名称", Align=AlignStyle.Center }
  80. },
  81. IsCheckOnSelect = true,
  82. DataSourceUrl = Url.Content("~/TeachingMaterialPool/List"),
  83. IsPagination = true,
  84. IsShowRowNumbers = true,
  85. IsSingleSelect = false
  86. }
  87. };
  88. ComboGridOptions MaterialName = new ComboGridOptions
  89. {
  90. TextField = "TeachingMaterialName",
  91. ValueField = "TeachingMaterialPoolID",
  92. ID = "TeachingMaterialDropdown",
  93. Name = "TeachingMaterialDropdown",
  94. OnSelect = "QueryTeachingMaterialDropdownList",
  95. GridOptions = new DataGridOptions
  96. {
  97. Columns = new List<DataGridColumn>()
  98. {
  99. //new BoundFieldColumn { FieldName="TeachingMaterialCode",HeaderText="教材编号", Align=AlignStyle.Center },
  100. new BoundFieldColumn { FieldName="TeachingMaterialName",HeaderText="教材名称", Align=AlignStyle.Center }
  101. },
  102. IsCheckOnSelect = true,
  103. DataSourceUrl = Url.Content("~/TeachingMaterialPool/List"),
  104. IsPagination = true,
  105. IsShowRowNumbers = true,
  106. IsSingleSelect = false
  107. }
  108. };
  109. }
  110. @section scripts{
  111. <script src="../../Scripts/Business/TeachingMaterial/TeachingMateriaInventory.js"
  112. type="text/javascript"></script>
  113. <script type="text/javascript">
  114. //设置单元格颜色
  115. function SetColors(index, row, value) {
  116. if (row.PresentInventory <= row.MinInventory) {
  117. return " <span style=\"color:red;\">" + value + "</span>";
  118. } else {
  119. return value;
  120. }
  121. }
  122. </script>
  123. }
  124. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  125. @Html.Position()
  126. <div class="p_SearchTitle">
  127. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  128. 查询条件
  129. </div>
  130. </div>
  131. <form id="formQuery" method="post" action="@Url.Content("~/TeachingMateriaInventory/Excel")">
  132. @Html.PositionCondition()
  133. <div class="search_keyword">
  134. <div class="search_input">
  135. <ul>
  136. <li class="sn" style="padding-left: 5px;">教材名称:</li>
  137. <li class="sv">
  138. @Html.ComboGrid(MaterialName, new Dictionary<string, string> { { "data-condition", "dgTeachingMateriaInventoryList" } })
  139. </li>
  140. <li class="sn" style="padding-left: 5px;">教材类型:</li>
  141. <li class="sv">
  142. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_TeachingMaterialType, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, Name = "TeachingMaterialTypeDropdown", ID = "TeachingMaterialTypeDropdown", OnSelect = "QueryTeachingMaterialTypeDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgTeachingMateriaInventoryList" } })
  143. </li>
  144. <li class="sn" style="padding-left: 5px;">出版单位:</li>
  145. <li class="sv">
  146. @Html.ComboGrid(Psop, new Dictionary<string, string> { { "data-condition", "dgTeachingMateriaInventoryList" } })
  147. </li>
  148. <li class="sn" style="padding-left: 5px;">是否过期:</li>
  149. <li class="sv">
  150. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, Name = "LateDropdown", ID = "LateDropdown", OnSelect = "QueryLateDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgTeachingMateriaInventoryList" } })
  151. </li>
  152. </ul>
  153. </div>
  154. </div>
  155. </form>
  156. <div class="p_title">
  157. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  158. 教材库存列表
  159. </div>
  160. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  161. </div>
  162. <div class="search_list">
  163. @Html.DataGrid(new DataGridOptions
  164. {
  165. Columns = new List<DataGridColumn>()
  166. {
  167. new CheckBoxFieldColumn{ HeaderText="", FieldName="TeachingMaterialPoolID", Align=AlignStyle.Center },
  168. //new BoundFieldColumn { FieldName="LibraryName", HeaderText="书库名称", Align=AlignStyle.Center },
  169. new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center,Width=0.04},
  170. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center, Width=0.1 },
  171. //new BoundFieldColumn { FieldName="CoursematerialCode", HeaderText="课程代码", Align=AlignStyle.Center,Width=0.05 },
  172. //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 },
  173. new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center, Width=0.1 },
  174. new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center, Width=0.08 },
  175. new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.08 },
  176. new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center, Width=0.06, OverflowLength=10 },
  177. new BoundFieldColumn { FieldName="Price", HeaderText="单价(¥)", Align=AlignStyle.Center,Width=0.04},
  178. new BoundFieldColumn { FieldName="PresentInventory", HeaderText="当前库存量", Align=AlignStyle.Center,Width=0.05},
  179. new BoundFieldColumn { FieldName="Total", HeaderText="码洋(¥)", Align=AlignStyle.Center,Width=0.04 },
  180. new BoundFieldColumn { FieldName="MinInventory", HeaderText="最小库存量", Align=AlignStyle.Center , CustomFormatFun="SetColors",Width=0.05},
  181. new BoundFieldColumn { FieldName="IsLateName", HeaderText="是否过期", Align=AlignStyle.Center,Width=0.04 },
  182. new BoundFieldColumn { FieldName="ModifyTime", HeaderText="最近响应时间",Align=AlignStyle.Center, Width=0.08, Formatter= Formatter.OnlyYearMonthDay }
  183. //new BoundFieldColumn { FieldName="Desc", HeaderText="备注", Align=AlignStyle.Center }
  184. },
  185. IsCheckOnSelect = true,
  186. DataSourceUrl = Url.Content("~/TeachingMateriaInventory/List"),
  187. ID = "dgTeachingMateriaInventoryList",
  188. IsPagination = true,
  189. IsShowRowNumbers = true,
  190. IsSingleSelect = false
  191. })
  192. </div>
  193. </div>