123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('DTP医院')" />
- <th:block th:include="include :: layout-latest-css" />
- <th:block th:include="include :: ztree-css" />
- </head>
- <body class="gray-bg">
- <div class="ui-layout-center">
- <div class="container-div">
- <div class="row">
- <div class="col-sm-12 search-collapse">
- <form id="tag-form">
- <input type="hidden" id="deptId" name="deptId">
- <input type="hidden" id="parentId" name="parentId">
- <div class="select-list">
- <ul>
- <li>
- 医院名称:<input type="text" class="styled-input" placeholder="请输入医院名称" name="standardName"/>
- </li>
- <li>
- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
- </li>
- </ul>
- </div>
- </form>
- </div>
- <div class="col-sm-12 select-table table-striped">
- <table id="bootstrap-table"></table>
- </div>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <th:block th:include="include :: layout-latest-js" />
- <th:block th:include="include :: ztree-js" />
- <script th:inline="javascript">
- var GLCF = [[${@permission.hasPermi('dtp:configInfo:view')}]];
- var prefix = ctx + "dtp/configInfo";
- $(function() {
- var panehHidden = false;
- if ($(this).width() < 1590) {
- panehHidden = true;
- }
- $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
- // 回到顶部绑定
- if ($.fn.toTop !== undefined) {
- var opt = {
- win:$('.ui-layout-center'),
- doc:$('.ui-layout-center')
- };
- $('#scroll-up').toTop(opt);
- }
- queryUserList();
- });
- function queryUserList() {
- var options = {
- url: prefix + "/dtpHospitalList",
- viewUrl: prefix + "/AssociatedPrescription/{id}",
- sortName: "createTime",
- sortOrder: "desc",
- modalName: "医院名单",
- showFooter:true, //是否显示表格底部区域。
- clickToSelect: true, //是否启用点击行时选中整行的功能。
- singleSelect: false, //是否仅允许选择一行
- columns: [
- {
- field: "id",
- title: "医院主键",
- align: 'center',
- visible: true,
- },{
- field: "standardName",
- title: "医院标准名称",
- align: 'center',
- },
- {
- "field": "address",
- "title": "医院地址",
- align: 'center',
- },{
- "field": "phone",
- "title": "医院电话",
- align: 'center',
- } ,{
- title: '操作',
- align: 'center',
- formatter: function(value, row, index) {
- if (row.id) {
- var actions = [];
- 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>');
- return actions.join('');
- } else {
- return "";
- }
- }
- }]
- };
- $.table.init(options);
- }
- $('#btnExpand').click(function() {
- $._tree.expandAll(true);
- $(this).hide();
- $('#btnCollapse').show();
- });
- $('#btnCollapse').click(function() {
- $._tree.expandAll(false);
- $(this).hide();
- $('#btnExpand').show();
- });
- $('#btnRefresh').click(function() {
- });
- /* 用户管理-新增-选择门店树 */
- function selectDeptTree() {
- var treeId = $("#treeId").val();
- var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
- var url = ctx + "system/user/selectDeptTree/" + deptId;
- var options = {
- title: '选择门店',
- width: "380",
- url: url,
- callBack: doSubmit
- };
- $.modal.openOptions(options);
- }
- function doSubmit(index, layero){
- var body = $.modal.getChildFrame(index);
- $("#treeId").val(body.find('#treeId').val());
- $("#treeName").val(body.find('#treeName').val());
- $.modal.close(index);
- }
- /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
- function resetPre() {
- resetDate();
- $("#tag-form")[0].reset();
- $("#deptId").val("");
- $("#parentId").val("");
- $(".curSelectedNode").removeClass("curSelectedNode");
- $.table.search();
- }
- function viewPrescription(id){
- var url = prefix + "/AssociatedPrescription/" + id;
- $.modal.openTab("关联处方", url);
- }
- </script>
- </body>
- </html>
|