| | |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="margin-bottom: -25px;">  |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" autocomplete="off" width="400px" /></div>  |
| | | <button id="contract-btn-search" class="layui-btn icon-btn permissions" permissions="contract-list" style="margin-bottom: -25px;"><i class="layui-icon"></i>搜索</button> |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" |
| | | autocomplete="off" width="400px" /></div>  |
| | | <button id="contract-btn-search" class="layui-btn icon-btn permissions" permissions="contract-list" |
| | | style="margin-bottom: -25px;"><i class="layui-icon"></i>搜索</button> |
| | | </div> |
| | | <table class="layui-table" id="contract-table" lay-filter="contract-table"></table> |
| | | </div> |
| | | <table class="layui-table" id="contract-table" lay-filter="contract-table"></table> |
| | | </div></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <input id="hospitalId" type="hidden" /> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="contract-table-bar"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="contract-del" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs permissions" permissions="productorderdetail-save" lay-event="detail">查看套餐</a> |
| | | <!-- <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="contract-del" lay-event="del">删除</a> --> |
| | | <a class="layui-btn layui-btn-xs permissions" permissions="contract-edit" lay-event="edit"">修改</a> |
| | | <a class=" layui-btn layui-btn-primary layui-btn-xs permissions" permissions="productorderdetail-save" |
| | | lay-event="detail">查看套餐</a> |
| | | </script> |
| | | <!-- 表格状态列 --> |
| | | <script type="text/html" id="contract-tpl-state"> |
| | |
| | | { field: 'departmentName', width: 200, title: '科室名称' }, |
| | | { field: 'contractNo', width: 150, title: '合同编号' }, |
| | | { field: 'contractTitle', width: 200, title: '合同名' }, |
| | | { field: 'contractBeginTime', width: 120, title: '合同生效时间',templet:function(d) |
| | | { |
| | | return new Date(d.contractBeginTime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | field: 'contractBeginTime', width: 120, title: '合同生效时间', templet: function (d) { |
| | | return new Date(d.contractBeginTime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | }, |
| | | { field: 'contractEndTime', width: 120, title: '合同到期时间',templet:function(d){ |
| | | return new Date(d.contractEndTime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'contractTime', width: 120, title: '合同签订时间',templet:function(d){ |
| | | return new Date(d.contractTime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { |
| | | field: 'contractEndTime', width: 120, title: '合同到期时间', templet: function (d) { |
| | | return new Date(d.contractEndTime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | }, |
| | | { |
| | | field: 'contractTime', width: 120, title: '合同签订时间', templet: function (d) { |
| | | return new Date(d.contractTime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | }, |
| | | // { field: 'enabled', width: 120, templet: '#contract-tpl-state', sort: true, title: '状态' }, |
| | | { field: 'createTime', width: 160, title: '创建时间' , templet: function (d) { |
| | | return new Date(d.createTime).dateFormat("yyyy-MM-dd hh:mm"); |
| | | }}, |
| | | { align: 'center', width: 150, toolbar: '#contract-table-bar', title: '操作', |
| | | fixed: 'right'} |
| | | { |
| | | field: 'createTime', width: 160, title: '创建时间', templet: function (d) { |
| | | return new Date(d.createTime).dateFormat("yyyy-MM-dd hh:mm"); |
| | | } |
| | | }, |
| | | { |
| | | align: 'center', width: 150, toolbar: '#contract-table-bar', title: '操作', |
| | | fixed: 'right' |
| | | } |
| | | ]], |
| | | done:function(res){ |
| | | permissionsInput(res,config); |
| | | done: function (res) { |
| | | permissionsInput(res, config); |
| | | } |
| | | }); |
| | | } |
| | |
| | | }, 'DELETE'); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | else if (obj.event === 'edit') { |
| | | //修改 |
| | | updateModel(obj.data); |
| | | } else if (obj.event === 'detail') { |
| | | //充值记录列表 |
| | | showModel(obj.data.id); |
| | | } |
| | | }); |
| | |
| | | // 搜索按钮点击事件 |
| | | $('#contract-btn-search').click(function () { |
| | | var hospitalName = $('#hospital-search-value').val(); |
| | | if(strUtil.isEmpty(hospitalName)) |
| | | { |
| | | if (strUtil.isEmpty(hospitalName)) { |
| | | $("#hospitalId").val(""); |
| | | } |
| | | table.reload('contract-table', { |
| | | where: { hospitalId: $("#hospitalId").val()}, |
| | | table.reload('contract-table', { |
| | | where: { hospitalId: $("#hospitalId").val() }, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | curr: 1 |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | var showModel=function(orderId){ |
| | | layer.open({ |
| | | type:1, |
| | | title:'查看产品', |
| | | area: '1200px', |
| | | offset: '100px', |
| | | content: $('#contract-model').html(), |
| | | success:function(){ |
| | | table.render({ |
| | | elem: '#contract-table-detail', |
| | | url: config.base_server + 'api-opration/productorderrecord', |
| | | method: 'GET', |
| | | where:{'orderId':orderId}, |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | | limit:10, |
| | | limits:[5,10], |
| | | cols: [[ |
| | | { field: 'proName', width: 300, title: '产品名称' }, |
| | | { field: 'ailightCount', width: 150, title: '读片量' }, |
| | | { field: 'recordCount', width: 100, title: '报告量' }, |
| | | { field: 'isShare', width: 150, title: '是否共享',templet:function(d) |
| | | { |
| | | if(d.isShare) |
| | | return '共享' |
| | | else |
| | | return '私有' |
| | | } |
| | | }, |
| | | { field: 'proBegintime', width: 150, title: '开始时间',templet:function(d){ |
| | | return new Date(d.proBegintime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'proEndtime', width: 180, title: '结束时间',templet:function(d){ |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间' } |
| | | ]] |
| | | var showModel = function (orderId) { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '查看产品', |
| | | area: '1200px', |
| | | offset: '100px', |
| | | content: $('#contract-model').html(), |
| | | success: function () { |
| | | table.render({ |
| | | elem: '#contract-table-detail', |
| | | url: config.base_server + 'api-opration/productorderrecord', |
| | | method: 'GET', |
| | | where: { 'orderId': orderId }, |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | | limit: 10, |
| | | limits: [5, 10], |
| | | cols: [[ |
| | | { field: 'proName', width: 300, title: '产品名称' }, |
| | | { field: 'ailightCount', width: 150, title: '读片量' }, |
| | | { field: 'recordCount', width: 100, title: '报告量' }, |
| | | { |
| | | field: 'isShare', width: 150, title: '是否共享', templet: function (d) { |
| | | if (d.isShare) |
| | | return '共享' |
| | | else |
| | | return '私有' |
| | | } |
| | | }, |
| | | { |
| | | field: 'proBegintime', width: 150, title: '开始时间', templet: function (d) { |
| | | return new Date(d.proBegintime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | }, |
| | | { |
| | | field: 'proEndtime', width: 180, title: '结束时间', templet: function (d) { |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd"); |
| | | } |
| | | }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间' } |
| | | ]] |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | var updateModel = function (data) { |
| | | //修改充值记录 |
| | | admin.putTempData("t_hospital", data); |
| | | admin.popupCenter({ |
| | | title: '修改合同', |
| | | path: 'pages/opration/rechargeupdate.html', |
| | | area: '1200px', |
| | | offset: '0px', |
| | | finish: function () { |
| | | $('#hospita-btn-search').click(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | </script> |