edit.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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/doctorclass/save",
  12. data:data,type:"get",
  13. success:function(rs){
  14. if(rs.indexOf("insert_ok")>=0){
  15. alert('新增成功');
  16. document.location.href="edit?id="+rs.split(";")[1];
  17. }else if(rs=="update_ok"){
  18. alert('保存成功');
  19. }else{
  20. alert("保存失败!");
  21. }
  22. },error:function(e,e1,e2){
  23. alert(e2);
  24. }
  25. });
  26. }
  27. </script>
  28. </head>
  29. <body>
  30. <form id="myform" action="" method="get" >
  31. <input name="id" type="hidden" value="{if isset($doctorclass) }{$doctorclass.id}{/if}" />
  32. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
  33. <tr>
  34. <th width="105" height="38" align="right" >属性&nbsp;</th>
  35. <th colspan="3" >信息</th>
  36. </tr>
  37. <tr>
  38. <th height="32" align="right" >医生:</th>
  39. <td colspan="3" >
  40. <select name="doctor_id" >
  41. {volist name="doctors" id="doc"}
  42. <option value="{$doc.id}" {if isset($doctorclass) }{if $doc.id==$doctorclass.doctor_id}selected{/if}{/if}>{$doc.realname}</option>
  43. {/volist}
  44. </select>
  45. </td>
  46. </tr>
  47. <tr>
  48. <th height="32" align="right" >科室:</th>
  49. <td colspan="3" >
  50. <select name="department_id" >
  51. {volist name="department" id="dep"}
  52. <option value="{$dep.id}" {if isset($doctorclass) }{if $dep.id==$doctorclass.department_id}selected{/if}{/if}>{$dep.department_name}</option>
  53. {/volist}
  54. </select>
  55. </td>
  56. </tr>
  57. <tr>
  58. <th height="32" align="right" >医生类别:</th>
  59. <td colspan="3" >
  60. <input name="doctor_class[]" type="checkbox" size="35" value="1" {if isset($doctorclass) && in_array(1,$doctorclass.doctor_class) }checked="check"{/if} /><label>临床医生</label>
  61. <input name="doctor_class[]" type="checkbox" size="35" value="2" {if isset($doctorclass) && in_array(2,$doctorclass.doctor_class) }checked="check"{/if} /><label>报告医生</label>
  62. <input name="doctor_class[]" type="checkbox" size="35" value="3" {if isset($doctorclass) && in_array(3,$doctorclass.doctor_class) }checked="check"{/if} /><label>审核医生</label>
  63. <input name="doctor_class[]" type="checkbox" size="35" value="4" {if isset($doctorclass) && in_array(4,$doctorclass.doctor_class) }checked="check"{/if} /><label>确认医生</label>
  64. <input name="doctor_class[]" type="checkbox" size="35" value="5" {if isset($doctorclass) && in_array(5,$doctorclass.doctor_class) }checked="check"{/if} /><label>技师</label>
  65. </td>
  66. </tr>
  67. <tr>
  68. <th height="32" >&nbsp;</th>
  69. <td>
  70. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
  71. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
  72. </td>
  73. </tr>
  74. <tr >
  75. <th height="32" >&nbsp;</th>
  76. <td colspan="3" >
  77. &nbsp;
  78. </td>
  79. </tr>
  80. </table>
  81. </form>
  82. </body>
  83. </html>