Edit.cshtml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. @model EMIS.ViewModel.Students.StudentsView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isAddNew = (Request["userIds"] ?? "") == "";
  7. if (Request["type"] == "copyAdd")
  8. {
  9. isAddNew = true;
  10. }
  11. ComboGridOptions cgopStudentcharge = new ComboGridOptions
  12. {
  13. TextField = "Name",
  14. ValueField = "ClassmajorID",
  15. OnSelect = "QueryClassmajorComboGrid",
  16. IsEnabled = isAddNew,
  17. GridOptions = new DataGridOptions
  18. {
  19. Columns = new List<DataGridColumn>()
  20. {
  21. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.12 },
  22. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 },
  23. //new BoundFieldColumn { FieldName="yearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 },
  24. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  25. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.1 },
  26. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.15 }
  27. //new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学年学期", Align=AlignStyle.Center }
  28. },
  29. IsCheckOnSelect = true,
  30. DataSourceUrl = Url.Content("~/Classmajor/List"),
  31. IsPagination = true,
  32. IsShowRowNumbers = true,
  33. IsSingleSelect = false
  34. }
  35. };
  36. }
  37. <style type="text/css">
  38. .universitytable
  39. {
  40. width: 100%;
  41. border: 0px none;
  42. }
  43. .universitytable tr
  44. {
  45. min-height: 30px;
  46. }
  47. .a4
  48. {
  49. width: 600px;
  50. color: Red;
  51. }
  52. </style>
  53. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  54. @using (Html.BeginForm("Edit", "Students", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  55. {
  56. <div class="p_title">
  57. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  58. </div>
  59. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  60. @if(Request["isView"] != "1")
  61. {
  62. @Html.ContextMenuBar("Edit")
  63. }
  64. </div>
  65. </div>
  66. <div class="search_list">
  67. @Html.HiddenFor(x => x.UserID)
  68. @Html.HiddenFor(x => x.PlanningGraduateDateStr)
  69. @Html.HiddenFor(x=>x.GradeMajorID)
  70. @if(isAddNew==false)
  71. {
  72. @Html.HiddenFor(x=>x.LoginID)
  73. }
  74. <table cellpadding="0" cellspacing="0" class="universitytable">
  75. @*<tr>
  76. <td colspan="4">
  77. <span class="a4">个人信息</span>
  78. </td>
  79. </tr>*@
  80. <tr>
  81. <td>@Html.LabelFor(x => x.LoginID):
  82. </td>
  83. <td>@Html.TextBoxFor(x => x.LoginID, new TextBoxOptions() {IsEnabled = isAddNew })
  84. </td>
  85. <td rowspan="4">@Html.LabelFor(x => x.PhotoUrl):
  86. </td>
  87. <td rowspan="4">
  88. <div>
  89. <img src="@Model.PhotoUrl" width="90" height="100" />
  90. </div>
  91. <div>
  92. @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:150px;" } })
  93. </div>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>@Html.LabelFor(x => x.UserName):
  98. </td>
  99. <td>
  100. @*@Html.TextBoxFor(x => x.UserName, new TextBoxOptions() {IsEnabled = isAddNew })*@
  101. @Html.TextBoxFor(x => x.UserName)
  102. </td>
  103. </tr>
  104. <tr>
  105. <td>@Html.LabelFor(x => x.SexID):
  106. </td>
  107. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID))
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>@Html.LabelFor(x => x.StudentType):
  112. </td>
  113. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_STUDENTTYPE, (x => x.StudentType))
  114. </td>
  115. </tr>
  116. <tr>
  117. <td>@Html.LabelFor(x => x.CertificatesType):
  118. </td>
  119. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType))
  120. </td>
  121. <td>@Html.LabelFor(x => x.IDNumber):
  122. </td>
  123. <td>@Html.TextBoxFor(x => x.IDNumber)
  124. </td>
  125. </tr>
  126. <tr>
  127. <td>@Html.LabelFor(x => x.ClassMajorID):
  128. </td>
  129. <td>
  130. @Html.ComboGridFor(x => x.ClassMajorID, cgopStudentcharge)
  131. </td>
  132. <td>@Html.LabelFor(x => x.EnteringSchoolYearID):
  133. </td>
  134. <td>@Html.DropdownListFor(x => x.EnteringSchoolYearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", })
  135. </td>
  136. </tr>
  137. <tr>
  138. <td>@Html.LabelFor(x => x.InSchoolStatusID):
  139. </td>
  140. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), new DropdownListOptions { IsEnabled = isAddNew })
  141. </td>
  142. <td>@Html.LabelFor(x => x.StudentStatus):
  143. </td>
  144. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.StudentStatus))
  145. </td>
  146. </tr>
  147. <tr>
  148. <td>@Html.LabelFor(x => x.Email):
  149. </td>
  150. <td>@Html.TextBoxFor(x => x.Email)
  151. </td>
  152. <td>@Html.LabelFor(x => x.Mobile):
  153. </td>
  154. <td>@Html.TextBoxFor(x => x.Mobile)
  155. </td>
  156. </tr>
  157. <tr>
  158. <td>@Html.LabelFor(x => x.StudentCardNo):
  159. </td>
  160. <td>@Html.TextBoxFor(x => x.StudentCardNo)
  161. </td>
  162. <td>@Html.LabelFor(x => x.GraduateCardNo):
  163. </td>
  164. <td>@Html.TextBoxFor(x => x.GraduateCardNo)
  165. </td>
  166. </tr>
  167. <tr>
  168. <td>@Html.LabelFor(x => x.PlanningGraduateDate):
  169. </td>
  170. <td>@Html.TextBoxFor(x => x.PlanningGraduateDate, new TextBoxOptions() { TextBoxType = TextBoxType.yyyyMMdd, IsEnabled = false })
  171. </td>
  172. <td>@Html.LabelFor(x=>x.GraduateDate):
  173. </td>
  174. <td>@Html.TextBoxFor(x => x.GraduateDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled=false })
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>@Html.LabelFor(x => x.IsDreamProject):
  179. </td>
  180. <td>@Html.CheckBoxFor(x=>x.IsDreamProject)
  181. </td>
  182. <td>@Html.LabelFor(x => x.ReplaceGraduateNo):
  183. </td>
  184. <td>@Html.TextBoxFor(x => x.ReplaceGraduateNo)
  185. </td>
  186. </tr>
  187. <tr>
  188. <td colspan="4">
  189. <span class="a4">学生扩展信息</span>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td>@Html.LabelFor(x => x.UsedName):
  194. </td>
  195. <td>@Html.TextBoxFor(x => x.UsedName)
  196. </td>
  197. <td>@Html.LabelFor(x => x.DirectorName):
  198. </td>
  199. <td>@Html.TextBoxFor(x => x.DirectorName)
  200. </td>
  201. </tr>
  202. <tr>
  203. <td>@Html.LabelFor(x => x.BirthDate):
  204. </td>
  205. <td>@Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  206. </td>
  207. <td>@Html.LabelFor(x => x.Country):
  208. </td>
  209. <td>@Html.TextBoxFor(x => x.Country)
  210. </td>
  211. </tr>
  212. <tr>
  213. <td>@Html.LabelFor(x => x.Politics):
  214. </td>
  215. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.Politics), DropdownListBindType.PleaseSelect)
  216. </td>
  217. <td>@Html.LabelFor(x => x.Nation):
  218. </td>
  219. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.Nation), DropdownListBindType.PleaseSelect)
  220. </td>
  221. </tr>
  222. <tr>
  223. <td>@Html.LabelFor(x => x.Place):
  224. </td>
  225. <td>@Html.TextBoxFor(x => x.Place)
  226. </td>
  227. <td>@Html.LabelFor(x => x.Healthy):
  228. </td>
  229. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.Healthy))
  230. </td>
  231. </tr>
  232. <tr>
  233. <td>@Html.LabelFor(x => x.BloodGroup):
  234. </td>
  235. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BLOODGROUP, (x => x.BloodGroup))
  236. </td>
  237. <td>@Html.LabelFor(x => x.Specialty):
  238. </td>
  239. <td>@Html.TextBoxFor(x => x.Specialty)
  240. </td>
  241. </tr>
  242. <tr>
  243. <td>@Html.LabelFor(x => x.Height):
  244. </td>
  245. <td>@Html.TextBoxFor(x => x.Height)
  246. </td>
  247. <td>@Html.LabelFor(x => x.Weight):
  248. </td>
  249. <td>@Html.TextBoxFor(x => x.Weight)
  250. </td>
  251. </tr>
  252. <tr>
  253. <td colspan="4">
  254. <span class="a4">高考招生信息</span>
  255. </td>
  256. </tr>
  257. <tr>
  258. <td>@Html.LabelFor(x => x.ExamineeNum):
  259. </td>
  260. <td>@Html.TextBoxFor(x => x.ExamineeNum)
  261. </td>
  262. <td>@Html.LabelFor(x => x.EntranceDate):
  263. </td>
  264. <td>@Html.TextBoxFor(x => x.EntranceDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  265. </td>
  266. </tr>
  267. <tr>
  268. <td>@Html.LabelFor(x => x.CultureModel):
  269. </td>
  270. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CULTUREMODEL, (x => x.CultureModel))
  271. </td>
  272. <td>@Html.LabelFor(x => x.ExamineeType):
  273. </td>
  274. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EXAMINEETYPE, (x => x.ExamineeType))
  275. </td>
  276. </tr>
  277. <tr>
  278. <td>@Html.LabelFor(x => x.EntranceWay):
  279. </td>
  280. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EntranceWay, (x => x.EntranceWay))
  281. </td>
  282. <td>@Html.LabelFor(x => x.Features):
  283. </td>
  284. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Features, (x => x.Features))
  285. </td>
  286. </tr>
  287. <tr>
  288. <td>@Html.LabelFor(x => x.Territorial):
  289. </td>
  290. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Province, (x => x.Territorial), DropdownListBindType.PleaseSelect)
  291. </td>
  292. <td>@Html.LabelFor(x => x.Placebirth):
  293. </td>
  294. <td>@Html.TextBoxFor(x => x.Placebirth)
  295. </td>
  296. </tr>
  297. <tr>
  298. <td>@Html.LabelFor(x => x.Area):
  299. </td>
  300. <td>@Html.TextBoxFor(x => x.Area)
  301. </td>
  302. <td>@Html.LabelFor(x => x.Score):
  303. </td>
  304. <td>@Html.TextBoxFor(x => x.Score)
  305. </td>
  306. </tr>
  307. <tr>
  308. <td colspan="4">
  309. <span class="a4">学生缴费信息</span>
  310. </td>
  311. </tr>
  312. <tr>
  313. <td>@Html.LabelFor(x => x.CardNo):
  314. </td>
  315. <td>@Html.TextBoxFor(x => x.CardNo)
  316. </td>
  317. <td>@Html.LabelFor(x => x.BankName):
  318. </td>
  319. <td>@Html.TextBoxFor(x => x.BankName)
  320. </td>
  321. </tr>
  322. <tr>
  323. <td colspan="4">
  324. <span class="a4">学生联系信息</span>
  325. </td>
  326. </tr>
  327. <tr>
  328. <td>@Html.LabelFor(x => x.Telephone):
  329. </td>
  330. <td>@Html.TextBoxFor(x => x.Telephone)
  331. </td>
  332. <td>@Html.LabelFor(x => x.QQ):
  333. </td>
  334. <td>@Html.TextBoxFor(x => x.QQ)
  335. </td>
  336. </tr>
  337. <tr>
  338. <td>@Html.LabelFor(x => x.MicroMsgNo):
  339. </td>
  340. <td>@Html.TextBoxFor(x => x.MicroMsgNo)
  341. </td>
  342. <td>@Html.LabelFor(x => x.ZipCode):
  343. </td>
  344. <td>@Html.TextBoxFor(x => x.ZipCode)
  345. </td>
  346. </tr>
  347. <tr>
  348. <td>@Html.LabelFor(x => x.Address):
  349. </td>
  350. <td>@Html.TextBoxFor(x => x.Address)
  351. </td>
  352. <td>@Html.LabelFor(x => x.WorkUnit):
  353. </td>
  354. <td>@Html.TextBoxFor(x => x.WorkUnit)
  355. </td>
  356. </tr>
  357. <tr>
  358. <td>@Html.LabelFor(x => x.HomeAddress):
  359. </td>
  360. <td>@Html.TextBoxFor(x => x.HomeAddress)
  361. </td>
  362. <td>@Html.LabelFor(x => x.Recipient):
  363. </td>
  364. <td>@Html.TextBoxFor(x => x.Recipient)
  365. </td>
  366. </tr>
  367. <tr>
  368. <td>@Html.LabelFor(x => x.Dormitory):
  369. </td>
  370. <td>@Html.TextBoxFor(x => x.Dormitory)
  371. </td>
  372. <td>
  373. </td>
  374. <td>
  375. </td>
  376. </tr>
  377. @if (Request["isView"] == "1")
  378. {
  379. <tr>
  380. <td colspan="4">
  381. <span class="a4">学生异动信息</span>
  382. </td>
  383. </tr>
  384. <tr>
  385. <td colspan="4">
  386. <div style="width: 100%; height: 100px; overflow: scroll; scrollbar-arrow-color:#ffffff; scrollbar-highlight-color:#ffffff; scrollbar-3dlight-color:#70807d; scrollbar-shadow-color:#ffffff; scrollbar-darkshadow-color:#70807d; scrollbar-track-color:#ffffff">
  387. @Html.DataGrid(new DataGridOptions
  388. {
  389. Columns = new List<DataGridColumn>()
  390. {
  391. new CheckBoxFieldColumn{ HeaderText="", FieldName="EntityID"},
  392. new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="异动学期", Align=AlignStyle.Center, Handle="edit",Width=0.05 },
  393. //new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center,Width=0.045 },
  394. //new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,OverflowLength=6,Width=0.02 },
  395. new BoundFieldColumn { FieldName="DifferentDynamicTypeName", HeaderText="异动类型", Align=AlignStyle.Center,Width=0.025 },
  396. new BoundFieldColumn { FieldName="Reason", HeaderText="异动原因", Align=AlignStyle.Center, OverflowLength=6,Width=0.025, IsHidden=true },
  397. //new BoundFieldColumn { FieldName="ReasonName", HeaderText="异动原因", Align=AlignStyle.Center, OverflowLength=6,Width=0.025 },
  398. //new BoundFieldColumn { FieldName="StandardName", HeaderText="异动前专业", Align=AlignStyle.Center },
  399. //new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="异动前班级", Align=AlignStyle.Center,OverflowLength=13 },
  400. //new BoundFieldColumn { FieldName="AfterStandardName", HeaderText="异动后专业", Align=AlignStyle.Center },
  401. new BoundFieldColumn { FieldName="AfterClassmajorName", HeaderText="异动后班级", Align=AlignStyle.Center,OverflowLength=13 },
  402. new BoundFieldColumn { FieldName="EntityCreateTime", HeaderText="异动日期",Align=AlignStyle.Center,Formatter= Formatter.OnlyYearMonthDay,Width=0.04 },
  403. //new BoundFieldColumn { FieldName="ReportStatusName", HeaderText="注册状态", Align=AlignStyle.Center,Width=0.03 },
  404. },
  405. PageSize=3,
  406. IsCheckOnSelect = true,
  407. DataSourceUrl = Url.Content("~/DifferentDynamicResult/StudentDifferentDynamicApplyInfo?userID=" + Model.UserID),
  408. ID = "dgList",
  409. IsPagination = true,
  410. IsShowRowNumbers = true,
  411. IsSingleSelect = false
  412. })
  413. </div>
  414. </td>
  415. </tr>
  416. }
  417. <tr>
  418. <td>@Html.LabelFor(x => x.Career):
  419. </td>
  420. <td colspan="3">@Html.TextAreaFor(x => x.Career, new Dictionary<string, object> { { "style", "width:85%" } })
  421. </td>
  422. </tr>
  423. <tr>
  424. <td>@Html.LabelFor(x => x.Remarks):
  425. </td>
  426. <td colspan="3">@Html.TextAreaFor(x => x.Remarks, new Dictionary<string, object> { { "style", "width:85%" } })
  427. </td>
  428. </tr>
  429. </table>
  430. </div>
  431. }
  432. </div>
  433. @section scripts{
  434. <script type="text/javascript">
  435. var mnu = "";
  436. //加载
  437. $(function () {
  438. mnu = $.SystemGeneral.getUrlParam("MNU");
  439. });
  440. function Student_Save() {
  441. var userID = $("#UserID").val();
  442. var code = $("#LoginID").val();
  443. var ReplaceGraduateNo = $("#ReplaceGraduateNo").val();
  444. $.post('/Students/Verification', { userID: userID, code: code, ReplaceGraduateNo: ReplaceGraduateNo }, function (data) {
  445. if (data == "成功") {
  446. $(document.forms[0]).submit();
  447. } else {
  448. $.messager.alert("系统提示", data);
  449. }
  450. });
  451. }
  452. function QueryClassmajorComboGrid(data) {
  453. var schoolyearID = $(this)[0].SchoolyearID; //班级的毕业学年学期
  454. // var learnSystem = $(this)[0].LearnSystem;
  455. // var yearID = parseInt(schoolyearID) + parseInt(learnSystem);
  456. // var schoolcodeID = $(this)[0].SchoolcodeID;
  457. $.post('/Students/GetPlanningGraduateDate', { GradeMajorID: data.GrademajorID }, function (data) {
  458. if (data != "") {
  459. $("#PlanningGraduateDate").val(data);
  460. $("#PlanningGraduateDateStr").val(data);
  461. }
  462. });
  463. }
  464. //点击列表更新
  465. function edit(rowindex, rowdata) {
  466. showDialog(rowdata.EntityID);
  467. }
  468. function showDialog(id) {
  469. var redirectTo = "/DifferentDynamicResult/Edit?a=1";
  470. if (id) {
  471. redirectTo = redirectTo + '&id=' + id;
  472. }
  473. redirectTo = redirectTo + '&MNU=' + mnu;
  474. // top.$('#sysWindow').dialog({
  475. // title: '异动申请信息',
  476. // width: 800,
  477. // height: 500,
  478. // content: '<iframe id="iframe1" frameborder="0" scrolling="no" width="770" height="420" src="' + redirectTo + '"></iframe>',
  479. // modal: true
  480. // });
  481. $.popupTopWindow('异动详情', redirectTo, 800, 600, null, null);
  482. }
  483. </script>
  484. }