dtpHospital.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('DTP医院')" />
  5. <th:block th:include="include :: layout-latest-css" />
  6. <th:block th:include="include :: ztree-css" />
  7. </head>
  8. <body class="gray-bg">
  9. <div class="ui-layout-center">
  10. <div class="container-div">
  11. <div class="row">
  12. <div class="col-sm-12 search-collapse">
  13. <form id="tag-form">
  14. <input type="hidden" id="deptId" name="deptId">
  15. <input type="hidden" id="parentId" name="parentId">
  16. <div class="select-list">
  17. <ul>
  18. <li>
  19. 医院名称:<input type="text" class="styled-input" placeholder="请输入医院名称" name="standardName"/>
  20. </li>
  21. <li>
  22. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  23. <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  24. </li>
  25. </ul>
  26. </div>
  27. </form>
  28. </div>
  29. <div class="col-sm-12 select-table table-striped">
  30. <table id="bootstrap-table"></table>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <th:block th:include="include :: footer" />
  36. <th:block th:include="include :: layout-latest-js" />
  37. <th:block th:include="include :: ztree-js" />
  38. <script th:inline="javascript">
  39. var GLCF = [[${@permission.hasPermi('dtp:configInfo:view')}]];
  40. var prefix = ctx + "dtp/configInfo";
  41. $(function() {
  42. var panehHidden = false;
  43. if ($(this).width() < 1590) {
  44. panehHidden = true;
  45. }
  46. $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
  47. // 回到顶部绑定
  48. if ($.fn.toTop !== undefined) {
  49. var opt = {
  50. win:$('.ui-layout-center'),
  51. doc:$('.ui-layout-center')
  52. };
  53. $('#scroll-up').toTop(opt);
  54. }
  55. queryUserList();
  56. });
  57. function queryUserList() {
  58. var options = {
  59. url: prefix + "/dtpHospitalList",
  60. viewUrl: prefix + "/AssociatedPrescription/{id}",
  61. sortName: "createTime",
  62. sortOrder: "desc",
  63. modalName: "医院名单",
  64. showFooter:true, //是否显示表格底部区域。
  65. clickToSelect: true, //是否启用点击行时选中整行的功能。
  66. singleSelect: false, //是否仅允许选择一行
  67. columns: [
  68. {
  69. field: "id",
  70. title: "医院主键",
  71. align: 'center',
  72. visible: true,
  73. },{
  74. field: "standardName",
  75. title: "医院标准名称",
  76. align: 'center',
  77. },
  78. {
  79. "field": "address",
  80. "title": "医院地址",
  81. align: 'center',
  82. },{
  83. "field": "phone",
  84. "title": "医院电话",
  85. align: 'center',
  86. } ,{
  87. title: '操作',
  88. align: 'center',
  89. formatter: function(value, row, index) {
  90. if (row.id) {
  91. var actions = [];
  92. actions.push('<a class="btn btn-success btn-xs' + GLCF + '" href="javascript:void(0)" onclick="viewPrescription(\'' + row.id + '\')"><i class="fa fa-search"></i>\t查看关联处方</a>');
  93. return actions.join('');
  94. } else {
  95. return "";
  96. }
  97. }
  98. }]
  99. };
  100. $.table.init(options);
  101. }
  102. $('#btnExpand').click(function() {
  103. $._tree.expandAll(true);
  104. $(this).hide();
  105. $('#btnCollapse').show();
  106. });
  107. $('#btnCollapse').click(function() {
  108. $._tree.expandAll(false);
  109. $(this).hide();
  110. $('#btnExpand').show();
  111. });
  112. $('#btnRefresh').click(function() {
  113. });
  114. /* 用户管理-新增-选择门店树 */
  115. function selectDeptTree() {
  116. var treeId = $("#treeId").val();
  117. var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
  118. var url = ctx + "system/user/selectDeptTree/" + deptId;
  119. var options = {
  120. title: '选择门店',
  121. width: "380",
  122. url: url,
  123. callBack: doSubmit
  124. };
  125. $.modal.openOptions(options);
  126. }
  127. function doSubmit(index, layero){
  128. var body = $.modal.getChildFrame(index);
  129. $("#treeId").val(body.find('#treeId').val());
  130. $("#treeName").val(body.find('#treeName').val());
  131. $.modal.close(index);
  132. }
  133. /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
  134. function resetPre() {
  135. resetDate();
  136. $("#tag-form")[0].reset();
  137. $("#deptId").val("");
  138. $("#parentId").val("");
  139. $(".curSelectedNode").removeClass("curSelectedNode");
  140. $.table.search();
  141. }
  142. function viewPrescription(id){
  143. var url = prefix + "/AssociatedPrescription/" + id;
  144. $.modal.openTab("关联处方", url);
  145. }
  146. </script>
  147. </body>
  148. </html>