Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r35547 -r35744 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35547) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35744) @@ -1022,7 +1022,7 @@ {hidden :SSTS_ProjectName_manager,text:"设备维护项目名称设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=projectName',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_PackType_manager,text:"包装类型设置",href:WWWROOT+'/systemmanage/httpOptionByValue.mhtml?listId=packType',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_equipment_manager,text:"设备设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=equipment',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_equipment_manager,text:"清洗方式设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=washMethod',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_equipment_manager,text:"清洗方式设置",href:WWWROOT+'/disinfectsystem/basedatamanager/washMethod/washMethodView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_Tousse_Update,text:"器械包重量设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=tousseWeight&optionName=器械包重量设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_DiposableGoodsType_manager,text:"一次性物品类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=diposableGoodsType',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=expensiveGoodsType',hrefTarget:linkTarget,leaf:true}, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js =================================================================== diff -u -r33518 -r35744 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js (.../materialDefinitionForm.js) (revision 33518) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js (.../materialDefinitionForm.js) (revision 35744) @@ -29,6 +29,7 @@ baseParams : {optionType : optionType_washMethod}, fields: [ {name : 'value',mapping : 'value'}, + {name : 'id',mapping : 'id'}, ] }); @@ -564,6 +565,10 @@ columnWidth : .5, layout : 'form', items:[{ + xtype:'hidden', + id:'washMethodId', + name:'washMethodId' + },{ xtype : 'combo', fieldLabel : '清洗方式', id : 'washMethod', @@ -576,7 +581,12 @@ editable:false, forceSelection : true, triggerAction : 'all', - anchor : '100%' + anchor : '100%', + listeners:{ + select: function(combo, record, index){ + top.Ext.getCmp('washMethodId').setValue(record.data.id); + } + } }] },{ columnWidth : .25, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.jsp (revision 35744) @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@page import="com.forgon.disinfectsystem.common.CssdUtils"%> + + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +清洗方式 + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodForm.js (revision 35744) @@ -0,0 +1,167 @@ +var configWin; +var formPanel; + +function cancel() { + configWin.close(); +} + +function modify(v, data) { + var id = data.id; + var optionText = data.optionText; + showAddOrEditWindow(id, optionText); +} + +//排序 +function moveMaterial(orderType) { + setTimeout(function () { + var selectedRecords = sterilizationPurposeGrid.getSelectionModel().getSelection(); + var id = selectedRecords[0].data.id; + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/washMethodHttpOptionAction!sortWashMethodHttpOption.do', + params: { id: id, orderType: orderType }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + if (result.success) { + showResult('排序成功!'); + listStore.load(); + } else { + showResult(result.message); + } + }, + failure: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + showResult(result.message); + } + }); + }, 500); +} + +//删除清洗方式 +function deleteConfig(grid) { + var selectedRecords = grid.getSelectionModel().getSelection(); + var selectedCount = grid.getSelectionModel().getCount(); + var ids = []; + if (selectedCount < 1) { + showResult("请选择要删除的数据"); + } else { + for (var i = 0, len = selectedRecords.length; i < len; i++) { + ids[i] = selectedRecords[i].data['id']; + } + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/washMethodHttpOptionAction!deleteWashMethodHttpHttpOption.do', + params: { ids: ids.join(';') }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + if (result.success) { + showResult('删除成功!'); + listStore.load(); + } else { + showResult(result.message); + } + }, + failure: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + showResult(result.message); + } + }); + } + }); + } +} + +//保存清洗方式信息 +function saveConfig(id) { + var optionText = top.Ext4.getCmp('name').getValue(); + var mask = new Ext4.LoadMask({ + msg: '正在保存,请稍候...', + target: formPanel + }); + mask.show(); + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/washMethodHttpOptionAction!saveWashMethodHttpOption.do', + params: { id: id, optionText: optionText }, + success: function (response, options) { + var result = Ext4.decode(response.responseText); + if (result.success) { + configWin.close(); + listStore.load(); + showResult('保存成功'); + } else { + showResult(result.message); + } + mask.hide(); + }, + failure: function (response, options) { + showResult('保存失败!'); + } + }); +} + +//显示清洗方式信息的窗口 +function showAddOrEditWindow(id, optionText) { + formPanel = new top.Ext4.form.Panel({ + id: 'configForm', + frame: true, + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px;', + width: 400, + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right', + labelWidth: 70 + }, + items: [{ + layout: 'column', + items: [{ + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'textfield', + fieldLabel: '名称', + id: 'name', + name: 'name', + allowBlank: false, + value: optionText || '', + anchor: '95%' + }] + }] + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + handler: function () { + if (formPanel.getForm().isValid()) { + saveConfig(id); + } else { + showResult('请填写表单!'); + return false; + } + } + }, { + text: '取消', + handler: cancel + }] + }); + configWin = new top.Ext4.window.Window({ + id: 'configWin', + layout: 'column', + title: '清洗方式信息', + width: 400, + height: 130, + border: false, + plain: true, + modal: true, + items: [{ + region: 'center', + width: 400, + layout: 'fit', + items: [formPanel] + }] + }); + configWin.show(); +} + Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/washMethod/washMethodView.js (revision 35744) @@ -0,0 +1,93 @@ +var listStore; +var sterilizationPurposeGrid; + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "名称", dataIndex: 'optionText', width: 150, renderer: modifyRecord }, + { + header: "排序", dataIndex: 'serialNumber', width: 100, renderer: function (v, p, record) { + var id = record.data.id; + var str = "" + + ""; + return str; + } + } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(''); + } + }, '-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + handler: function () { + var selectedRecords = sterilizationPurposeGrid.getSelectionModel().getSelection(); + var selectedCount = sterilizationPurposeGrid.getSelectionModel().getCount(); + if (selectedCount < 1) { + showResult("请选择要修改的数据"); + } else if (selectedCount > 1) { + showResult("只能修改一条数据"); + } else { + var id = selectedRecords[0].data['id']; + var optionText = selectedRecords[0].data['optionText']; + showAddOrEditWindow(id, optionText); + } + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(sterilizationPurposeGrid); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/washMethodHttpOptionAction!loadWashMethodHttpOption.do', + reader: { + root: 'data' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'optionText' } + ] + }); + + listStore.loadPage(1); + + sterilizationPurposeGrid = new Ext4.grid.GridPanel({ + title: '清洗方式设置', + columns: columns, + frame: false, + autoScroll: false, + store: listStore, + tbar: tbar, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: listStore, // same store GridPanel is using + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + }, + selModel: new Ext4.selection.CheckboxModel() + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [{ + region: 'center', + layout: 'fit', + items: [sterilizationPurposeGrid] + }] + }); + +}); \ No newline at end of file