edit.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>TODO supply a title</title>
  5. {include file="../application/manage/view/commons/headers.html" }
  6. <script>
  7. // 保存信息
  8. function save() {
  9. var data = $("#myform").serialize();
  10. $.ajax({
  11. url: "/manage/insdoctors/save",
  12. data: data,
  13. type: "get",
  14. success: function(rs) {
  15. if (rs.indexOf("insert_ok") >= 0) {
  16. document.location.href = "edit?id=" + rs.split(";")[1];
  17. } else if (rs == "success") {
  18. alert('保存成功');
  19. document.location.reload();
  20. } else {
  21. alert("保存失败!");
  22. }
  23. },
  24. error: function(e, e1, e2) {
  25. alert(e2);
  26. }
  27. });
  28. }
  29. $(function() {
  30. });
  31. </script>
  32. </head>
  33. <body>
  34. <form id="myform" action="" method="get">
  35. <input name="id" type="hidden" value="{if isset($doctors) }{$doctors.id}{/if}" />
  36. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1">
  37. <tr>
  38. <th width="105" height="38" align="right">属性&nbsp;</th>
  39. <th colspan="3">信息</th>
  40. </tr>
  41. <tr>
  42. <th height="32" align="right">用户名:</th>
  43. <td colspan="3">
  44. <input name="username" type="text" class="easyui-textbox" size="55" value="{if isset($doctors) }{$doctors.username}{/if}" />
  45. </td>
  46. </tr>
  47. <tr>
  48. <th height="32" align="right">密码:</th>
  49. <td colspan="3">
  50. <input name="password" type="password" class="easyui-textbox" size="55" value="{if isset($doctors) }{$doctors.password}{/if}" />
  51. </td>
  52. </tr>
  53. <tr>
  54. <th height="32" align="right">真实姓名:</th>
  55. <td colspan="3">
  56. <input name="realname" type="text" class="easyui-textbox" size="55" value="{if isset($doctors) }{$doctors.realname}{/if}" />
  57. </td>
  58. </tr>
  59. <tr>
  60. <th height="32" align="right">手机号:</th>
  61. <td colspan="3">
  62. <input name="phone" type="text" class="easyui-textbox" size="55" value="{if isset($doctors) }{$doctors.phone}{/if}" />
  63. </td>
  64. </tr>
  65. <tr>
  66. <th height="32" align="right">医疗机构:</th>
  67. <td colspan="3">
  68. <select name="institution_id" class="easyui-combobox" style="width:200px;" >
  69. {if isset($institution) }
  70. {volist name="institution" id="ins"}
  71. <option value="{$ins.id}" {if isset($doctors) }{if $ins.id==$doctors.institution_id}selected{/if}{/if}>{$ins.name}</option>
  72. {/volist}
  73. {/if}
  74. </select>
  75. </td>
  76. </tr>
  77. <tr>
  78. <th height="32" align="right">主要科室:</th>
  79. <td colspan="3">
  80. <select name="department_id" class="easyui-combobox" style="width:100px;" >
  81. {volist name="department" id="dpm"}
  82. <option value="{$dpm.id}" {if isset($doctors) }{if $dpm.id==$doctors.department_id}selected{/if}{/if}>{$dpm.department_name}</option>
  83. {/volist}
  84. </select>
  85. </td>
  86. </tr>
  87. <tr>
  88. <th height="32" align="right">职称:</th>
  89. <td colspan="3">
  90. <input name="doctor_title" type="text" class="easyui-textbox" size="55" value="{if isset($doctors) }{$doctors.doctor_title}{/if}" />
  91. </td>
  92. </tr>
  93. <tr>
  94. <th height="32" align="right">医生角色:</th>
  95. <td colspan="3">
  96. <input name="doctor_role[]" type="checkbox" size="35" value="1" {if isset($doctors) && in_array(1,$doctors.doctor_role) }checked="check" {/if} /><label>本地医生</label>
  97. <input name="doctor_role[]" type="checkbox" size="35" value="2" {if isset($doctors) && in_array(2,$doctors.doctor_role) }checked="check" {/if} /><label>远程医生</label>
  98. </td>
  99. </tr>
  100. <tr>
  101. <th height="32" align="right">附件:</th>
  102. <td colspan="3">
  103. <a href="{if isset($doctors) }{$doctors.attachment}{/if}" download="">下载附件</a>
  104. </td>
  105. </tr>
  106. <tr>
  107. <th height="32" align="right">是否能写报告:</th>
  108. <td colspan="3">
  109. <input name="is_report" id="is_report_1" type="radio" size="35" value="1" {if isset($doctors) && $doctors.is_report=='1' }checked="check" {/if} /><label for="is_report_1" >是</label>
  110. <input name="is_report" id="is_report_0" type="radio" size="35" value="0" {if isset($doctors) && $doctors.is_report=='0' }checked="check" {/if} /><label for="is_report_0">否</label>
  111. </td>
  112. </tr>
  113. <tr>
  114. <th height="32" align="right">备注:</th>
  115. <td colspan="3">
  116. <input name="remark" type="text" size="55" class="easyui-textbox" value="{if isset($doctors) }{$doctors.remark}{/if}" />
  117. </td>
  118. </tr>
  119. <tr>
  120. <th height="32" align="right">信息状态:</th>
  121. <td colspan="3">
  122. <input name="status" id="status_1" type="radio" size="35" value="1" {if isset($doctors) && $doctors.status=='1' }checked="check" {/if} /><label for="status_1" >正常</label>
  123. <input name="status" id="status_0" type="radio" size="35" value="0" {if isset($doctors) && $doctors.status=='0' }checked="check" {/if} /><label for="status_0" >屏蔽</label>
  124. </td>
  125. </tr>
  126. <tr>
  127. <th height="32" align="right">分类:</th>
  128. <td colspan="3" >
  129. {foreach $doctorclas as $key => $val}
  130. <input name="doctorcla[]" id="sorts_{$val.constant_key}" type="checkbox" size="55" value="{$val.constant_key}" {if isset($doctorcla) && in_array($val.constant_key,$doctorcla) }checked{/if} /><label for="sorts_{$val.constant_key}" >{$val.name}</label>
  131. {/foreach}
  132. </td>
  133. </tr>
  134. <tr>
  135. <th height="32" align="right">检查类权限:</th>
  136. <td colspan="3" >
  137. {foreach $examclass as $key => $val}
  138. <input name="examcla[]" id="" type="checkbox" size="55" value="{$val.constant_key}" {if isset($examcla) && in_array($val.constant_key,$examcla) }checked{/if} /><label for="sorts_{$val.constant_key}" >{$val.constant_value}</label>
  139. {/foreach}
  140. </td>
  141. </tr>
  142. <tr>
  143. <th height="32">&nbsp;</th>
  144. <td>
  145. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()">保存</a>
  146. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');">关闭</a>
  147. </td>
  148. </tr>
  149. <tr>
  150. <th height="32">&nbsp;</th>
  151. <td colspan="3">
  152. &nbsp;
  153. </td>
  154. </tr>
  155. </table>
  156. </form>
  157. </body>
  158. </html>