appointment.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>预约体检</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
  7. <link href="/h5/style/style.css" rel="stylesheet" />
  8. <script src="/h5/js/jquery-2.1.1.min.js"></script>
  9. </head>
  10. <body>
  11. <div class="registerPost">
  12. <form id="form1" action="/h5/appointment/save" method="post">
  13. <input type="hidden" name="bid" th:attr="value=${bid}" />
  14. <input type="hidden" name="itemid" th:attr="value=${itemid}" />
  15. <input type="hidden" name="birth" value="" />
  16. <h6>选择体检人:</h6>
  17. <table>
  18. <tr>
  19. <td>
  20. <span th:each="people : ${peoples}">
  21. <input name="fid" type="radio" th:attr="value=${people.id},id=${people.id}" class="radio" />
  22. <label th:attr="for=${people.id},onclick='selectPeople(' + ${people.id} + ')'" for="tj1" th:text="${people.name}"></label>
  23. </span>
  24. </td>
  25. </tr>
  26. </table>
  27. <h6>体检人证件号:</h6>
  28. <table>
  29. <tr>
  30. <td style="width: 100px;">
  31. <div class="box mr10">
  32. <select name="">
  33. <option selected="selected">身份证</option>
  34. </select>
  35. </div>
  36. </td>
  37. <td>
  38. <div class="box">
  39. <input name="idcard" type="text" id="idcard" placeholder="请输入证件ID" />
  40. </div>
  41. </td>
  42. </tr>
  43. </table>
  44. <h6>姓名:</h6>
  45. <table>
  46. <tr>
  47. <td>
  48. <div class="box">
  49. <input name="name" type="text" id="name" placeholder="请输入姓名" />
  50. </div>
  51. </td>
  52. </tr>
  53. </table>
  54. <h6>性别:</h6>
  55. <table>
  56. <tr>
  57. <td>
  58. <input name="sex" type="radio" class="radio" id="sex1" value="1" checked="checked" /><label for="sex1">男</label>
  59. <input name="sex" type="radio" value="0" id="sex0" class="radio" /><label for="sex0">女</label>
  60. </td>
  61. </tr>
  62. </table>
  63. <h6>手机号码:</h6>
  64. <table>
  65. <tr>
  66. <td>
  67. <div class="box">
  68. <input name="phone" id="phone" type="tel" placeholder="请输入手机号" readonly="readonly"/>
  69. </div>
  70. </td>
  71. </tr>
  72. </table>
  73. <h6>体检日期及时间:</h6>
  74. <table>
  75. <tr>
  76. <td>
  77. <div class="box">
  78. <input id="atime" name="atime" type="date" placeholder="请选择体检日期" />
  79. </div>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>
  84. <div class="box mt10">
  85. <select id="extend" name="extend">
  86. <option value="08:00">08:00</option>
  87. <option value="08:30">08:30</option>
  88. <option value="09:00">09:00</option>
  89. </select>
  90. </div>
  91. </td>
  92. </tr>
  93. </table>
  94. <div class="h100"></div>
  95. <div class="registerBottom">
  96. <a href="/h5/buy/mypayedorders" class="last">取消</a><a href="javascript:save()" class="next">预约</a>
  97. </div>
  98. </form>
  99. </div>
  100. <script th:inline="javascript">
  101. var peoples = JSON.parse([[${peoplesJSON}]])
  102. /* <![CDATA[ */
  103. function selectPeople(id) {
  104. for (var i = 0; i < peoples.length; ++i) {
  105. var obj = peoples[i]
  106. if (obj.id == id) {
  107. $("#idcard").val(obj.idcard);
  108. $("#name").val(obj.name);
  109. $("#sex" + obj.sex).attr("checked", "checked")
  110. $("#phone").val(obj.phone)
  111. }
  112. }
  113. }
  114. function save() {
  115. var idcard = $("#idcard").val();
  116. var name = $("#name").val();
  117. var phone = $("#phone").val();
  118. if (idcard.length == 0){
  119. alert("请输入身份证号");
  120. return;
  121. }
  122. if (name.length == 0){
  123. alert("请输入姓名");
  124. return;
  125. }
  126. if (phone.length == 0){
  127. alert("请输入手机号");
  128. return;
  129. }
  130. $("#form1").submit();
  131. }
  132. /* ]]> */
  133. </script>
  134. </body>
  135. </html>