| | |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" style="width: 100%;" /> |
| | | <input type="hidden" id="hospitalId" value=""> |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | |  <button id="product-btn-search" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | |
| | | var renderTable = function () { |
| | | table.render({ |
| | | elem: '#product-table', |
| | | url: config.base_server + 'api-opration/productorderdetail/all', |
| | | url: config.base_server + 'api-opration/productorderrecord/all', |
| | | method: 'GET', |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | |
| | | layer.confirm('确定要删除吗?', function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | admin.req('api-opration/productorderdetail/' + obj.data.id, {}, function (data) { |
| | | admin.req('api-opration/productorderrecord/' + obj.data.id, {}, function (data) { |
| | | layer.closeAll('loading'); |
| | | layer.msg(data.msg, { icon: 1, time: 500 }, function () { |
| | | renderTable(); |
| | |
| | | } |
| | | } |
| | | var proName = $('#product-search-value').val(); |
| | | var hospitalName = $('#hospital-search-value').val(); |
| | | table.reload('product-table', { where: { proName: proName,hospitalName: hospitalName,startTime: startTime, endTime: endTime } }); |
| | | var hospitalId = $('#hospitalId').val(); |
| | | table.reload('product-table', { where: { proName: proName,hospitalId: hospitalId,departmentId:'1252408277275664385',startTime: startTime, endTime: endTime } }); |
| | | }); |
| | | |
| | | //比较日期大小 |
| | |
| | | url: config.base_server + 'api-user/syshospital/findByName', |
| | | template_val: '{{d.hospitalName}}',//选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>",//下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#hospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | }); |
| | | </script> |