Index: ssts-web/src/main/webapp/dx-disinfectsystem/css/useRecord/index.css =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/css/useRecord/index.css (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/css/useRecord/index.css (revision 24436) @@ -0,0 +1,287 @@ +.modal-header{ + background: #72B142; + +} +.modal-title{ + font-weight: bold; +} +.fixed-table-body{ + height:auto; +} +/*提交按钮*/ +#modal-dialog{ + width: 180px;top:30%; +} +#modal-footer{ + padding: 10px 15px; +} +#data-dismiss{ + left:15px;position: absolute; +} +#Alert{ + position: absolute; + top: 0; + width: 20%; + left: 40%; + z-index: 1000; + text-align: center; + height: 60px; + display: none; +} +input{ + outline:none; + border:0; +} +a.color_tbody{ + color:#367f21 !important; + text-decoration:none; + cursor:pointer + +} +/*.content{ + position: absolute; + top:0; + left:0; + right:0; + bottom: 0; + overflow: hidden; +}*/ +.content-header{ + width: 100%; + background-color: #C6E3CA; + -ms-background-color: #BEDEC2; + padding: 5px 5px; + font-size: 18px; + color: #337ab7; + font-weight: bold; + border: 1px solid #BEDEC2; + +} +.Nan-content{ + width: 100%; + height:54px; + position: absolute; + padding: 5px 5px; + background-color: #C6E3CA; + -ms-background-color: #BEDEC2; +} +.Nab-Btn{ + width: 80%; + display: inline-block; +} + +.Nab-saern{ + width:15%; + display: inline-block; + padding-right:28px; + vertical-align: middle; +} +.Nab-Btn a{ + color: #666; + background-color:#73B043; + background-color: #73B043; + border-color: #EEE; + font-weight: 400; + font-size: 0.7em; + text-decoration: none; + text-align: center; + line-height: 26px; + height: 34px; + padding: 0 10px; + margin: 0; + margin-left: 10px; + display: inline-block; + appearance: none; + cursor: pointer; + border: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition-property: all; + transition-property: all; + -webkit-animation-duration: 3s; + animation-duration: 3s; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; + -webkit-animation-name: glowing; + animation-name: glowing; + border-radius: 6px; + color: white; + border-width: 2px; + border-style: solid; + +} +.dx-btn-primary{ + margin-top: 5px; + +} +.fixed-table-container{ + /*bottom:60px;*/ + margin-bottom:60px; +} +#Goods .fixed-table-container{ + /*bottom:60px;*/ + margin-bottom:0; +} +.fixed-table-pagination{ + padding: 0 20px ; + /*bottom: */ +} +#table_table .fixed-table-pagination{ + width: 100%; + position: fixed; + bottom: 0; + background-color: #C6E3CA; + -ms-background-color: #BEDEC2; + +} +/*modal*/ +#Goods .fixed-table-pagination{ + display: none !important; +} +.modal-dialog{ + width: 800px; + +} +ul{ + padding: 0; + list-style: none; +} +.fonm-Li{ + width: 100%; + height:26px; + line-height:26px; + margin:10px 0; + +} +.form-li{ + display: inline-block; + width: 31%; + +} +.form-shoushu{ + display: inline-block; + width: 64%; +} + +.form-li label span{ + display: inline-block; + font-size: 12px; + color:#000; + font-weight: normal; + width: 80px; + text-align: right; +} +.fonm-mg{ + margin-left:2%; +} +.form-input,#Select,#specialInfection,#addSelect,#addspecialInfection{ + width: 150px; + border: 1px solid #ddd; + height: 26px; + line-height: 26px; + padding-left: 3px; + color: #000; + font-size: 12px; + font-weight: normal; + +} +.form-shoushu-input{ + width: 405px; +} +.modal_span1,.modal_span{ + margin-bottom: 10px; + background: #72B142; + display: inline-block; + width: 100%; + padding: 5px; + font-size: 14px; + font-weight: bold; +} +#firstDiv{ + width: 775px; + overflow-x: scroll; + height:100px; + overflow-y: scroll; +} +#tableFirst { + width: 1000px !important +} +#tableFirst thead th{ + padding: 8px; + line-height: 1.42857143; +} +#tableFirst tbody td{ + line-height: 1.42857143; + padding: 8px; + text-align: center; +} +/*子模态框*/ +.List_span{ + display: inline-block; + /*width: 400px;*/ + /*height:540px;*/ + vertical-align: middle; +} +.List_span img{ + width: 100%; + height:400px; +} +.List_table{ + display: inline-block; + width: 350px; + margin-left:12px; + vertical-align: middle; + height:540px; + overflow: hidden; +} +/*//details*/ +.details-body{ + /*float: left;*/ + height: 540px; +} +.detalis-tab{ + float: left; + width: 140px; + border-right:1px solid #ddd; + +} +.detalis-tab li{ + width:100%; + text-align: center; + height:42px; + line-height:42px; +} +.detalis-tab li a{ + text-decoration: none; +} +.detalis-tab li.active{ + background: #337ab7; + +} +.detalis-tab li.active a{ + color:#fff; +} +.tab-content{ + /*float: left;*/ + margin-left:140px; + padding-left: 5px; +} +.tab-content p{ + height:25px; + line-height:25px; + font-size: 14px; + +} +.tab-content .tab-title{ + display: inline-block; + width: 150px; + text-align: left; + padding-right: 20px; +} +.MinHeight{ + min-width: 1000px; +} +.table_table{ + height:800px; +} \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/sterilization/index.jsp =================================================================== diff -u -r24409 -r24436 --- ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/sterilization/index.jsp (.../index.jsp) (revision 24409) +++ ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/sterilization/index.jsp (.../index.jsp) (revision 24436) @@ -12,10 +12,8 @@ - + + @@ -371,7 +369,7 @@
灭菌参数
@@ -488,7 +483,7 @@
监测结果
    - +
@@ -600,7 +595,7 @@
-
+ --> -
-
+
- - + + + + + + + - - - \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/commons/tagLibsPath.jsp =================================================================== diff -u -r24187 -r24436 --- ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/commons/tagLibsPath.jsp (.../tagLibsPath.jsp) (revision 24187) +++ ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/commons/tagLibsPath.jsp (.../tagLibsPath.jsp) (revision 24436) @@ -15,4 +15,7 @@ application.setAttribute("basePath", request.getScheme() + "://" + request.getServerName() + (request.getServerPort() != 80 ? (":" + request.getServerPort()) : "") + request.getContextPath()); %> -<%-- --%> \ No newline at end of file +<%-- --%> + \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js (revision 24436) @@ -0,0 +1,810 @@ +//重置表格header对齐 +$(window).resize(function () { + $("#table").bootstrapTable('resetView'); + $("#Goods-table").bootstrapTable('resetView'); + $("#modalTables").bootstrapTable('resetView'); +}); + +//扫描条码 +(function KeyDow(){ + $('#tempBarcode').on('keydown',function(e){ + if (e.keyCode == "13") { + $('#Hidden').val($(this).val()) + var hiddenValue =$('#Hidden').val() + $.ajax({ + url:'data/sjbao.php?barcode='+hiddenValue, + type:'get', + success:function(data){ + $('#addGoods-table').bootstrapTable('insertRow',{ + index:0, + row:{ + id:data.data[0].id, + barcode:data.data[0].barcode, + name:data.data[0].name, + Urgent:data.data[0].Urgent, + totla:data.data[0].totla, + Packing:data.data[0].Packing, + batch:data.data[0].batch, + Expiration:data.data[0].Expiration, + Img:data.data[0].Img, + Situation:data.data[0].Situation + } + }) + } + }) + } + + }); +})(); +//渲染主列表 +var columnArray = [ + { + checkbox: true, + + }, + { + field: 'name', + title: '病人', + align:'center', + sortable: true, + order: "desc", + formatter: function (value,row,index){ + return ''+row.name+' ' + }, + }, { + field: 'state', + title: '状态', + align:'center', + sortable: true, + order: "desc", + // formatter: operateFormatter //自定义方法,添加操作按钮 + }, { + field: 'Inpatient', + title: '住院号', + align:'center', + sortable: true, + order: "desc", + // formatter: function (value,row,index){ + // // console.log(index) + // return ''+row.Inpatient+' ' + // }, + }, + { + field: 'Diagnosis', + title: '诊疗号', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Operationtime', + title: '手术时间', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'age', + title: '年龄', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'card', + title: '身份证号码', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Doctor', + title: '医生', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Operative', + title: '手术名称', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'person', + title: '录入人', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Entry', + title: '录入科室', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Entrytime', + title: '录入时间', + align:'center', + sortable: true, + order: "desc", + }, { + field: 'Applicationtime', + title: '申请时间', + align:'center', + sortable: true, + order: "desc", + }, + { + field: 'Remarks', + title: '备注', + align:'center', + sortable: true, + order: "desc", + // visible:false, + }, +]; +var InitTable =function(url){ + //先销毁表格 + $('#table').bootstrapTable("destroy"); + //添加表格 + $('#table').bootstrapTable({ + url:url, + method:'post',//请求方式 + search:true,//是否搜索 + pagination: true,//是否分页 + pageSize: 20,//单页记录数 + pageList: [5, 10, 20, 50],//分页步进值 + sidePagination: "server",//服务端分页 + contentType: "application/x-www-form-urlencoded",//请求数据内容格式 默认是 application/json 自己根据格式自行服务端处理 + dataType: "json",//期待返回数据类型 + queryParamsType: "limit",//查询参数组织方式 + onColumnSwitch:onColumnSwitch, + queryParams :queryParams, + searchOnEnterKey: "true",//回车搜索 + showRefresh: "true",//刷新按钮 + showColumns: true,//列选择按钮 + minimumCountColumns: 2, //最少允许的列数 + clickToSelect: true, //是否启用点击选中行 + uniqueId: "ID", //每一行的唯一标识,一般为主键列 + cardView: false, //是否显示详细视图 + detailView: false, //是否显示父子表 + showExport: true, + exportDataType: "selected", //导出checkbox选中的行数 + paginationLoop: false, //是否无限循环 + columns: columnArray, + }); + return InitTable; +} +//jq过滤事件 +var addArray= new Array(); +var array=[]; +for (var i = 0; i < columnArray.length; i++) { + array.push(columnArray[i]["field"]) +} +$('#hiddens').val(JSON.stringify(array)); +function onColumnSwitch(field,checked){ + var str ={'Name':field,'states':checked} + addArray.push(str); + Array.prototype.indexOf = function(val) { + for (var i = 0; i < this.length; i++) { + if (this[i] == val) return i; + } + return -1; + }; + Array.prototype.remove = function(val) { + var index = this.indexOf(val); + if (index > -1) { + this.splice(index, 1); + } + }; + + for(var i=0;i'+row.id+' 图片' + }, + }, + { + field: 'Situation', + title: '植入物是使用情况' + }, + { + field: 'price', + title: '操作', + formatter:function (value,row,index){ + return '删除' + } + }] +}) + +//修改 +//子模态框 +$('#Goods-table').bootstrapTable({ + striped: true, //是否显示行间隔色 + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) + sortable: true, //是否启用排序 + sortOrder: "asc", //排序方式 + pageNumber: 10, //初始化加载第一页,默认第一页,并记录 + pageSize: 10, //每页的记录行数(*) + pageList: [10, 25, 50, 100], //可供选择的每页的行数(*) + strictSearch: true, + height: 140, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 + uniqueId: "id", //每一行的唯一标识,一般为主键列 + // showToggle: true, //是否显示详细视图和列表视图的切换按钮 + // cardView: false, //是否显示详细视图 + detailView: false, //是否显示父子表 + + columns: [ + { + checkbox: true + }, + { + field: 'barcode', + title: '条码', + formatter:function(value,row,index){ + return ''+row.barcode+'' + }, + }, + { + field: 'name', + title: '名称' + }, + { + field: 'Urgent', + title: '加急' + }, + { + field: 'totla', + title: '数量' + }, + { + field: 'Packing', + title: '包装类型' + }, + { + field: 'batch', + title: '批次' + }, + { + field: 'Expiration', + title: '失效日期' + }, + { + field: 'Img', + title: '图片', + formatter: function (value,row,index){ + // console.log(index) + return ' 图片' + }, + }, + { + field: 'Situation', + title: '植入物是使用情况' + }, + { + field: 'operation', + title: '操作', + formatter:function (value,row,index){ + return '删除' + } + }], + // data: [{id:1,barcode:'0000692849',name:'拔牙钳',Urgent:'1',totla:'10',Packing:'无纺布',batch:'123456',Expiration:'2018-04-06 ',Img:'',Situation:'未使用',operation:''}, + // {id:2,barcode:'0000692849',name:'拔牙钳',Urgent:'1',totla:'10',Packing:'无纺布',batch:'123456',Expiration:'2018-04-06 ',Img:'',Situation:'未使用',operation:''}, + // {id:3,barcode:'0000692849',name:'拔牙钳',Urgent:'1',totla:'10',Packing:'无纺布',batch:'123456',Expiration:'2018-04-06 ',Img:'',Situation:'未使用',operation:''}, + // {id:4,barcode:'0000692849',name:'拔牙钳',Urgent:'1',totla:'10',Packing:'无纺布',batch:'123456',Expiration:'2018-04-06 ',Img:'',Situation:'未使用',operation:''}] +}) +//图片模态框 +$('#List-table').bootstrapTable({ + striped: true, //是否显示行间隔色 + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) + pagination: true, //是否显示分页(*) + sortable: true, //是否启用排序 + sortOrder: "asc", //排序方式 + // sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) + pageNumber: 10, //初始化加载第一页,默认第一页,并记录 + pageSize: 200, //每页的记录行数(*) + pageList: [10, 25, 50, 100], //可供选择的每页的行数(*) + // search: false, //是否显示表格搜索 + strictSearch: true, + // showColumns: true, //是否显示所有的列(选择显示的列) + // showRefresh: true, //是否显示刷新按钮 + // minimumCountColumns: 2, //最少允许的列数 + // clickToSelect: true, //是否启用点击选中行 + height: 540, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 + uniqueId: "id", //每一行的唯一标识,一般为主键列 + // showToggle: true, //是否显示详细视图和列表视图的切换按钮 + // cardView: false, //是否显示详细视图 + detailView: false, //是否显示父子表 + + columns: [ + { + field: 'id', + title: '材料名称', + + }, { + field: 'name', + title: '数量' + }, { + field: 'price', + title: '价格' + }], + data: [{ + id: 1, + name: 'Item 1', + price: '包赚' + }, { + id: 2, + name: 'Item 2', + price: '$2' + },{ + id: 3, + name: 'Item 2', + price: '$2' + },{ + id: 4, + name: 'Item 2', + price: '$2' + },{ + id: 5, + name: 'Item 1', + price: '包赚' + }, { + id: 6, + name: 'Item 2', + price: '$2' + },{ + id: 7, + name: 'Item 2', + price: '$2' + },{ + id: 8, + name: 'Item 2', + price: '$2' + }, + { + id: 9, + name: 'Item 2', + price: '$2' + }, + { + id: 10, + name: 'Item 2', + price: '$2' + }, + { + id: 11, + name: 'Item 2', + price: '$2' + }, + { + id: 12, + name: 'Item 2', + price: '$2' + }, + { + id: 13, + name: 'Item 2', + price: '$2' + }, + { + id: 14, + name: 'Item 2', + price: '$2' + }, + { + id: 15, + name: 'Item 2', + price: '$2' + }, + { + id: 16, + name: 'Item 2', + price: '$2' + }, + { + id: 17, + name: 'Item 2', + price: '$2' + } + ] +}) +//时间 +$('#addoperationTime').datetimepicker({ + language: 'zh-CN', + weekStart: 1, + todayBtn: 1,//显示为今天的按钮,0无1有 + autoclose: 1,//单击时间后日历框是否自动关闭,1关闭,0不关闭 + todayHighlight: 1,//今天高亮显示 + startView: 2,//展示的样式,1小时,2日 + minView: 2,//选取到的时间,2天,1小时 + forceParse: 0 +}); + +$('#addenteringTime').datetimepicker({ + language: 'zh-CN', + weekStart: 1, + todayBtn: 1,//显示为今天的按钮,0无1有 + autoclose: 1,//单击时间后日历框是否自动关闭,1关闭,0不关闭 + todayHighlight: 1,//今天高亮显示 + startView: 2,//展示的样式,1小时,2日 + minView: 2,//选取到的时间,2天,1小时 + forceParse: 0 +}); + +//图片模态框 +// 封装动态模态框 +function AjaxModal(obj){ + var str=""; + $.ajax({ + url:'data/dateils.php?id='+obj, + type:'get', + async:true, + dataType:'json', + success:function(data){ + // console.log(data.data) + var datas= data.data[0]; + str='
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
  • '+ + '
  • '+ + '
    '+ + ''+ + + '
    '+ + '
    '+ + ''+ + '
    '+ + + '
  • ' + $('#user_li').html(str) + //修改查询条码信息 + $.ajax({ + url:'data/barcode.php?barcode='+datas.barcode, + type:'get', + success:function(data){ + console.log(data.data) + $('#Goods-table').bootstrapTable('load',data.data) + } + }) + } + + }) +} +//修改功能 +function ClickName(obj){ + if(obj!=''){ + AjaxModal(obj) + }else{ + alert('请选择一行数据') + } +}; +$('#updateHandle').click(function(){ + var $table=$('#table'); + var selectContent = $table.bootstrapTable('getSelections')[0]; + console.log(selectContent) + ; + if(typeof(selectContent) == 'undefined') { + $('#Alert').html('x 请选择需要修改的使用记录信息!') + $ ('#Alert').show ().delay (1500).fadeOut (); + return false; + }else{ + var obj =selectContent.id; + AjaxModal(obj) + } +}) +//删除 +$('#finishHandle').click(function(){ + var $table=$('#table'); + var selectContent = $table.bootstrapTable('getSelections')[0]; + console.log(selectContent) + if(typeof (selectContent)=='undefined'){ + $('#Alert').html('x 请选择需要修改的使用记录信息!') + $ ('#Alert').show ().delay (1500).fadeOut (); + return false; + }else{ + $('#DeleteSj').click(function(){ + var obj =selectContent.id; + $.ajax({ + url:'data/delect?id='+obj, + type:'get', + async:true, + dataType:'json', + success:function(data){ + if(data.code=200){ + console.log('ok') + // alert(data.message) + window.location.href = window.location.href; + } + } + + }); + }) + + + } +}) +//add +$('#mymodal').click(function(){ + var addhospitalNum = $('#addhospitalNum').val();//住院号 + var addtreatmentNum =$('#addtreatmentNum').val();//诊疗号 + var addpatientName =$('#addpatientName').val();//姓名 + var tempBarcode =$('#tempBarcode').val();//机械报信息 + if(addhospitalNum==''&&addtreatmentNum==''&&addpatientName==''){ + $('#Alert').html('x请输入诊疗号或者住院号或者病人姓名') + $ ('#Alert').show ().delay (1500).fadeOut (); + }else{ + if(tempBarcode==''){ + $('#Alert').html('x机械包信息不能为空') + $ ('#Alert').show ().delay (1500).fadeOut (); + }else{ + $.ajax({ + url:'data/add.php', + type:'post', + async:true, + dataType:'json', + data:{zhuyuanhao:addhospitalNum,zhengliaohao :addtreatmentNum,addName:addpatientName,Barcode:tempBarcode}, + success:function(data){ + if(data.code=200){ + $('#Alert').html('x'+data.message) + $ ('#Alert').show ().delay (1500).fadeOut (); + window.location.href = window.location.href; + } + } + }) + } + } +}) + Index: ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/useRecord/index.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/useRecord/index.jsp (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/useRecord/index.jsp (revision 24436) @@ -0,0 +1,757 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + 使用记录列表 + + + <%@ include file="../commons/tagLibsPath.jsp"%> + + + + + + + + + + +
    +
    +
    + +
    + 使用记录列表 +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    + +
    + + + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/sterilization/sterilization.js =================================================================== diff -u -r24418 -r24436 --- ssts-web/src/main/webapp/dx-disinfectsystem/js/sterilization/sterilization.js (.../sterilization.js) (revision 24418) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/sterilization/sterilization.js (.../sterilization.js) (revision 24436) @@ -3,6 +3,7 @@ $("#Goods-table").bootstrapTable('resetView'); $("#modalTables").bootstrapTable('resetView'); }); +var sterilerGroup; //主页面表格 var columnArray=[ { @@ -16,12 +17,12 @@ }, align:'center', }, { - field: 'startDate', + field: 'startDateStr', title: '开始时间', align:'center', // formatter: operateFormatter //自定义方法,添加操作按钮 }, { - field: 'endDate', + field: 'endDateStr', title: '结束时间', align:'center', }, @@ -118,6 +119,7 @@ exportDataType: "selected", //导出checkbox选中的行数 paginationLoop: false, //是否无限循环 columns: columnArray, + height:'650', }); return InitTable; } @@ -152,7 +154,6 @@ } function queryParams(params) { - console.log(params) var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 limit: params.limit, //页面大小 offset: params.offset, //页码 @@ -695,21 +696,22 @@ }) function loadSterilizationGoods(obj){ $.ajax({ - url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/loadSterilizationRecord.mhtml?id='+obj, + url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/loadSterilizationGoods.mhtml?id='+obj, + type:'get', dataType:'json', async:false, success:function(data){ - var datas =data.data; - if(data.success==true){ + var datas =data.rows; + if(data.success===true){ $('#udsterilizationListTbale').bootstrapTable('load',datas) } } }) } //ajax 修改 deteils -function AjaxModal(obj){ +/*function AjaxModal(obj){ var str=""; $.ajax({ url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/loadSterilizationRecord.mhtml?id='+obj, @@ -718,8 +720,7 @@ dataType:'json', success:function(data){ if(data.success===true){ - var datas=data.data[0]; - console.log(datas) + var datas=data.data; var str= '
  • '+ '
    '+ @@ -779,7 +780,7 @@ '
    '+ ''+ '
    '+ '
  • '+ @@ -810,6 +811,7 @@ '' $('#sterilizationList_ul').html(str) + var sterilizationList='
  • '+ '
    '+ '
    '+ '
  • ' $('#sterilizationList_li').html(sterilizationList); - // var totlas ='' } } }) +}*/ +function AjaxModal(obj){ + var str=""; + $.ajax({ + url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/loadSterilizationRecord.mhtml?id='+obj, + type:'get', + async:true, + dataType:'json', + success:function(data){ + if(data.success===true){ + var datas=data.data; + console.log(datas) + $('#udsterilization').val(datas.sterilizationUser); + $('#udsterilization').attr('disabled',true); + $('#udsterilizationName').val(datas.sterilizationShelf); + $('#udsterilizationName').attr('disabled',true); + $('#udfurnace').val(datas.frequency); + $('#udfurnace').attr('disabled',true); + + + + // $('#udsters').html(''); + var sterilizerName =datas.sterilizerName; + // var sterilizerName ='3号高压炉灭菌'; + $.ajax({ + async:false, + url:WWWROOT+"/disinfectSystem/baseData/sterilizerController/getAllSterilizer.mhtml?sterilerGroup="+sterilerGroup, + dataType:"json", + type:'get', + success:function(data){ + var lie=data.rows; + if(data.success===true){ + var str = ""; + for(var j=0;j"+lie[j]['name']+" "; + } + if(lie[j]['name']===sterilizerName){ + str+=" "; + } + } + $("#udsters").html(str); + + + } + } + }); + + $('#udprocedure').html(''); + $('#udpurpose').html(''); + $('#udstarttime').val(datas.startDateStr); + $('#textareas').text(datas.parameter); + $('#udSterilizingnote').val(datas.remark); + $('#udPhysicalmonitoring').val(datas.physicsResult); + $('#udChemical').val(datas.chemistryResult); + $('#udBiological').val(datas.biologyResult); + $('#udPhysicalmonitoring').attr('disabled',true); + $('#udChemical').attr('disabled',true); + $('#udBiological').attr('disabled',true); + $('#udprocedures').val(datas.biologicalMonitoringStartDate); + $('#udpurposee').val(datas.biologicalMonitoringEndDate); + $('#udSurveyor').val(""); + $('#udSurveyors').val(datas.monitorUser); + $('#udMonitor').val(""); + $('#udMonitors').val(datas.monitorChecker); + + } + + + } + + }) } function ClickName (obj){ if(obj!==''){ @@ -1034,8 +1108,17 @@ }) } }) + //灭菌目的 //灭菌炉列表 //灭菌程序关联 $(function(){ + var paramName = "sterilerGroup"; + var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 + var r = window.location.search.substr(1).match(reg); //匹配目标参数 + if (r != null) { + //alert(decodeURI(unescape(r[2]))); + //alert(decodeURI(r[2])); + sterilerGroup = decodeURI(r[2]) + } $.ajax({ // url:'./data/getSterilizationPurposeList.json', url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/getSterilizationPurposeList.mhtml', @@ -1053,8 +1136,9 @@ $.ajax({ async:false, /* url:WWWROOT+"/disinfectSystem/baseData/sterilizerController/getAllSterilizer.mhtml?sterilerGroup=111&includeNone=yes",*/ - url:WWWROOT+"/disinfectSystem/baseData/sterilizerController/getAllSterilizer.mhtml", + url:WWWROOT+"/disinfectSystem/baseData/sterilizerController/getAllSterilizer.mhtml?sterilerGroup="+sterilerGroup, dataType:"json", + type:'get', success:function(data){ var lie=data.rows; if(data.success===true){ @@ -1144,7 +1228,7 @@ }) }) }) -//扫描条码 +//扫描条码add $('#barCode').on('keydown',function(e){ if(e.keyCode=='13'){ if($(this).val()==""){ @@ -1153,17 +1237,30 @@ }else{ $.ajax({ // url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/scanBarcode.mhtml?sterilizationRecordId=&barcode='+$(this).val(), - url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/scanBarcode.mhtml?sterilizationRecordId='+$(this).val(), + url:WWWROOT+'/disinfectSystem/sterilization/sterilizationRecordController/scanBarcode.mhtml?barcode='+$(this).val(), type:'get', dataType:'json', async:false, success:function(data){ var datas =data.rows; + console.log() if(data.success===true){ - if(data['barcodeType']==='灭菌篮筐'){ + if(data['barcodeType']==='器械包'){ $('#sterilizationListTbale').bootstrapTable('append',datas); $('#barCode').val("") } + if(data['barcodeType']==='用户'){ + $('#sterilization').val(datas[0]['name']); + $('#barCode').val("") + } + if(data['barcodeType']==='灭菌篮筐'){ + $('#sterilizationListTbale').bootstrapTable('append',datas); + $('#barCode').val("") + } + if(data['barcodeType']==='灭菌架'){ + $('#sterilization').val(datas[0]['name']); + $('#barCode').val("") + } } } }) @@ -1279,3 +1376,38 @@ }) }) +//修改每一行的数据 +$('#updateHandle').click(function(){ + var $table=$('#table'); + var selectContent = $table.bootstrapTable('getSelections')[0]; + if(typeof(selectContent) == 'undefined') { + $('#Alert').html('x 请选择需要修改的使用记录信息!') + $ ('#Alert').show ().delay (1500).fadeOut (); + return false; + }else{ + var obj =selectContent.id; + AjaxModal(obj); + loadSterilizationGoods(obj); + + } +}) +//修改时重新条用 灭菌目的 //灭菌炉列表 //灭菌程序关联 +$('#udsters').change(function(){ + $.ajax({ + url:WWWROOT+'/disinfectSystem/baseData/sterilisationController/getSterilizerType.mhtml?sterilizerName='+$(this).val(), + dataType:'json', + type:'get', + async:false, + success:function(data) { + var datas=data.rows; + if(data.success===true){ + var str = ""; + for(var k=0;k"+datas[k]['sterilisation']+""; + $('#textareas').text(datas[k]['parameter']) + } + $("#udprocedure").html(str); + } + } + }) +}) \ No newline at end of file