index.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. var $editWin;
  9. var winHeight=$(window).height();
  10. var frameHeight=winHeight*0.9;
  11. $(function(){
  12. $editWin = $('#edit-window').window({
  13. title: '关键词编辑',
  14. width: 800,height: frameHeight,
  15. top: ($(document).height() -frameHeight ) /2 ,
  16. left: ($(document).width() -820 ) /2 ,
  17. shadow: true,modal: true,
  18. iconCls: 'icon-edit',closed: true,
  19. minimizable: false,maximizable: false,collapsible: false
  20. });
  21. })
  22. function dateFormatter(date){
  23. if(typeof date=="undefined"){ return "--"; }
  24. return new Date(date).format("yyyyMMdd hh:mm:ss");
  25. }
  26. function commandsFormatter(id,row){
  27. var cmdEdit="<a href='#' onclick=\"javascript:showEditWin('"+row.id+"');\" >编辑</a>&nbsp;";
  28. if(row.status != 1){
  29. cmdEdit+="<a href='#' onclick=\"javascript:deleteRow('"+row.id+"');\" >删除</a>";
  30. }
  31. return cmdEdit;
  32. }
  33. function delstatusFormatter(mode){
  34. if(mode == '1'){ return "屏蔽";
  35. }else if(mode=="0"){ return "正常";
  36. }else{ return "--";
  37. }
  38. }
  39. function urgentFormatter(mode){
  40. if(mode == '1'){ return "是";
  41. }else if(mode=="0"){ return "否";
  42. }else{ return "--";
  43. }
  44. }
  45. function applicationFormatter(mode){
  46. if(mode == '1'){ return "未申请";
  47. }else if(mode=="2"){ return "已申请,待接受";
  48. }else if(mode=="3"){ return "诊断中";
  49. }else if(mode=="4"){ return "诊断完成,待确认";
  50. }else if(mode=="5"){ return "已确认";
  51. }else if(mode=="6"){ return "已打印";
  52. }else if(mode=="7"){ return "驳回";
  53. }else{ return "--";
  54. }
  55. }
  56. $(function(){
  57. var height=$(document).height();
  58. $("#gd").height(height);
  59. $('#gd').datagrid({
  60. url:'/manage/remoteapplication/datas',
  61. idField:'id',method: 'get',rownumbers: true,showFooter: true,
  62. toolbar: '#tb',pageList: [ dgRowSize , dgRowSize*2 , 100 ] , pagination:true, pageSize: dgRowSize ,
  63. columns:[[
  64. {field:'id',title:'ID',width:180 ,hidden:true },
  65. {field:'remote_institution_id',title:'申请的目标医院',align: 'center',width:120,hidden:true },
  66. {field:'remote_institution_name',title:'申请的目标医院',align: 'center',width:120},
  67. {field:'remote_doctor_id',title:'申请的目标医生',width:"120",align: 'center',hidden:true },
  68. {field:'remote_doctor_name',title:'申请的目标医生',width:"120",align: 'center' },
  69. {field:'local_institution_id',title:'发起申请医院',width:120,align: 'center',hidden:true },
  70. {field:'local_institution_name',title:'发起申请医院',width:120,align: 'center'},
  71. {field:'req_date_time',title:'发起时间',align: 'center', width:135, formatter:dateFormatter },
  72. {field:'req_doctor_id',title:'申请医生',width:"100",align: 'center',hidden:true },
  73. {field:'req_doctor_name',title:'申请医生',width:"100",align: 'center'},
  74. {field:'illness_desc',title:'主诉',align: 'center', width:135},
  75. {field:'clin_symp',title:'临床症状',width:"120",align: 'center'},
  76. {field:'phys_sign',title:'体征',width:"100",align: 'center' },
  77. {field:'clin_diag',title:'临床诊断',width:"120",align: 'center' },
  78. {field:'anamnesis',title:'既往史',width:"120",align: 'center' },
  79. {field:'family_ill',title:'家族史',width:"120",align: 'center'},
  80. {field:'marrital',title:'婚姻史',width:"120",align: 'center' },
  81. {field:'remark',title:'备注',width:"100",align: 'center' },
  82. {field:'exam_id',title:'检查表id',width:"120",align: 'center',hidden:true},
  83. {field:'is_urgent',title:'是否急诊',width:"120",align: 'center',formatter:urgentFormatter },
  84. {field:'application_status',title:'远程申请状态',width:180,align: 'center',formatter:applicationFormatter },
  85. {field:'status',title:'删除状态',width:80,align: 'center',formatter:delstatusFormatter },
  86. {field:'ctime',title:'创建时间',align: 'center', width:135, formatter:dateFormatter },
  87. {field:'grid_commands',title:'操作',align: 'center',width:100, formatter:commandsFormatter },
  88. ]],
  89. onDblClickRow :function(rowIndex,rowData){
  90. showEditWin(rowData.id);
  91. },
  92. });
  93. });
  94. // 显示编辑窗口
  95. function showEditWin(id){
  96. if("undefined"== typeof id){
  97. $editWin.window('open');$('#editFrame').attr('src','/manage/remoteapplication/edit');
  98. }else{
  99. $editWin.window('open');$('#editFrame').attr('src','/manage/remoteapplication/edit?id='+id);
  100. }
  101. }
  102. function deleteRow(id){
  103. $.messager.confirm('Confirm','确定要删除这条记录吗?',function(r){
  104. if(r){
  105. $.ajax({
  106. url:"/manage/remoteapplication/delete",
  107. data:"ids="+id+"&t="+new Date(),
  108. success:function(rs){
  109. if(rs=="delete_ok"){
  110. alert("操作已成功!");
  111. document.location.reload();
  112. }else{
  113. alert("操作失败!");
  114. }
  115. }
  116. });
  117. }
  118. });
  119. }
  120. // 关闭编辑窗口
  121. function closeEditWin(isReload){
  122. $editWin.window('close');
  123. if(isReload=="reload"){
  124. document.location.reload();
  125. }
  126. }
  127. </script>
  128. </head>
  129. <body>
  130. <div id="gd" class="easyui-datagrid" style="width:100%;height:auto;" ></div>
  131. <div id="tb" class="editform" style="display: none; padding-top: 1px;">&nbsp;
  132. 菜单:<select id="catid" name="params.catid" style="width: 150px; " >
  133. <option value="" >查询全部</option></select>&nbsp;
  134. 状态:<select id="status" name="params.status" style="width: 80px; " >
  135. <option value="" >查询全部</option><option value="1" >可用</option><option value="0" >不可用</option>
  136. </select>&nbsp;
  137. 标题:<input type="text" id="title" name="title" class="easyui-textbox" style="width: 200px; vertical-align: middle;" title="菜单名称" />&nbsp;
  138. <a id="submit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width: 80px">查询</a>
  139. <a id="reset" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear'" style="width: 80px" onclick="reset()" >重置</a>
  140. &nbsp;&nbsp;&nbsp;&nbsp;
  141. </div>
  142. <div id="edit-window" class="easyui-window" style="overflow: hidden" ><iframe src="about:blank" id="editFrame" width="100%" height="100%" frameborder="0" scrolling="yes" ></iframe></div>
  143. </body>
  144. </html>