edit.html 8.3 KB

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