Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/httpOption/httpOption.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/httpOption/httpOption.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/httpOption/httpOption.js (revision 25058) @@ -0,0 +1,90 @@ +$(function(){ + + var data = [ + { + id:1, + content:'AAAA', + sort:1 + }, + { + id:2, + content:'BBBB', + sort:2 + }, + { + id:3, + content:'CCCC', + sort:3 + }, + { + id:4, + content:'DDDD', + sort:4 + } + ]; + + initSelect("selectListBox",data); + + + $("#addBtn").click(function(){ + var addVal = $("#addNewInput").val(); + var addOption = ""; + if(addVal != null && addVal != ''){ + $("#selectListBox").append(addOption); + } + $("#addNewInput").val(""); + }); + + $("#modifConfirmBtn").click(function(){ + var selectedEl = $("#selectListBox option:selected"); + var optionVal = $("#selectListBox option:selected").val(); + var updateVal = $("#modifyInput").val(); + if(updateVal != null && updateVal != ''){ + $(selectedEl).val(updateVal); + $(selectedEl).text(updateVal); + } + $("#modifyInput").val(""); + }); + + $("#deleteBtn").click(function(){ + $("#selectListBox option:selected").remove(); + }); + + $("#deleteAllBtn").click(function(){ + $("#selectListBox").children().remove(); + }); + + $("#moveUp").click(function(){ + var selectedEl = $("#selectListBox option:selected")[0]; + var selectedElOuterHtml = selectedEl.outerHTML; + var selectedUpEl = $(selectedEl).prev(); + if(selectedUpEl.is("option")){ + $(selectedUpEl).before(selectedElOuterHtml); + $(selectedUpEl).prev().attr('selected','true'); + $(selectedEl).remove(); + } + }); + + $("#moveDown").click(function(){ + var selectedEl = $("#selectListBox option:selected")[0]; + var selectedElOuterHtml = selectedEl.outerHTML; + var selectedUpEl = $(selectedEl).next(); + if(selectedUpEl.is("option")){ + $(selectedUpEl).after(selectedElOuterHtml); + $(selectedUpEl).next().attr('selected','true'); + $(selectedEl).remove(); + } + }); + + + + +}) + +function initSelect(id,data){ + var optionContent = ""; + for(var i = 0;i < data.length;i++){ + optionContent = optionContent + ""; + } + $("#"+id).append(optionContent); +} Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/departmentAppTemplateView.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/departmentAppTemplateView.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/departmentAppTemplateView.js (revision 25058) @@ -0,0 +1,6 @@ +$(function(){ + $("#add").click(function(){ + $("#cssdModal").modal("show"); + }); + +}) \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/supplyroomtype/supplyRoomTypeView.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/supplyroomtype/supplyRoomTypeView.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/supplyroomtype/supplyRoomTypeView.js (revision 25058) @@ -0,0 +1,3 @@ +$(function(){ + +}) Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/bootstrap-table-test.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/bootstrap-table-test.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/bootstrap-table-test.js (revision 25058) @@ -0,0 +1,187 @@ +$(function(){ + var t = new Date(); + var table="
" + $('#main').append(table); + + //主页面table字段 + var allApplication_columns=[{ + checkbox : true + },{ + field : 'id', + align : 'center', + visible:false + }, + { + field : 'orgUnitCode', + align : 'center', + visible:false + }, + { + title : '流水号', + field : 'serialNumber', + align : 'center', + sortable:true + }, + { + title : '申请科室', + field : 'depart', + align : 'center', + sortable:true + }, + { + title : '申请人', + field : 'applicant', + align : 'center', + sortable:true + }, + { + title : '申请时间', + field : 'applicationTimeStr', + align : 'center', + sortable:true + }, + { + title : '最后修改时间', + field : 'submitTimeStr', + align : 'center', + sortable:true + }, + { + title : '打印时间', + field : 'printTimeStr', + align : 'center', + sortable:true + }, + { + title : '类型', + field : 'type', + align : 'center', + sortable:true + }, + { + title : '已提交', + field : 'committedStatus', + align : 'center', + sortable:true, + formatter:function(value){ + if(value == true){ + return "是"; + }else{ + return "否"; + } + } + }, + { + title : '已打印', + field : 'printed', + align : 'center', + sortable:true, + formatter:function(value){ + if(value == 0){ + return "部分打印"; + }else if(value == 1){ + return "未打印"; + }else if(value == 2){ + return "已打印"; + } + } + }, + { + title : '回收状态', + field : 'recyclingStatus', + align : 'center', + sortable:true + }, + { + title : '发货状态', + field : 'deliverStatus', + align : 'center', + sortable:true + }, + { + title : '归还状态', + field : 'returnStatus', + align : 'center', + sortable:true + }, + { + title : '终止状态', + field : 'endStatus', + align : 'center' + }, + { + title : '备注', + field : 'remark', + align : 'center' + }, + { + title : '操作', + field : 'opera', + align : 'center' + } + ]; + + + + + $("#allApplication_table").bootstrapTable( + { + url:WWWROOT +'/disinfectSystem/recyclingApplication/recyclingApplicationController/findRecyclingApplicationList.mhtml', + method : 'get', + dataType : "json", + contentType:"application/json;charset=utf-8", + dataField : "rows",// 这是返回的json数组的key.默认好像是"rows".这里只有前后端约定好就行 + striped : true,// 设置为 true 会有隔行变色效果 + undefinedText : " ",// 当数据为 undefined 时显示的字符 + pagination : true, // 分页 + pageNumber : 1,// 如果设置了分页,首页页码 + data_local : "zh-US",// 表格汉化 + responseHandler : "", + sidePagination:'server', + search:true, + showRefresh:true, + showColumns:true, + trimOnSearch:true, + toolbar:'', + pageSize : 30,// 如果设置了分页,页面数据条数 + pageList : [ 10,20,30], // 如果设置了分页,设置可供选择的页面数据条数。设置为All则显示所有记录。 + paginationPreText: "上一页", + paginationNextText: "下一页", + paginationFirstText: "首页", + paginationLastText: "尾页", + sortable: true,//是否启用排序 + sortOrder: "desc",//排序方式 + sortName: '',//排序字段 + queryParams : function(params) { + return { + offset : params.offset, + limit : params.limit, + sort:params.sort, + order:params.order, + search : params.search + }; + }, + onDblClickRow: function (row) {}, + idField : "id", + columns : allApplication_columns, + onExpandRow: function (index, row, $detail) {}, + onEditableSave: function (field, row, oldValue, $el) {} + }); + + + var t1 = new Date(); + console.log('bootstrap-table 加载时间:'+(t1-t)); + + $("#allApplication_table").on('post-body.bs.table',function(){ + var t3 = new Date(); + console.log('表体数据加载时间:'+ (t3-t)); + }); + + + + + + +}) + + \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/slickgridTest.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/slickgridTest.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/slickgridTest.js (revision 25058) @@ -0,0 +1,253 @@ +$(function(){ + + var initTable = function(){ + var s_grid,s_data = []; + var formatters = { + toClickEl : function (row,cell,value,columnDef,dataContext){ + return ""+value+""; + }, + bakColor:function (row,cell,value,columnDef,dataContext){ + var rtn={text:value,removeClass:'red green orange'}; + if(value == '器械包申请单'){ + rtn.addClasses = 'green'; + }else if(value == '消毒物品申请单'){ + rtn.addClasses = 'blue'; + }else if(value == '一次性物品申请单'){ + rtn.addClasses = 'gray'; + } + return rtn; + } + } + + var checkboxSelector = new Slick.CheckboxSelectColumn({ + cssClass: "slick-cell-checkboxsel" + }); + + var requiredFieldValidator = function (value){ + if(value == null || value == undefined || !value.length){ + return {valid: false, msg: "This is a required field"}; + }else{ + return {valid: true, msg: "This is a required field"}; + } + } + + var pageIng = function(remoteUrl,container,datagrid,pagerType,trans,params,order,search,searchFields){ + new Slick.Controls.EnhancementPager({ + container: container, + remoteUrl:remoteUrl, + datagrid: datagrid, + pagerType: pagerType, + trans: trans, //i18n support + params:params, + limt:25, + order:order, + search:search, + searchFields:searchFields, + }); + } + + var options = { + forceFitColumns: false, + enableCellNavigation: true, + enableColumnReorder: false, + topPanelHeight:'35', + rowHeight:'35', + headerRowHeight:'35', + multiSelect:false, + fullWidthRows:'true', + enableAddRow: false + }; + + var columns = []; + columns.push(checkboxSelector.getColumnDefinition()); + columns.push( + { + id: 'id', + name: 'id', + field: 'id', + name: 'ID', + width: 0, + minWidth: 0, + maxWidth: 0, + cssClass: "reallyHidden", + headerCssClass: "reallyHidden" + }, { + id: 'orgUnitCode', + name: '科室编码', + cssClass: "cell-title", + field: 'orgUnitCode', + width: 0, + minWidth: 0, + maxWidth: 0, + cssClass: "reallyHidden", + headerCssClass: "reallyHidden" + }, { + id: 'serialNumber', + name: '流水号', + field: 'serialNumber', + formatter: formatters.toClickEl + }, { + id: 'depart', + name: '申请科室', + field: 'depart' + }, { + id: 'applicant', + name: '申请人', + field: 'applicant' + }, { + id: "applicationTimeStr", + name: '申请时间', + field: 'applicationTimeStr' + }, { + id: "submitTimeStr", + name: '最后修改时间', + field: 'submitTimeStr' + }, { + id: "printTimeStr", + name: '打印时间', + field: 'printTimeStr' + }, { + id: "type", + name: '类型', + field: 'type' + }, { + id: "committedStatus", + name: '已提交', + field: 'committedStatus', + formatter: function(row, cell, value, columnDef, dataContext) { + return value == true ? "是" : "否"; + } + }, { + id: "printed", + name: '已打印', + field: 'printed', + formatter: function(row, cell, value, columnDef, dataContext) { + return value == '0' ? "是" : "否"; + } + }, { + id: "recyclingStatus", + name: '回收状态', + field: 'recyclingStatus' + }, { + id: "deliverStatus", + name: '发货状态', + field: 'deliverStatus' + }, { + id: "returnStatus", + name: '归还状态', + field: 'returnStatus' + }, { + id: "endStatus", + name: '终止状态', + field: 'endStatus' + }, { + id: "remark", + name: '备注', + field: 'remark' + }, { + id: "opera", + name: '操作', + field: 'opera' + } + ); + + var tousseDataView = new Slick.Data.DataView({ inlineFilters: true }); + tousseDataView.beginUpdate(); + tousseDataView.setItems(s_data); + tousseDataView.endUpdate(); + + s_grid = new Slick.Grid("#main",tousseDataView,columns,options); + s_grid.registerPlugin(checkboxSelector); + + + + var mytranslation = { + pagelabel: "页", + currentpage: "当前页", + refresh: "刷新", + recordstatelabel: "显示", + currentrecords: "显示/隐藏当前记录状态", + perpage: "每页条数", + pageminus: "上一页", + pageplus: "下一页", + resultset_first: "第一页", + resultset_prev: "上一页", + resultset_next: "下一页", + resultset_last: "最后一页" + }; + + var pagercontent =$("#page"); + var url=WWWROOT+'/disinfectSystem/recyclingApplication/recyclingApplicationController/findRecyclingApplicationList.mhtml'; + var search='',searchFields='',order ='desc'; + pageIng(url,pagercontent,s_grid,'',mytranslation,'',order); + + s_grid.setSelectionModel(new Slick.RowSelectionModel({selectActiveRow: false})); + s_grid.autosizeColumns(); + + s_grid.onClick.subscribe(function(e,args){ + var row = args.row; + var da = s_grid.getDataItem(row) + parent.setDate(da); + if(da.type == Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM + || da.type == Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM + ||da.type == Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM ){ + $("#tousseIframe",parent.document).contents().find("#showForm").click(); + } + }) + + + tousseDataView.onRowCountChanged.subscribe(function (e, args) { + tousseGrid.updateRowCount(); + tousseGrid.render(); + }); + + tousseDataView.onRowsChanged.subscribe(function (e, args) { + tousseGrid.invalidateRows(args.rows); + tousseGrid.render(); + }); + + /**鼠标移入进"流水号"单元格,显示申请单申请物品申请发货回收等状态详情*/ + $(".serialNumberCla").on('mouseenter',function(e){ + var $this = $(this); + var thisApplicationId = $($this).attr('id'); + var applicationItems = []; + $.ajax({ + url:WWWROOT+"/disinfectSystem/recyclingApplication/recyclingApplicationController/findApplicationItemVOListByInvoicePlanId.mhtml", + type:"GET", + s_data:{id:thisApplicationId}, + async:false, + dataType:"json", + success:function(msg){ + applicationItems = msg.rows; + } + }); + var divEl = ""; + for(var a = 0;a"+applicationItems[a].name+""+applicationItems[a].amount+""+applicationItems[a].recyclingAmount+"" + +applicationItems[a].packedAmount+""+applicationItems[a].sterilizationAmount+""+applicationItems[a].invoiceAmount+""; + } + + $("#applicationDetailsTableTh").nextAll().remove(); + $("#applicationDetailsTable").append(divEl); + $("#applicationDetails").removeClass("application_details_hide").addClass("application_details_show"); + $("#applicationDetails").css({"top":e.originalEvent.y,"left":e.originalEvent.x+50}); + }); + + //鼠标移除时将悬浮框隐藏 + $(".serialNumberCla").on('mouseleave',function(e){ + $("#applicationDetails").removeClass("application_details_show").addClass("application_details_hide"); + }); + } + + initTable(); + + $("#appTest").click(function(){ + $('#exampleModal').modal({ + show:true + }) + $("#exampleModal").modal("show"); + }); + +}) + + Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdHandleTousses/cssdHandleToussesView.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdHandleTousses/cssdHandleToussesView.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdHandleTousses/cssdHandleToussesView.js (revision 25058) @@ -0,0 +1,6 @@ +$(function(){ + $("#add").click(function(){ + $("#cssdModal").modal("show"); + }); + +}) \ No newline at end of file Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdServiceDeptsView.js =================================================================== diff -u --- ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdServiceDeptsView.js (revision 0) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/basedatamanager/cssdServiceDeptsView.js (revision 25058) @@ -0,0 +1,8 @@ +$(function(){ + $("#add").click(function(){ + $("#cssdModal").modal("show"); + }); + + + +}) \ No newline at end of file