List.cshtml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. //ComboGridOptions cgopCampus = new ComboGridOptions
  7. //{
  8. // TextField = "Name",
  9. // ValueField = "CampusID",
  10. // OnSelect = "QueryCampusComboGridList",
  11. // Name = "CampusDropdown",
  12. // ID = "CampusDropdown",
  13. // GridOptions = new DataGridOptions
  14. // {
  15. // Columns = new List<DataGridColumn>()
  16. // {
  17. // //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  18. // new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center }
  19. // },
  20. // IsCheckOnSelect = true,
  21. // DataSourceUrl = Url.Content("~/Campus/List"),
  22. // IsPagination = true,
  23. // IsShowRowNumbers = true,
  24. // IsSingleSelect = false,
  25. // }
  26. //};
  27. ComboGridOptions cgopCollege = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "CollegeID",
  31. OnSelect = "QueryCollegeComboGridList",
  32. Name = "CollegeDropdown",
  33. ID = "CollegeDropdown",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  39. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  40. },
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false,
  46. }
  47. };
  48. ComboGridOptions cgop = new ComboGridOptions
  49. {
  50. TextField = "Name",
  51. ValueField = "GrademajorID",
  52. OnSelect = "QueryComboGridList",
  53. Name = "ComboGridGrademajor",
  54. ID = "ComboGridGrademajor",
  55. GridOptions = new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. // new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center },
  60. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center }
  61. },
  62. IsCheckOnSelect = true,
  63. DataSourceUrl = Url.Content("~/Grademajor/List"),
  64. IsPagination = true,
  65. IsShowRowNumbers = true,
  66. IsSingleSelect = false,
  67. }
  68. };
  69. ComboGridOptions Csop = new ComboGridOptions
  70. {
  71. TextField = "CourseName",
  72. ValueField = "CoursematerialID",
  73. ID = "CourseDropdown",
  74. Name = "CourseDropdown",
  75. OnSelect = "QueryCourseDropdownList",
  76. GridOptions = new DataGridOptions
  77. {
  78. Columns = new List<DataGridColumn>()
  79. {
  80. // new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  81. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  82. },
  83. IsCheckOnSelect = true,
  84. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  85. IsPagination = true,
  86. IsShowRowNumbers = true,
  87. IsSingleSelect = false
  88. }
  89. };
  90. ComboGridOptions TMName = new ComboGridOptions
  91. {
  92. TextField = "TeachingMaterialName",
  93. ValueField = "TeachingMaterialPoolID",
  94. ID = "TeachingMaterialDropdown",
  95. Name = "TeachingMaterialDropdown",
  96. OnSelect = "reload",
  97. GridOptions = new DataGridOptions
  98. {
  99. Columns = new List<DataGridColumn>()
  100. {
  101. new BoundFieldColumn { FieldName="TeachingMaterialName",HeaderText="教材名称", Align=AlignStyle.Center },
  102. // new BoundFieldColumn { FieldName="TeachingMaterialCode",HeaderText="教材编号", Align=AlignStyle.Center }
  103. },
  104. IsCheckOnSelect = true,
  105. DataSourceUrl = Url.Content("~/TeachingMaterialPool/List"),
  106. IsPagination = true,
  107. IsShowRowNumbers = true,
  108. IsSingleSelect = false
  109. }
  110. };
  111. }
  112. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  113. @Html.Position()
  114. <div class="p_SearchTitle">
  115. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  116. 查询条件
  117. </div>
  118. </div>
  119. <form id="formQuery" method="post" action="@Url.Content("~/StudentsOrder/Excel")">
  120. @Html.Hidden("ExcelType")
  121. @Html.PositionCondition()
  122. <div class="search_keyword">
  123. <div class="search_input">
  124. <ul>
  125. @*<li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  126. <li class="sv">
  127. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  128. </li>*@
  129. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  130. <li class="sv">
  131. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), OnSelect = "QuerySchoolyearDropdownList", Name = "SchoolyearDropdown", SelectedValue =@ViewBag.SchoolYearID }, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  132. </li>
  133. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  134. <li class="sv">
  135. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  136. </li>
  137. <li class="sn" style="padding-left: 5px;">年级:</li>
  138. <li class="sv">
  139. @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "DictionarySchoolyear", Name = "DictionarySchoolyear", OnSelect = "QuerySchoolyearDictionaryList" }, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  140. </li>
  141. @*<li class="sn" style="padding-left: 5px;">年级:</li>
  142. <li class="sv">
  143. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Grade, new DropdownListOptions { Name = "DictionarySchoolyear", BindType = DropdownListBindType.SelectAll, OnSelect = "QuerySchoolyearDictionaryList" }, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  144. </li>*@
  145. <li class="sn" style="padding-left: 5px;">年级专业:</li>
  146. <li class="sv">
  147. @Html.ComboGrid(cgop, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  148. </li>
  149. </ul>
  150. <ul>
  151. <li class="sn" style="padding-left: 5px;">教材名称:</li>
  152. <li class="sv">
  153. @Html.ComboGrid(TMName, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  154. </li>
  155. <li class="sn" style="padding-left: 5px;">课程名称:</li>
  156. <li class="sv">
  157. @Html.ComboGrid(Csop, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  158. </li>
  159. <li class="sn" style="padding-left: 5px;">课程类型:</li>
  160. <li class="sv">
  161. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_CourseType, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, Name = "CourseTypeDropdown", ID = "CourseTypeDropdown", OnSelect = "QueryCourseTypeDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  162. </li>
  163. <li class="sn" style="padding-left: 5px;">是否征订:</li>
  164. <li class="sv">
  165. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, Name = "OrderedDropdown", ID = "OrderedDropdown", OnSelect = "QueryOrderedDropdownList", SelectedValue = 0 }, new Dictionary<string, string> { { "data-condition", "dgStudentsOrderList" } })
  166. </li>
  167. </ul>
  168. </div>
  169. </div>
  170. </form>
  171. <div class="p_title">
  172. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  173. 学生征订列表
  174. </div>
  175. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  176. </div>
  177. @Html.PositionBatchModify()
  178. <div class="search_list">
  179. @Html.DataGrid(new DataGridOptions
  180. {
  181. Columns = new List<DataGridColumn>()
  182. {
  183. new CheckBoxFieldColumn{ HeaderText="",Align=AlignStyle.Center, FieldName="SpecialtyPlanID" },
  184. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center ,CustomFormatFun="CodeSetColors",Width=0.06},
  185. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center ,CustomFormatFun="CollegeSetColors",Width=0.06},
  186. //new BoundFieldColumn { FieldName="Years", HeaderText="年级", Align=AlignStyle.Center,CustomFormatFun="YearsSetColors",Width=0.03},
  187. //new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center },
  188. //new BoundFieldColumn { FieldName="GrademajorCode", HeaderText="年级专业代码", Align=AlignStyle.Center },
  189. new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center ,CustomFormatFun="GrademajorSetColors", Width=0.1 },
  190. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center,CustomFormatFun="CourseCodeSetColors" ,Width=0.05},
  191. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center,CustomFormatFun="CourseSetColors", Width=0.1, OverflowLength=15},
  192. //new BoundFieldColumn { FieldName="CourseCategoryName", HeaderText="课程属性", Align=AlignStyle.Center },
  193. //new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center },
  194. //new BoundFieldColumn { FieldName="CourseQualityName", HeaderText="课程性质", Align=AlignStyle.Center },
  195. new BoundFieldColumn { FieldName="ClassNum", HeaderText="人数", Align=AlignStyle.Center,CustomFormatFun="ClassSetColors",Width=0.02 },
  196. new BoundFieldColumn { FieldName="OrderQty", HeaderText="征订数量", Align=AlignStyle.Center ,CustomFormatFun="QtySetColors",Width=0.04 },
  197. new BoundFieldColumn { FieldName="PreIncreaseQty", HeaderText="增加数量", Align=AlignStyle.Center, Width=0.04 },
  198. new BoundFieldColumn { FieldName="Count", HeaderText="总数量", Align=AlignStyle.Center, Width=0.03 },
  199. //new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center,CustomFormatFun="MaterialCodeSetColors", Width=0.04 },
  200. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center,CustomFormatFun="MaterialNameSetColors", Width=0.1, OverflowLength=15 },
  201. new BoundFieldColumn { FieldName="IsOrderedName", HeaderText="是否征订", Align=AlignStyle.Center,CustomFormatFun="IsOrderedSetColors",Width=0.04 },
  202. new BoundFieldColumn { FieldName="CoursematerialID", HeaderText="课程ID", IsHidden=true, Align=AlignStyle.Center },
  203. new BoundFieldColumn { FieldName="IsOrdered", HeaderText="是否征订", IsHidden=true, Align=AlignStyle.Center },
  204. // new BoundFieldColumn { FieldName="SpecialtyPlanID", HeaderText="专业计划ID",IsHidden=true, Align=AlignStyle.Center},
  205. //new BoundFieldColumn { FieldName="CreateTime", HeaderText="创建时间", Align=AlignStyle.Center,Formatter= Formatter.LongDate },
  206. },
  207. IsCheckOnSelect = true,
  208. DataSourceUrl = Url.Content("~/StudentsOrder/List"),
  209. ID = "dgStudentsOrderList",
  210. IsPagination = true,
  211. IsShowRowNumbers = true,
  212. IsSingleSelect = false
  213. })
  214. </div>
  215. </div>
  216. @section scripts{
  217. <script src="../../Scripts/Business/TeachingMaterial/StudentsOrder.js" type="text/javascript"></script>
  218. <script type="text/javascript">
  219. var nonSelect = "@DropdownList.SELECT_ALL";
  220. </script>
  221. <script type="text/javascript">
  222. //设置单元格颜色
  223. function CollegeSetColors(index, row, value) {
  224. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  225. return " <span style=\"color:red;\">" + value + "</span>";
  226. }
  227. else {
  228. return value
  229. }
  230. }
  231. function IsOrderedSetColors(index, row, value) {
  232. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  233. return " <span style=\"color:red;\">" + value + "</span>";
  234. }
  235. else {
  236. return value
  237. }
  238. }
  239. function MaterialNameSetColors(index, row, value) {
  240. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  241. return " <span style=\"color:red;\">" + value + "</span>";
  242. }
  243. else {
  244. return value
  245. }
  246. }
  247. function MaterialCodeSetColors(index, row, value) {
  248. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  249. return " <span style=\"color:red;\">" + value + "</span>";
  250. }
  251. else {
  252. return value
  253. }
  254. }
  255. function CourseSetColors(index, row, value) {
  256. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  257. return " <span style=\"color:red;\">" + value + "</span>";
  258. }
  259. else {
  260. return value
  261. }
  262. }
  263. function CodeSetColors(index, row, value) {
  264. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  265. return " <span style=\"color:red;\">" + value + "</span>";
  266. }
  267. else {
  268. return value
  269. }
  270. }
  271. function YearsSetColors(index, row, value) {
  272. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  273. return " <span style=\"color:red;\">" + value + "</span>";
  274. }
  275. else {
  276. return value
  277. }
  278. }
  279. function GrademajorSetColors(index, row, value) {
  280. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  281. return " <span style=\"color:red;\">" + value + "</span>";
  282. }
  283. else {
  284. return value
  285. }
  286. }
  287. function CourseCodeSetColors(index, row, value) {
  288. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  289. return " <span style=\"color:red;\">" + value + "</span>";
  290. }
  291. else {
  292. return value
  293. }
  294. }
  295. function ClassSetColors(index, row, value) {
  296. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  297. return " <span style=\"color:red;\">" + value + "</span>";
  298. }
  299. else {
  300. return value
  301. }
  302. }
  303. function QtySetColors(index, row, value) {
  304. if (row.TeachingMaterialCode == null || row.TeachingMaterialCode == undefined || row.TeachingMaterialCode == "") {
  305. return " <span style=\"color:red;\">" + value + "</span>";
  306. }
  307. else {
  308. return value
  309. }
  310. }
  311. </script>}