Create.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. @model EMIS.ViewModel.StudentManage.StudentRegister.StudentReportView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @{
  6. ViewBag.Title = "Create";
  7. //校区
  8. ComboGridOptions cgopCampus = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CampusID",
  12. ID = "CampusDropdown",
  13. Name = "CampusDropdown",
  14. OnSelect = "queryCampus",
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.1 },
  20. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.12 }
  21. },
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/Campus/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false,
  27. }
  28. };
  29. //院系所
  30. ComboGridOptions cgopCollege = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "CollegeID",
  34. ID = "CollegeDropdown",
  35. Name = "CollegeDropdown",
  36. OnSelect = "queryCollege",
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  42. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  43. },
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false,
  49. }
  50. };
  51. //年级
  52. ComboGridOptions cgopGrade = new ComboGridOptions
  53. {
  54. TextField = "GradeID",
  55. ValueField = "GradeID",
  56. ID = "DictionaryGrade",
  57. Name = "DictionaryGrade",
  58. OnSelect = "queryGrade",
  59. GridOptions = new DataGridOptions
  60. {
  61. Columns = new List<DataGridColumn>()
  62. {
  63. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 }
  64. },
  65. IsCheckOnSelect = true,
  66. DataSourceUrl = Url.Content("~/Grademajor/GradeBindComboGridOptions"),
  67. IsPagination = true,
  68. IsShowRowNumbers = true,
  69. IsSingleSelect = false,
  70. }
  71. };
  72. //专业名称
  73. ComboGridOptions cgopStandard = new ComboGridOptions
  74. {
  75. TextField = "StandardName",
  76. ValueField = "StandardID",
  77. ID = "DictionaryStandard",
  78. Name = "DictionaryStandard",
  79. OnSelect = "queryStandard",
  80. GridOptions = new DataGridOptions
  81. {
  82. Columns = new List<DataGridColumn>()
  83. {
  84. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  85. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  86. },
  87. IsCheckOnSelect = true,
  88. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  89. IsPagination = true,
  90. IsShowRowNumbers = true,
  91. IsSingleSelect = false,
  92. }
  93. };
  94. //学制
  95. ComboGridOptions cgopLearnSystem = new ComboGridOptions
  96. {
  97. TextField = "LearnSystem",
  98. ValueField = "LearnSystem",
  99. ID = "DictionaryLearnSystem",
  100. Name = "DictionaryLearnSystem",
  101. OnSelect = "queryLearnSystem",
  102. GridOptions = new DataGridOptions
  103. {
  104. Columns = new List<DataGridColumn>()
  105. {
  106. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center }
  107. },
  108. IsCheckOnSelect = true,
  109. DataSourceUrl = Url.Content("~/Facultymajor/LearnSystem"),
  110. IsPagination = true,
  111. IsShowRowNumbers = true,
  112. IsSingleSelect = false,
  113. IsShowHeader = false
  114. }
  115. };
  116. //年级专业
  117. ComboGridOptions cgopGrademajor = new ComboGridOptions
  118. {
  119. TextField = "Name",
  120. ValueField = "GrademajorID",
  121. Name = "GrademajorComboGrid",
  122. ID = "GrademajorComboGrid",
  123. OnSelect = "queryGrademajor",
  124. GridOptions = new DataGridOptions
  125. {
  126. Columns = new List<DataGridColumn>()
  127. {
  128. new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.2 },
  129. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.3 }
  130. },
  131. PageSize = 5,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/Grademajor/List"),
  134. IsPagination = true,
  135. IsShowRowNumbers = true,
  136. IsSingleSelect = false
  137. }
  138. };
  139. //班级信息
  140. ComboGridOptions cgopClassmajor = new ComboGridOptions
  141. {
  142. TextField = "Name",
  143. ValueField = "ClassmajorID",
  144. Name = "ClassmajorComboGrid",
  145. ID = "ClassmajorComboGrid",
  146. GridOptions = new DataGridOptions
  147. {
  148. Columns = new List<DataGridColumn>()
  149. {
  150. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.25, Align=AlignStyle.Center },
  151. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.5, Align=AlignStyle.Center }
  152. },
  153. PageSize = 5,
  154. IsCheckOnSelect = true,
  155. DataSourceUrl = Url.Content("~/Classmajor/List"),
  156. IsPagination = true,
  157. IsShowRowNumbers = true,
  158. IsSingleSelect = false
  159. }
  160. };
  161. }
  162. @section scripts{
  163. <script type="text/javascript">
  164. var nonSelect = "@DropdownList.SELECT_ALL";
  165. //联动查询
  166. function queryCampus(data) {
  167. var campusID = $("#CampusDropdown").combogridX("getValue");
  168. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|'})";
  169. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  170. queryClass();
  171. }
  172. function queryCollege(data) {
  173. var campusID = $("#CampusDropdown").combogridX("getValue");
  174. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  175. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|";
  176. jsonString += "CollegeDropdown|*|" + collegeID + "|@@|'})";
  177. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  178. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  179. queryClass();
  180. }
  181. function queryGrade(data) {
  182. queryClass();
  183. }
  184. function queryStandard(data) {
  185. queryClass();
  186. }
  187. function queryEducation(data) {
  188. queryClass();
  189. }
  190. function queryLearningform(data) {
  191. queryClass();
  192. }
  193. function queryLearnSystem(data) {
  194. queryClass();
  195. }
  196. function queryGrademajor(data) {
  197. queryClass();
  198. }
  199. function queryClass() {
  200. var jsonString = "";
  201. var parameterString = "";
  202. var campusID = $("#CampusDropdown").combogridX("getValue");
  203. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  204. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  205. var standardID = $("#DictionaryStandard").combogridX("getValue");
  206. var educationID = $("#DictionaryEducation").combogridX("getValue");
  207. var learningformID = $("#DictionaryLearningform").combogridX("getValue");
  208. var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  209. var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
  210. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@@|";
  211. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  212. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@@|";
  213. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@@|";
  214. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@@|";
  215. if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@@|";
  216. if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@@|";
  217. if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@@|";
  218. if (parameterString != "") {
  219. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  220. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  221. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  222. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  223. }
  224. else {
  225. $("#DictionaryStandard").combogridX("reload");
  226. $("#GrademajorComboGrid").combogridX("reload");
  227. $("#ClassmajorComboGrid").combogridX("reload");
  228. }
  229. }
  230. //确定
  231. function StudentReport_CreateConfirm() {
  232. var schoolyearID = $("#SchoolyearID").combobox("getValue");
  233. if (schoolyearID == null || schoolyearID == "" || schoolyearID == "-1") {
  234. $.messager.alert("系统提示", "请选择学年学期。");
  235. return;
  236. }
  237. $(document.forms[0]).submit();
  238. }
  239. </script>
  240. }
  241. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  242. @using (Ajax.BeginForm(new AjaxOptions
  243. {
  244. //生成成功后不关闭弹出页面
  245. OnSuccess = "EMISFunction.FormSuccessNoClose",
  246. OnBegin = "EMISFunction.FormSubmit",
  247. OnComplete = "EMISFunction.FormComplete"
  248. }))
  249. {
  250. <div class="p_title">
  251. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  252. </div>
  253. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Create")</div>
  254. </div>
  255. <div class="search_keyword">
  256. <div class="search_input">
  257. <ul>
  258. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  259. <li class="sv">
  260. @Html.ComboGrid(cgopCampus)
  261. </li>
  262. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("College"):</li>
  263. <li class="sv">
  264. @Html.ComboGrid(cgopCollege)
  265. </li>
  266. <li class="sn" style="padding-left: 5px;width: 65px;">年级:</li>
  267. <li class="sv">
  268. @*@Html.ComboGrid(cgopGrade)*@
  269. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Grade, DropdownListBindType.SelectAll,
  270. new ComboGridOptions
  271. {
  272. ID = "DictionaryGrade",
  273. Name = "DictionaryGrade",
  274. OnSelect = "queryGrade"
  275. })
  276. </li>
  277. </ul>
  278. <ul>
  279. <li class="sn" style="padding-left: 5px;width: 65px;">专业名称:</li>
  280. <li class="sv">
  281. @Html.ComboGrid(cgopStandard)
  282. </li>
  283. <li class="sn" style="padding-left: 5px;width: 65px;">@Html.RSLabel("EducationID"):</li>
  284. <li class="sv">
  285. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Education, DropdownListBindType.SelectAll,
  286. new ComboGridOptions()
  287. {
  288. ID = "DictionaryEducation",
  289. Name = "DictionaryEducation",
  290. OnSelect = "queryEducation"
  291. })
  292. </li>
  293. <li class="sn" style="padding-left: 5px;width: 65px;">学习形式:</li>
  294. <li class="sv">
  295. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Learningform, DropdownListBindType.SelectAll,
  296. new ComboGridOptions()
  297. {
  298. ID = "DictionaryLearningform",
  299. Name = "DictionaryLearningform",
  300. OnSelect = "queryLearningform"
  301. })
  302. </li>
  303. </ul>
  304. <ul>
  305. <li class="sn" style="padding-left: 5px;width: 65px;">学制:</li>
  306. <li class="sv">
  307. @Html.ComboGrid(cgopLearnSystem)
  308. </li>
  309. <li class="sn" style="padding-left: 5px;width: 65px;">年级专业:</li>
  310. <li class="sv">
  311. @Html.ComboGrid(cgopGrademajor)
  312. </li>
  313. <li class="sn" style="padding-left: 5px;width: 65px;">班级信息:</li>
  314. <li class="sv">
  315. @Html.ComboGrid(cgopClassmajor)
  316. </li>
  317. </ul>
  318. <ul>
  319. <li class="sn" style="padding-left: 5px;color: red;font-weight:bolder;width: 65px;">在校状态:</li>
  320. <li class="sv">
  321. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, DropdownListBindType.SelectAll,
  322. new ComboGridOptions()
  323. {
  324. ID = "DictionaryInschoolStatus",
  325. Name = "DictionaryInschoolStatus",
  326. SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes
  327. })
  328. </li>
  329. <li class="sn" style="padding-left: 5px;color: red;font-weight:bolder;width: 65px;">学年学期:</li>
  330. <li class="sv">
  331. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  332. {
  333. BindType = DropdownListBindType.PleaseSelect,
  334. TextField = "Text",
  335. ValueField = "Value",
  336. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  337. ItemSourceUrl = Url.Content("~/SchoolYear/DropDownBeforeCurrent")
  338. })
  339. </li>
  340. </ul>
  341. </div>
  342. </div>
  343. }
  344. </div>