edit.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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/doctors/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. $('#institution_id').combotree({
  31. required:true,multiple:false,editable:false,
  32. valueField:'id',textField:'name',panelWidth:350,
  33. url:"/manage/doctors/insCombobox"
  34. });
  35. });
  36. </script>
  37. </head>
  38. <body>
  39. <form id="myform" action="" method="get">
  40. <input name="id" type="hidden" value="{if isset($doctors) }{$doctors.id}{/if}" />
  41. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1">
  42. <tr>
  43. <th height="38" align="right">属性&nbsp;</th>
  44. <th colspan="3">信息</th>
  45. </tr>
  46. <tr>
  47. <th height="32" width="15%" align="right">用户名:</th>
  48. <td width="35%" >
  49. <input name="username" type="text" class="easyui-textbox" size="25" value="{if isset($doctors) }{$doctors.username}{/if}" />
  50. </td>
  51. <th height="32" width="15%" align="right">密码:</th>
  52. <td width="35%" >
  53. <input name="password" type="password" class="easyui-textbox" size="25" value="{if isset($doctors) }{$doctors.password}{/if}" />
  54. </td>
  55. </tr>
  56. <tr>
  57. <th height="32" align="right">真实姓名:</th>
  58. <td >
  59. <input name="realname" type="text" class="easyui-textbox" size="25" value="{if isset($doctors) }{$doctors.realname}{/if}" />
  60. </td>
  61. <th height="32" align="right">手机号:</th>
  62. <td >
  63. <input name="phone" type="text" class="easyui-textbox" size="25" value="{if isset($doctors) }{$doctors.phone}{/if}" />
  64. </td>
  65. </tr>
  66. <tr>
  67. <th height="32" align="right">机构:</th>
  68. <td >
  69. <input name="institution_id" id="institution_id" type="text" size="20" value="{if isset($doctors) }{$doctors.institution_id}{/if}" />
  70. </td>
  71. <th height="32" align="right">主要科室:</th>
  72. <td >
  73. <select name="department_id" class="easyui-combobox" style="width:100px;" >
  74. {volist name="department" id="dpm"}
  75. <option value="{$dpm.id}" {if isset($doctors) }{if $dpm.id==$doctors.department_id}selected{/if}{/if}>{$dpm.department_name}</option>
  76. {/volist}
  77. </select>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th height="32" align="right">职称:</th>
  82. <td >
  83. <input name="doctor_title" type="text" class="easyui-textbox" size="25" value="{if isset($doctors) }{$doctors.doctor_title}{/if}" />
  84. </td>
  85. <th height="32" align="right">医生角色:</th>
  86. <td >
  87. <input name="doctor_role[]" id="doctor_role_local" type="checkbox" size="35" value="1" {if isset($doctors) && in_array(1,$doctors.doctor_role) }checked="check" {/if} /><label for="doctor_role_local" >本地医生</label>
  88. <input name="doctor_role[]" id="doctor_role_remote" type="checkbox" size="35" value="2" {if isset($doctors) && in_array(2,$doctors.doctor_role) }checked="check" {/if} /><label for="doctor_role_remote" >远程医生</label>
  89. </td>
  90. </tr>
  91. <tr>
  92. <th height="32" align="right">是否能写报告:</th>
  93. <td >
  94. <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>
  95. <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>
  96. </td>
  97. <th height="32" align="right">附件:</th>
  98. <td >
  99. <a href="{if isset($doctors) }{$doctors.attachment}{/if}" download="">下载附件</a>
  100. </td>
  101. </tr>
  102. <tr>
  103. <th height="32" align="right">备注:</th>
  104. <td colspan="3">
  105. <input name="remark" type="text" size="55" class="easyui-textbox" value="{if isset($doctors) }{$doctors.remark}{/if}" />
  106. </td>
  107. </tr>
  108. <tr>
  109. <th height="32" align="right">信息状态:</th>
  110. <td colspan="3" >
  111. <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>
  112. <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>
  113. </td>
  114. </tr>
  115. <tr>
  116. <th height="32" align="right">分类:</th>
  117. <td colspan="3" >
  118. {foreach $doctorclas as $key => $val}
  119. <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>
  120. {/foreach}
  121. </td>
  122. </tr>
  123. <tr>
  124. <th height="32" align="right">检查类权限:</th>
  125. <td colspan="3" >
  126. {foreach $examclass as $key => $val}
  127. <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>
  128. {/foreach}
  129. </td>
  130. </tr>
  131. <tr>
  132. <th height="32">&nbsp;</th>
  133. <td colspan="3" height="50" >
  134. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()">保存</a>
  135. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');">关闭</a>
  136. </td>
  137. </tr>
  138. <tr>
  139. <th height="32">&nbsp;</th>
  140. <td colspan="3">
  141. &nbsp;
  142. </td>
  143. </tr>
  144. </table>
  145. </form>
  146. </body>
  147. </html>