edit.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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/remote/save",
  12. data:data,type:"get",
  13. success:function(rs){
  14. if(rs.indexOf("insert_ok")>=0){
  15. document.location.href="edit?id="+rs.split(";")[1];
  16. }else if(rs=="update_ok"){
  17. document.location.reload();
  18. }else{
  19. alert("保存失败!");
  20. }
  21. },error:function(e,e1,e2){
  22. alert(e2);
  23. }
  24. });
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <form id="myform" action="" method="get" >
  30. <input name="id" type="hidden" value="{if isset($remote) }{$remote.id}{/if}" />
  31. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
  32. <tr>
  33. <th width="105" height="38" align="right" >属性&nbsp;</th>
  34. <th>信息</th>
  35. </tr>
  36. <tr>
  37. <th height="32" align="right" >下级机构:</th>
  38. <td>
  39. <select name="hospital_id">
  40. {if !isset($remote)}<option value = '' selected>请选择下级机构</option>{/if}
  41. {foreach insJson as $key => $val}
  42. <option {if isset($remote) && $val.id==$remote.hospital_id }selected{/if} value ={$val.id} >{$val.name}</option>
  43. {/foreach}
  44. </select>
  45. </td>
  46. <th height="32" align="right" >检查类型:</th>
  47. <td >
  48. <select name="exam_class">
  49. {if !isset($remote)}<option value = '' selected>请选择检查类型</option>{/if}
  50. {foreach $class as $key => $val}
  51. <option {if isset($remote) && $val==$remote.exam_class }selected{/if} value ={$val}>{$val}</option>
  52. {/foreach}
  53. </select>
  54. </td>
  55. </tr>
  56. <tr>
  57. <th height="32" align="right" >远程医生:</th>
  58. <td >
  59. <select name="super_doctor_id">
  60. {if !isset($remote)}<option value = '' selected><option value = '' selected>请选择远程医生</option>{/if}
  61. {foreach $doctors as $key => $val}
  62. <option {if isset($remote) && $val.id==$remote.super_doctor_id }selected{/if} value ={$val.id}>{$val.realname}</option>
  63. {/foreach}
  64. </select>
  65. </td>
  66. <th height="32" align="right" >问诊价格:</th>
  67. <td >
  68. <input name="money" class="easyui-textbox" type="text" size="25" value="{if isset($remote) }{$remote.money}{/if}" />
  69. </td>
  70. </tr>
  71. <tr>
  72. <th height="32" align="right" >备注:</th>
  73. <td colspan="3" >
  74. <textarea name="remark" cols="55" class="easyui-textbox" rows="3" >{if isset($remote) }{$remote.remark}{/if}</textarea>
  75. </td>
  76. </tr>
  77. {if isset($remote) }
  78. <tr>
  79. <th height="32" align="right" >{if $remote["createdAt"] != null }创建时间:{/if}</th>
  80. <td >{if $remote["createdAt"] != null }
  81. <input type="text" readonly="readonly" class="easyui-datetimebox" size="20" value="{$remote['createdAt']}" />{/if}
  82. </td>
  83. <th height="32" align="right" >{if $remote["updatedAt"] != null }更新时间:{/if}</th>
  84. <td >{if $remote["updatedAt"] != null }
  85. <input type="text" readonly="readonly" class="easyui-datetimebox" size="20" value="{$remote['updatedAt']}" />{/if}
  86. </td>
  87. </tr>
  88. {/if}
  89. <tr>
  90. <th height="32" >&nbsp;</th>
  91. <td>
  92. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
  93. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
  94. </td>
  95. </tr>
  96. <tr >
  97. <th height="32" >&nbsp;</th>
  98. <td>
  99. &nbsp;
  100. </td>
  101. </tr>
  102. </table>
  103. </form>
  104. </body>
  105. </html>