Edit.cshtml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. @model EMIS.ViewModel.UniversityManage.TeacherManage.StaffView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //院系所
  8. ComboGridOptions cgopCollege = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CollegeID",
  12. OnSelect = "queryCollege",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  20. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  21. },
  22. PageSize = 5,
  23. IsCheckOnSelect = true,
  24. DataSourceUrl = Url.Content("~/College/List"),
  25. IsPagination = true,
  26. IsShowRowNumbers = true,
  27. IsSingleSelect = false
  28. }
  29. };
  30. //教研室
  31. ComboGridOptions cgopDepartment = new ComboGridOptions
  32. {
  33. TextField = "Name",
  34. ValueField = "DepartmentID",
  35. OnSelect = "queryDepartment",
  36. IsEnabled = isEnable,
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  42. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.2 },
  43. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  44. },
  45. PageSize = 5,
  46. IsCheckOnSelect = true,
  47. DataSourceUrl = Url.Content("~/Department/List"),
  48. IsPagination = true,
  49. IsShowRowNumbers = true,
  50. IsSingleSelect = false
  51. }
  52. };
  53. }
  54. @section scripts{
  55. <script src="~/Scripts/Business/UniversityManage/TeacherManage/StaffEdit.js" type="text/javascript"></script>
  56. <script type="text/javascript">
  57. var nonSelect = "@DropdownList.SELECT_ALL";
  58. var college = '@EMIS.Utility.RSL.Get("College")';
  59. </script>
  60. }
  61. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  62. @using (Html.BeginForm("Edit", "Staff", new
  63. {
  64. MNU = Request["MNU"],
  65. WindowID = Request["WindowID"] },
  66. FormMethod.Post,
  67. new { enctype = "multipart/form-data"
  68. }))
  69. {
  70. <div class="p_title">
  71. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  72. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  73. @if (Request["type"] != "detail")
  74. {
  75. @Html.ContextMenuBar("Edit")
  76. }
  77. </div>
  78. </div>
  79. <div class="search_list">
  80. @Html.HiddenFor(x => x.UserID)
  81. @if (Request["type"] == "add" || Request["type"] == "copyAdd")
  82. {
  83. @Html.Hidden("CollegeDropdown", null)
  84. @Html.Hidden("DepartmentDropdown", null)
  85. }
  86. else
  87. {
  88. @Html.Hidden("CollegeDropdown", Model.CollegeID)
  89. @Html.Hidden("DepartmentDropdown", Model.DepartmentID)
  90. }
  91. <table cellpadding="0" cellspacing="0" id="stafftable">
  92. <tr>
  93. <td style="color:red;">
  94. @Html.LabelFor(x => x.StaffCode):
  95. </td>
  96. <td>
  97. @Html.TextBoxFor(x => x.StaffCode, new TextBoxOptions() { IsEnabled = isEnable })
  98. </td>
  99. <td rowspan="5">
  100. @Html.LabelFor(x => x.PhotoUrl):
  101. </td>
  102. <td rowspan="5">
  103. <div>
  104. <img src="@Model.PhotoUrlStr" id="imgPhoto" width="118" height="125" />
  105. </div>
  106. <div>
  107. <span>
  108. @if (isEnable)
  109. {
  110. if (Request["type"] == "edit")
  111. {
  112. @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:125px;" } })
  113. <input type="button" value="删除" onclick="javascript: delPhoto();" />
  114. }
  115. else
  116. {
  117. @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:175px;" } })
  118. }
  119. }
  120. </span>
  121. </div>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>
  126. @Html.LabelFor(x => x.Name):
  127. </td>
  128. <td>
  129. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  130. </td>
  131. </tr>
  132. <tr>
  133. <td>
  134. @Html.LabelFor(x => x.UsedName):
  135. </td>
  136. <td>
  137. @Html.TextBoxFor(x => x.UsedName, new TextBoxOptions() { IsEnabled = isEnable })
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. @Html.LabelFor(x => x.SexName):
  143. </td>
  144. <td>
  145. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), new DropdownListOptions() { IsEnabled = isEnable })
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>
  150. @Html.LabelFor(x => x.BirthDate):
  151. </td>
  152. <td>
  153. @Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  154. </td>
  155. </tr>
  156. <tr>
  157. <td>
  158. @Html.LabelFor(x => x.NationName):
  159. </td>
  160. <td>
  161. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.NationID), new DropdownListOptions() { IsEnabled = isEnable })
  162. </td>
  163. <td>
  164. @Html.LabelFor(x => x.PoliticsName):
  165. </td>
  166. <td>
  167. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.PoliticsID), new DropdownListOptions() { IsEnabled = isEnable })
  168. </td>
  169. </tr>
  170. <tr>
  171. <td style="color:red;">
  172. @Html.LabelFor(x => x.CollegeName):
  173. </td>
  174. <td>
  175. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  176. </td>
  177. <td style="color:red;">
  178. @Html.LabelFor(x => x.DepartmentName):
  179. </td>
  180. <td>
  181. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  182. </td>
  183. </tr>
  184. <tr>
  185. <td colspan="4" style="padding:1px;height:10px;">
  186. <div id="profileExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  187. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  188. onclick="swapProfile();">
  189. </div>
  190. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapProfile();">
  191. 扩展信息
  192. </div>
  193. </td>
  194. </tr>
  195. <tr>
  196. <td>
  197. @Html.LabelFor(x => x.CertificatesType):
  198. </td>
  199. <td>
  200. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType), new DropdownListOptions() { IsEnabled = isEnable })
  201. </td>
  202. <td>
  203. @Html.LabelFor(x => x.CertificatesNum):
  204. </td>
  205. <td>
  206. @Html.TextBoxFor(x => x.CertificatesNum, new TextBoxOptions() { IsEnabled = isEnable })
  207. </td>
  208. </tr>
  209. <tr>
  210. <td style="color:red;">
  211. @Html.LabelFor(x => x.TeacherTypeName):
  212. </td>
  213. <td>
  214. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_TeacherType, (x => x.TeacherTypeID), new DropdownListOptions() { IsEnabled = isEnable })
  215. </td>
  216. <td style="color:red;">
  217. @Html.LabelFor(x => x.IncumbencyState):
  218. </td>
  219. <td>
  220. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, (x => x.IncumbencyState), new DropdownListOptions() { IsEnabled = isEnable })
  221. </td>
  222. </tr>
  223. <tr>
  224. <td>
  225. @Html.LabelFor(x => x.SituationName):
  226. </td>
  227. <td>
  228. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Situation, (x => x.SituationID), new DropdownListOptions() { IsEnabled = isEnable })
  229. </td>
  230. <td>
  231. @Html.LabelFor(x => x.TitleName):
  232. </td>
  233. <td>
  234. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Title, (x => x.TitleID), new DropdownListOptions() { IsEnabled = isEnable })
  235. </td>
  236. </tr>
  237. <tr>
  238. <td>
  239. @Html.LabelFor(x => x.LiteracyLevelName):
  240. </td>
  241. <td>
  242. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LiteracyLevel, (x => x.LiteracyLevelID), new DropdownListOptions() { IsEnabled = isEnable })
  243. </td>
  244. <td>
  245. @Html.LabelFor(x => x.LearnPositionName):
  246. </td>
  247. <td>
  248. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LearnPosition, (x => x.LearnPositionID), new DropdownListOptions() { IsEnabled = isEnable })
  249. </td>
  250. </tr>
  251. <tr>
  252. <td style="color: red;">
  253. @Html.LabelFor(x => x.IsDualTeacher):
  254. </td>
  255. <td>
  256. @if (!isEnable)
  257. {
  258. @Html.CheckBoxFor(x => x.IsDualTeacher, new Dictionary<string, object>() { { "disabled", isEnable } })
  259. }
  260. else
  261. {
  262. @Html.CheckBoxFor((x => x.IsDualTeacher))
  263. }
  264. </td>
  265. <td>
  266. @Html.LabelFor(x => x.PaymentLevelName):
  267. </td>
  268. <td>
  269. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.TP_PaymentLevel, (x => x.PaymentLevelID), new DropdownListOptions() { IsEnabled = isEnable })
  270. </td>
  271. </tr>
  272. <tr>
  273. <td>
  274. @Html.LabelFor(x => x.Nationality):
  275. </td>
  276. <td>
  277. @Html.TextBoxFor(x => x.Nationality, new TextBoxOptions() { IsEnabled = isEnable })
  278. </td>
  279. <td>
  280. @Html.LabelFor(x => x.Place):
  281. </td>
  282. <td>
  283. @Html.TextBoxFor(x => x.Place, new TextBoxOptions() { IsEnabled = isEnable })
  284. </td>
  285. </tr>
  286. <tr>
  287. <td>
  288. @Html.LabelFor(x => x.WorkDate):
  289. </td>
  290. <td>
  291. @Html.TextBoxFor(x => x.WorkDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month, IsEnabled = isEnable })
  292. </td>
  293. <td>
  294. @Html.LabelFor(x => x.ComeSchoolDate):
  295. </td>
  296. <td>
  297. @Html.TextBoxFor(x => x.ComeSchoolDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month, IsEnabled = isEnable })
  298. </td>
  299. </tr>
  300. <tr>
  301. <td colspan="4" style="padding:1px;height:10px;">
  302. <div id="otherExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  303. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  304. onclick="swapOther();">
  305. </div>
  306. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapOther();">
  307. 其它信息
  308. </div>
  309. </td>
  310. </tr>
  311. <tr>
  312. <td>
  313. @Html.LabelFor(x => x.Email):
  314. </td>
  315. <td>
  316. @Html.TextBoxFor(x => x.Email, new TextBoxOptions() { IsEnabled = isEnable })
  317. </td>
  318. <td>
  319. @Html.LabelFor(x => x.ZIPCode):
  320. </td>
  321. <td>
  322. @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable })
  323. </td>
  324. </tr>
  325. <tr>
  326. <td>
  327. @Html.LabelFor(x => x.WeChatNum):
  328. </td>
  329. <td>
  330. @Html.TextBoxFor(x => x.WeChatNum, new TextBoxOptions() { IsEnabled = isEnable })
  331. </td>
  332. <td>
  333. @Html.LabelFor(x => x.QQ):
  334. </td>
  335. <td>
  336. @Html.TextBoxFor(x => x.QQ, new TextBoxOptions() { IsEnabled = isEnable })
  337. </td>
  338. </tr>
  339. <tr>
  340. <td>
  341. @Html.LabelFor(x => x.Telephone):
  342. </td>
  343. <td>
  344. @Html.TextBoxFor(x => x.Telephone, new TextBoxOptions() { IsEnabled = isEnable })
  345. </td>
  346. <td>
  347. @Html.LabelFor(x => x.OfficeTelephone):
  348. </td>
  349. <td>
  350. @Html.TextBoxFor(x => x.OfficeTelephone, new TextBoxOptions() { IsEnabled = isEnable })
  351. </td>
  352. </tr>
  353. <tr>
  354. <td>
  355. @Html.LabelFor(x => x.HousePhone):
  356. </td>
  357. <td>
  358. @Html.TextBoxFor(x => x.HousePhone, new TextBoxOptions() { IsEnabled = isEnable })
  359. </td>
  360. <td>
  361. @Html.LabelFor(x => x.Mobile):
  362. </td>
  363. <td>
  364. @Html.TextBoxFor(x => x.Mobile, new TextBoxOptions() { IsEnabled = isEnable })
  365. </td>
  366. </tr>
  367. <tr>
  368. <td>
  369. @Html.LabelFor(x => x.HealthStateName):
  370. </td>
  371. <td>
  372. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.HealthStateID), new DropdownListOptions() { IsEnabled = isEnable })
  373. </td>
  374. <td>
  375. @Html.LabelFor(x => x.ReligionName):
  376. </td>
  377. <td>
  378. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Religion, (x => x.ReligionID), new DropdownListOptions() { IsEnabled = isEnable })
  379. </td>
  380. </tr>
  381. <tr>
  382. <td>
  383. @Html.LabelFor(x => x.Speciality):
  384. </td>
  385. <td>
  386. @Html.TextBoxFor(x => x.Speciality, new TextBoxOptions() { IsEnabled = isEnable })
  387. </td>
  388. <td>
  389. @Html.LabelFor(x => x.Account):
  390. </td>
  391. <td>
  392. @Html.TextBoxFor(x => x.Account, new TextBoxOptions() { IsEnabled = isEnable })
  393. </td>
  394. </tr>
  395. <tr>
  396. <td>
  397. @Html.LabelFor(x => x.Residence):
  398. </td>
  399. <td colspan="3">
  400. @Html.TextBoxFor(x => x.Residence, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })
  401. </td>
  402. </tr>
  403. <tr>
  404. <td>
  405. @Html.LabelFor(x => x.HomeAddress):
  406. </td>
  407. <td colspan="3">
  408. @Html.TextBoxFor(x => x.HomeAddress, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })
  409. </td>
  410. </tr>
  411. <tr>
  412. <td>
  413. @Html.LabelFor(x => x.Address):
  414. </td>
  415. <td colspan="3">
  416. @Html.TextBoxFor(x => x.Address, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })
  417. </td>
  418. </tr>
  419. <tr>
  420. <td>
  421. @Html.LabelFor(x => x.NowAddress):
  422. </td>
  423. <td colspan="3">
  424. @Html.TextBoxFor(x => x.NowAddress, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })
  425. </td>
  426. </tr>
  427. <tr>
  428. <td>
  429. @Html.LabelFor(x => x.Profile):
  430. </td>
  431. <td colspan="3">
  432. @if (!isEnable)
  433. {
  434. @Html.TextAreaFor(x => x.Profile, new Dictionary<string, object>
  435. {
  436. { "style", "width: 90%;min-height: 45px" },
  437. { "disabled", "true" }
  438. })
  439. }
  440. else
  441. {
  442. @Html.TextAreaFor(x => x.Profile, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  443. }
  444. </td>
  445. </tr>
  446. <tr>
  447. <td>
  448. @Html.LabelFor(x => x.Remark):
  449. </td>
  450. <td colspan="3">
  451. @if (!isEnable)
  452. {
  453. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  454. {
  455. { "style", "width: 90%;min-height: 20px" },
  456. { "disabled", "true" }
  457. })
  458. }
  459. else
  460. {
  461. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  462. }
  463. </td>
  464. </tr>
  465. </table>
  466. </div>
  467. }
  468. </div>