Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

239 řádky
7.3 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>报名</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/style.css" rel="stylesheet" />
  9. <link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
  10. <style>
  11. .mui-table-view {
  12. margin-top: 10px;
  13. }
  14. .span3 {
  15. color: #0193DF;
  16. margin: 10px;
  17. line-height: 38px;
  18. }
  19. .span2 {
  20. color: #c70f1a;
  21. font-size: 13px;
  22. line-height: 24px;
  23. }
  24. .mui-ellipsis {
  25. line-height: 30px;
  26. }
  27. .mui-content-padded {
  28. margin-top: 10px;
  29. text-align: center;
  30. }
  31. .mui-content {
  32. background-color: #FFFFFF;
  33. }
  34. .mui-btn-blue {
  35. background-color: #0193df;
  36. border: #0193DF;
  37. margin-top: 25px;
  38. }
  39. .mui-input-row {
  40. border-bottom: 1px #EEEEEE solid;
  41. }
  42. .mui-input-row .mui-btn {
  43. width: 65%;
  44. border: 1px #000000 solid;
  45. border: none;
  46. float: left;
  47. }
  48. .dj {
  49. font-size: 14px;
  50. color: #999999;
  51. padding: 10px;
  52. }
  53. .mui-btn-block {
  54. width: 65%;
  55. float: right;
  56. margin: 0px;
  57. height: 40px;
  58. }
  59. #info {
  60. float: left;
  61. margin: 0px;
  62. }
  63. #schooltext,
  64. #culturetext,
  65. #departtext {
  66. line-height: 40px;
  67. text-overflow: ellipsis;
  68. overflow: hidden;
  69. }
  70. </style>
  71. </head>
  72. <body>
  73. <header class="mui-bar mui-bar-nav">
  74. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  75. <h1 class="mui-title">修改专业</h1>
  76. </header>
  77. <div class="mui-content">
  78. <ul class="mui-table-view">
  79. <li class="mui-table-view-cell mui-media">
  80. <a>
  81. <div class="mui-media-body">
  82. <div class="mui-input-row">
  83. <label>姓&nbsp;&nbsp;&nbsp;名</label>
  84. <input id='username' type="text" class="mui-input-clear mui-input" readonly="readonly">
  85. </div>
  86. <div class="mui-input-row" id="selculture">
  87. <label>文化程度</label>
  88. <input type="hidden" id="cultureid" />
  89. <span id="culturetext">请选择</span><span class="mui-pull-right mui-navigate-right"></span>
  90. </div>
  91. <div class="mui-input-row" id="selschool">
  92. <label>报考校区</label>
  93. <input type="hidden" id="schoolid" />
  94. <span id="schooltext">请选择</span><span class="mui-pull-right mui-navigate-right"></span>
  95. </div>
  96. <div class="mui-input-row" id="seldepart">
  97. <label>报考专业</label>
  98. <input type="hidden" id="departid" />
  99. <span id="departtext">请选择</span><span class="mui-pull-right mui-navigate-right" id="sex"></span>
  100. </div>
  101. </div>
  102. <div class="mui-content-padded">
  103. <button type="button" class="mui-btn mui-btn-danger" id="reg">确认修改</button>
  104. </div>
  105. </a>
  106. </li>
  107. </ul>
  108. </div>
  109. <script src="js/mui.min.js "></script>
  110. <script src="js/serverurl.js"></script>
  111. <script src="js/tools.js"></script>
  112. <script src="js/userinfos.js"></script>
  113. <script src="js/mui.picker.min.js"></script>
  114. <script type="text/javascript">
  115. var userPickerculture, userPickerschool, userPickerdepart;
  116. function RefreshUserInfo() {
  117. mui.post(api + '/user/getStuByUserId', {
  118. data: users.ID
  119. }, function(des) {
  120. if (des.code == "200") {
  121. SetLogin(des.data)
  122. plus.nativeUI.toast("修改成功。");
  123. plus.webview.currentWebview().close();
  124. plus.webview.getWebviewById("apply.html").evalJS("RefreshBaoming();");
  125. plus.webview.getWebviewById("interact.html").evalJS("RefreshContactTeacher();");
  126. }
  127. }, 'json')
  128. }
  129. function OpenAndSetPicker(picker, field) {
  130. picker.show(function(items) {
  131. if (items[0].value != undefined && items[0].value != null && items[0].value != '') {
  132. document.getElementById(field + "text").innerText = items[0].text;
  133. document.getElementById(field + "id").value = items[0].value;
  134. if (field == "school") {
  135. var whcdid = document.getElementById("cultureid").value;
  136. if (whcdid == "") {
  137. plus.nativeUI.toast("请选择文化程度。");
  138. return;
  139. }
  140. GetDepartData(userPickerdepart, "" + items[0].value + "", "" + whcdid + "");
  141. document.getElementById("departid").value = "";
  142. document.getElementById("departtext").innerText = "";
  143. }
  144. if (field == "culture") {
  145. var whcdid = document.getElementById("cultureid").value;
  146. if (whcdid == "") {
  147. plus.nativeUI.toast("请选择文化程度。");
  148. return;
  149. }
  150. var xqid = document.getElementById("schoolid").value;
  151. if (xqid == "") {
  152. plus.nativeUI.toast("请选择校区。");
  153. return;
  154. }
  155. GetDepartData(userPickerdepart, "" + xqid + "", "" + whcdid + "");
  156. document.getElementById("schoolid").value = "";
  157. document.getElementById("schooltext").innerText = "";
  158. document.getElementById("departid").value = "";
  159. document.getElementById("departtext").innerText = "";
  160. }
  161. } else {
  162. plus.nativeUI.toast("当前校区暂无对应专业。");
  163. return false;
  164. }
  165. });
  166. }
  167. mui.plusReady(function() {
  168. CheckLogin();
  169. userPickerculture = new mui.PopPicker();
  170. userPickerschool = new mui.PopPicker();
  171. userPickerdepart = new mui.PopPicker();
  172. document.getElementById("selculture").addEventListener("tap", function() {
  173. OpenAndSetPicker(userPickerculture, "culture");
  174. });
  175. document.getElementById("selschool").addEventListener("tap", function() {
  176. OpenAndSetPicker(userPickerschool, "school");
  177. });
  178. document.getElementById("seldepart").addEventListener("tap", function() {
  179. OpenAndSetPicker(userPickerdepart, "depart");
  180. });
  181. document.getElementById("username").value = users.username;
  182. document.getElementById("cultureid").value = users.culture;
  183. document.getElementById("culturetext").innerText = users.culturename;
  184. document.getElementById("schoolid").value = users.school;
  185. document.getElementById("schooltext").innerText = users.schoolname;
  186. document.getElementById("departid").value = users.depart;
  187. document.getElementById("departtext").innerText = users.departname;
  188. GetDictionaryDataBySource(userPickerculture, "DegreeOfEducation"); //文化程度
  189. GetSchoolData(userPickerschool);
  190. GetDepartData(userPickerdepart, "" + users.school + "", "" + users.culture + "");
  191. document.getElementById("reg").addEventListener("tap", function() {
  192. if (users.ID != undefined && users.ID != null) {
  193. if (document.getElementById("cultureid").value == "" || document.getElementById("schoolid").value == "" ||
  194. document.getElementById("departid").value == "") {
  195. plus.nativeUI.toast("请填写完整表单!"); //
  196. return;
  197. }
  198. plus.nativeUI.showWaiting("加载中...");
  199. var param = {
  200. school: document.getElementById("schoolid").value,
  201. depart: document.getElementById("departid").value,
  202. culture: document.getElementById("cultureid").value,
  203. id: users.ID
  204. }
  205. mui.post(api + '/user/updateStuByStuTerminal', {
  206. data: JSON.stringify(param)
  207. }, function(res) {
  208. plus.nativeUI.closeWaiting();
  209. if (res.code == "200") {
  210. RefreshUserInfo()
  211. }
  212. }, 'json')
  213. }
  214. });
  215. });
  216. </script>
  217. </body>
  218. </html>