";
+ html += "";
+ html += " | ";
+ html += ""+datas[i].barcode+" | ";
+ html += ""+datas[i].name+" | ";
+ html += ""+datas[i].typeForSterilizationStatistics+" | ";
+ html += ""+datas[i].amount+" | ";
+ html += " | ";
+ html += ""+datas[i].reviewTime+" | ";
+ html += "- | ";
+ html += "- | ";
+ html += "
";
+ }
+ html += "";
+ $detail.html(html);
+ }
+
+ }
+
+ })
+
+ }
+ });
+});
+// 卸载物品统计列表details
+$(function(){
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/tousseInstanceController/getSterileUnloadTousseBySterileRecordId.mhtml',
+ dataType:'json',
+ type:'get',
+ async:false,
+ success:function(data){
+ var datas=data.rows;
+ $("#uduninstall").bootstrapTable("load", datas)
+ }
+ })
+})
+$('#uduninstall').bootstrapTable({
+
+ striped: true, //是否显示行间隔色
+ cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+ sortOrder: "asc", //排序方式
+ height: 620, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度
+ uniqueId: "id", //每一行的唯一标识,一般为主键列
+ // detailView: false, //是否显示父子表
+ removeByUniqueId:1,
+ columns: [
+ {
+ field: 'barcode',
+ title: '条码'
+ }, {
+ field: 'name',
+ title: '名称',
+ // formatter: operateFormatter //自定义方法,添加操作按钮
+ }, {
+ field: 'depart',
+ title: '科室'
+ },
+ {
+ field: 'amount',
+ title: '数量'
+ }
+ ],
+});
+//灭菌物品统计 details
+$('#udsterilizationListTotal').bootstrapTable({
+ striped: true, //是否显示行间隔色
+ cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+ sortOrder: "asc", //排序方式
+ height: 200, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度
+ uniqueId: "id", //每一行的唯一标识,一般为主键列
+ removeByUniqueId:1,
+ columns: [
+ {
+ field: 'tiaoma',
+ title: '条码'
+ }, {
+ field: 'name',
+ title: '名称',
+ // formatter: operateFormatter //自定义方法,添加操作按钮
+ }, {
+ field: 'fangshi',
+ title: '灭菌方式'
+ },
+ {
+ field: 'total',
+ title: '数量'
+ },
+ {
+ field: 'zuoz',
+ title: '操作'
+ }
+ ],
+ data: [{tiaoma: '010004105',name: '灭菌筐02灭菌筐02灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'},
+ {tiaoma: '010004105',name: '灭菌筐02',fangshi: '高温',total:'1',zuoz:'1'}
+ ],
+});
+
+//时间插件
+$('#startTime').datetimepicker('setDate', new Date());
+$("#terminaltime").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
+});
+$('#starttime').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
+});
+//灭菌物品列表 details
+$(function(){
+ var oTableInit = new Object();
+ var oInit = new Object();
+ $('#udsterilizationListTbale').bootstrapTable({
+ detailView: true, //父子表
+ striped: true, //是否显示行间隔色
+ sortOrder: "asc", //排序方式
+ pageNumber: 1, //初始化加载第一页,默认第一页
+ height: 200,
+ columns: [
+ {
+ field: 'barcode',
+ title: '条码',
+ align: 'center',
+ }, {
+ field: 'name',
+ title: '名称',
+ align: 'left',
+
+ }, {
+ field: 'sterilingMode',
+ title: '灭菌方式',
+ align: 'center',
+
+ }, {
+ field: 'amount',
+ title: '数量',
+ align: 'center',
+
+ },{
+ field: 'types',
+ title: '操作',
+ align: 'center',
+ formatter:function(index,row,value){
+ return '删除'
+ }
+
+ }
+ ],
+
+ onExpandRow: function(index, row, $detail) {
+ oTableInit.InitSubTable(index, row, $detail);
+
+ }
+
+ });
+ oTableInit.InitSubTable=function (index,row,$detail){
+ if(row.type==1){
+ var rowChildren =row.children;
+ console.log(rowChildren)
+ var cur_table = $detail.html('').find('table');
+ var html = "";
+ html += "";
+ for(var i=0;i"
+ + " | "
+ + "" + rowChildren[i].barcode + " | "
+ + "" + rowChildren[i].name + " | "
+ + " | "
+ + "" + rowChildren[i].sterilingMode + " | "
+ + "" + rowChildren[i].amount + " | "
+ + "";
+ }
+ html +="
";
+ $detail.html(html); // 关键地方
+ }else{
+ var html = "";
+ html += "";
+ html += "";
+ html += "没有更多数据 | ";
+ html += "
";
+ html +="
";
+ $detail.html(html); // 关键地方
+ }
+
+ }
+
+})
+function loadSterilizationGoods(obj){
+ $.ajax({
+ url:'./data/json.json?id='+obj,
+ type:'get',
+ dataType:'json',
+ async:false,
+ success:function(data){
+ var datas =data.rows;
+ if(data.success==true){
+ $('#udsterilizationListTbale').bootstrapTable('load',datas)
+ }
+ }
+ })
+}
+
+//ajax 修改 deteils
+function AjaxModal(obj){
+ var str="";
+ $.ajax({
+ url:'./data/loadSterilizationRecord.json?id='+obj,
+ type:'get',
+ async:true,
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ var datas=data.data;
+ var str=
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''
+ $('#sterilizationList_ul').html(str)
+
+ var sterilizationList=''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ ''+
+ ''+
+ '
'+
+ ''
+ $('#sterilizationList_li').html(sterilizationList);
+ // var totlas =''
+ }
+
+
+ }
+
+ })
+}
+function ClickName (obj){
+ if(obj!==''){
+ AjaxModal(obj);
+ // 灭菌物品列表
+ loadSterilizationGoods(obj)
+ }else {
+ alert('选择一行')
+ }
+}
+//完成灭菌
+$("#completes").on("click", function () {
+ var rows = $("#table").bootstrapTable('getSelections');
+ console.log(rows);
+ if (rows.length ==0) {// rows 主要是为了判断是否选中,下面的else内容才是主要
+ $('#Alert').html('x 请选择需要修改的使用记录信息!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ } else {
+ $('#DeleteSj').on('click',function(){
+ var arrays = new Array();// 声明一个数组
+ $(rows).each(function () {// 通过获得别选中的来进行遍历
+ arrays.push(this.id);// cid为获得到的整条数据中的一列
+ });
+ var idcards =JSON.stringify(arrays)
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/completeSterilizationGoods.mhtml?sterilizationRecordIds='+idcards,
+ type:'get',
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ window.location.href = window.location.href;
+ }else{
+ $('#Alert').html('x '+data.message+'!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ }
+ })
+ })
+ }
+})
+//灭菌失败
+$('#fails').on('click',function(){
+ var rows = $("#table").bootstrapTable('getSelections');
+ console.log(rows);
+ if (rows.length ==0) {// rows 主要是为了判断是否选中,下面的else内容才是主要
+ $('#Alert').html('x 请至少选中一条灭菌记录!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ if(rows.length==2){
+ $('#Alert').html('x 最多选择一条灭菌记录!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }else {
+ $('#failOk').on('click',function(){
+ var arrays = new Array();// 声明一个数组
+ $(rows).each(function () {// 通过获得别选中的来进行遍历
+ arrays.push(this.id);// cid为获得到的整条数据中的一列
+ });
+ var idcards =JSON.stringify(arrays)
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/failureSterilizationRecord.mhtml?sterilizationRecordId='+idcards,
+ type:'get',
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ window.location.href = window.location.href;
+ }else{
+ $('#Alert').html('x '+data.message+'!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ }
+ })
+ })
+ }
+})
+//灭菌中断
+$('#interrupts').on('click',function(){
+ var rows = $("#table").bootstrapTable('getSelections');
+ console.log(rows);
+ if (rows.length ==0) {// rows 主要是为了判断是否选中,下面的else内容才是主要
+ $('#Alert').html('x 请至少选中一条灭菌记录!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ if(rows.length==2){
+ $('#Alert').html('x 最多选择一条操作记录!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }else {
+ $('#interruptsOk').on('click',function(){
+ var arrays = new Array();// 声明一个数组
+ $(rows).each(function () {// 通过获得别选中的来进行遍历
+ arrays.push(this.id);// cid为获得到的整条数据中的一列
+ });
+ var idcards =JSON.stringify(arrays)
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/interruptSterilizationRecord.mhtml?sterilizationRecordId='+idcards,
+ type:'get',
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ window.location.href = window.location.href;
+ }else{
+ $('#Alert').html('x '+data.message+'!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ }
+ })
+ })
+ }
+})
+//删除灭菌记录
+$("#Deletings").on("click", function () {
+ var rows = $("#table").bootstrapTable('getSelections');
+ console.log(rows);
+ if (rows.length ==0) {// rows 主要是为了判断是否选中,下面的else内容才是主要
+ $('#Alert').html('x 请选择需要删除的使用记录信息!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ } else {
+ $('#DeletingOk').on('click',function(){
+ var arrays = new Array();// 声明一个数组
+ $(rows).each(function () {// 通过获得别选中的来进行遍历
+ arrays.push(this.id);// cid为获得到的整条数据中的一列
+ });
+ var idcards =JSON.stringify(arrays)
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/deleteSterilizationRecord.mhtml?sterilizationRecordIds='+idcards,
+ type:'get',
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ window.location.href = window.location.href;
+ }else{
+ $('#Alert').html('x '+data.message+'!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ }
+ })
+ })
+ }
+})
+//灭菌目的 //灭菌炉列表 //灭菌程序关联
+$(function(){
+ $.ajax({
+ // url:'./data/getSterilizationPurposeList.json',
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/getSterilizationPurposeList.mhtml',
+ type:'get',
+ dataType:'json',
+ success:function(data){
+ if(data.success===true){
+ for(var i =0;i"+data.rows[i]['optionText']+"");
+ $('#purpose').append(opt)
+ }
+ }
+ }
+ })
+ $.ajax({
+ async:false,
+ url:"http://rap2api.taobao.org/app/mock/85153/disinfectSystem/baseData/sterilizerController/getAllSterilizer.mhtml?sterilerGroup=111&includeNone=yes",
+ dataType:"json",
+ success:function(data){
+ var lie=data.rows;
+ if(data.success===true){
+ var str = "";
+ str=" "
+ for(var i=0;i"+lie[i]['name']+" ";
+ }
+ $("#sters").html(str);
+ }else {
+ $('#Alert').html('x '+data.message+'!')
+ $ ('#Alert').show ().delay (1500).fadeOut ();
+ return false;
+ }
+ }
+ });
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/baseData/sterilisationController/getSterilizerType.mhtml?sterilizerName='+$('#sters').val(),
+ dataType:'json',
+ type:'get',
+ async:false,
+ success:function(data){
+ var list=data.rows;
+ if(data.success===true){
+ var str = "";
+ str=" "
+ for(var i=0;i"+list[i]['sterilisation']+" ";
+ }
+ $("#procedure").html(str);
+ }else {
+ alert(data.message)
+ }
+ }
+ })
+ $('#sters').change(function(){
+ $('.Option').hide();
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/sterilization/sterilizationRecordController/getMaxFrequency.mhtml?sterilizerName='+$('#sters').val(),
+ dataType:'json',
+ type:'get',
+ async:false,
+ success:function(data){
+ if(data.success===true){
+ $('#furnace').val(data.data.nextCycleCounter)
+ $('#furnace').attr('disabled','disabled')
+ }else{
+ alert(data.message)
+ }
+ }
+ })
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/baseData/sterilisationController/getSterilizerType.mhtml?sterilizerName='+$('#sters').val(),
+ dataType:'json',
+ type:'get',
+ async:false,
+ success:function(data){
+ var list=data.rows;
+ if(data.success===true){
+ var str = "";
+ str=" "
+ for(var i=0;i"+list[i]['sterilisation']+" ";
+ }
+ $("#procedure").html(str);
+ }else {
+ alert(data.message)
+ }
+ }
+ })
+ })
+
+ $('#procedure').change(function(){
+ $('.procedure').hide();
+ $.ajax({
+ url:'http://rap2api.taobao.org/app/mock/85153/disinfectSystem/baseData/sterilisationController/getSterilizerType.mhtml?sterilizerName='+$('#sters').val(),
+ type:'get',
+ dataType:'json',
+ async:false,
+ success:function(data){
+ var datas=data.rows;
+ for(var i=0;i