Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp (revision 34037) @@ -0,0 +1,26 @@ +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +清洗耗材容器管理 + + + + + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r33977 -r34037 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 33977) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34037) @@ -865,6 +865,9 @@ // pendingWashAndDisinfectColumnTree.loader.load(pendingWashAndDisinfectColumnTree.root,function(){}); fieldsetHeight = (!!window.ActiveXObject || "ActiveXObject" in window || window.navigator.userAgent.indexOf("MSIE") >= 1) ? 185 : 210; + if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ + fieldsetHeight += 40; + } formObj = new top.Ext.FormPanel({ id: 'washForm', @@ -1146,70 +1149,38 @@ } }); DWREngine.setAsync(true); + if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadRinserBindConsumptiveMaterialContainer.do', + params: { + rinserName: value + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; + if(consumptiveMaterialVolumes !== ''){ + top.Ext.getCmp('totalAmount').setValue(consumptiveMaterialVolumes); + top.Ext.getCmp('hiddenBox1').show(); + }else { + top.Ext.getCmp('hiddenBox1').hide(); + } + }else { + top.Ext.getCmp('hiddenBox1').hide(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showResult("系统加载失败,请稍候再试"); + } + }) + } // } } }, anchor: '99%' }] }, - // { - // id : 'programInputTextField', - // columnWidth : .5, - // layout : 'form', - // items : [{ - // xtype : 'textfield', - // fieldLabel : "清洗程序条码", - // allowBlank : true, - // blankText : '请输入!', - // name : "programInputText", - // id : "programInputText", - // anchor : '99%', - // listeners : { - // specialkey : function(field, ee) { - // if (ee.getKey() == Ext.EventObject.ENTER) { - // var barcode = top.Ext.getCmp('programInputText').getValue(); - // var setComBoVal = ''; - // var cleanMinutes = 0; - // if(barcode!=''){ - // var count = washingMachineStore.getCount(); - // for(var i=0;i 0){ - // top.Ext.getCmp('cleanParameter').setValue(result); - // } - // }); - // } - // } - // } - // - // } - // }] - // }, { columnWidth: .5, layout: 'form', @@ -1229,7 +1200,7 @@ var oldStr = Ext.util.Format.date(oldValue, 'Y-m-d H:i'); buildLogInfo("PC修改清洗时间,将开始时间" + oldStr + "改为" + newStr); }, - select: function () { + select: function (thiz, record, index) { clearInterval(endDateTimerHandle); } } @@ -1262,7 +1233,32 @@ top.Ext.getCmp('cleanParameter').setValue(result); } }); - + if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!getCleanMethodConsumptionVolume.do', + params: { + id: record.data.id + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; + if(consumptiveMaterialVolumes !== ''){ + top.Ext.getCmp('consumptiveMaterialVolumes').setValue(consumptiveMaterialVolumes); + top.Ext.getCmp('hiddenBox2').show(); + }else { + top.Ext.getCmp('hiddenBox2').hide(); + } + }else { + top.Ext.getCmp('hiddenBox2').hide(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showResult("系统加载失败,请稍候再试"); + } + }) + } } }, anchor: '99%' @@ -1309,7 +1305,35 @@ }, { columnWidth: 1, layout: 'form', + hidden:true, + id:'hiddenBox1', items: [{ + xtype: 'textfield', + fieldLabel: "设备耗材余量", + name: "totalAmount", + id: "totalAmount", + readOnly: true, + cls : 'fieldReadOnlyNoRemove', + anchor: '99%' + }] + }, { + columnWidth: 1, + layout: 'form', + hidden:true, + id:'hiddenBox2', + items: [{ + xtype: 'textfield', + fieldLabel: "本次耗材消耗", + name: "consumptiveMaterialVolumes", + id: "consumptiveMaterialVolumes", + readOnly: true, + cls : 'fieldReadOnlyNoRemove', + anchor: '99%' + }] + }, { + columnWidth: 1, + layout: 'form', + items: [{ xtype: 'textarea', fieldLabel: "清洗程序参数", name: "cleanParameter", Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r34015 -r34037 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34015) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34037) @@ -628,6 +628,16 @@ } ] },{ + text:"设备耗材管理", + singleClickExpand:singleClickExpandTree, + hidden:!sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction, + children:[ + {hidden : false,text:"清洗耗材种类管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : false,text:"清洗耗材容器管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : false,text:"清洗耗材使用记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : false,text:"清洗耗材补充记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialAddRecord/view.jsp',hrefTarget:linkTarget,leaf:true} + ] +},{ text:"不良事件管理", singleClickExpand:singleClickExpandTree, hidden:!sstsConfig.enableAdverseEventManagement, Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (revision 34037) @@ -0,0 +1,87 @@ +var listStore; +var listGrid; + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "容器名称", dataIndex: 'name', width: 150 }, + { header: "已绑定清洗机", dataIndex: 'rinserNames', width: 150 }, + { header: "已绑定清洗耗材容量", dataIndex: 'consumptiveMaterialVolumeStr', width: document.body.clientWidth - 350, sortable: false } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(); + } + }, '-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + handler: function () { + var selectedRecords = listGrid.getSelectionModel().getSelection(); + var selectedCount = listGrid.getSelectionModel().getCount(); + if (selectedCount < 1) { + showResult("请选择要修改的数据"); + } else if (selectedCount > 1) { + showResult("只能修改一条数据"); + } else { + editConfig(selectedRecords[0].data.id); + } + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(listGrid); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadConsumptiveMaterialContainer.do', + reader: { + root: 'data' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'rinserNames' }, + { name: 'name' }, + { name: 'consumptiveMaterialVolumeStr' } + ] + }); + + listStore.loadPage(1); + + listGrid = 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: [listGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (revision 34037) @@ -0,0 +1,437 @@ +var treeStore; + +function reloadGird(pageNowReal) { + var startDate = Ext4.getCmp('startDate').getRawValue(); + var endDate = Ext4.getCmp('endDate').getRawValue(); + var userId = Ext4.getCmp('userId').getValue(); + var consumptiveMaterialTypeId = Ext4.getCmp('consumptiveMaterialTypeId').getValue(); + var rinserId = Ext4.getCmp('rinserId').getValue(); + var washDisinfectRecordSerialNum = Ext4.getCmp('washDisinfectRecordSerialNum').getValue(); + treeStore.proxy.extraParams = { + startDate: startDate, + endDate: endDate, + userId: userId || '', + consumptiveMaterialTypeId: consumptiveMaterialTypeId || '', + rinserId: rinserId || '', + washDisinfectRecordSerialNum: washDisinfectRecordSerialNum || '', + pageNow: pageNowReal || 1 + }; + treeStore.reload(); +} + +function handlePagingButtonRequest(_this, e, eOpts) { + var pagCountInfo = Ext4.getCmp('pagCountInfo').text; + var pageNowReal = parseInt(Ext4.getCmp('pageNowReal').getValue()); + var pageCountReal = parseInt(Ext4.getCmp('pageCountReal').getValue()); + var buttonText = _this.text; + + if (!pagCountInfo) { + showResult("没数据"); + return false; + } + + if (buttonText == '第一页') { + if (pageNowReal == 1) { + showResult("已经是第一页了"); + return false; + } + pageNowReal = 1; + } else if (buttonText == '上一页') { + --pageNowReal; + if (pageNowReal < 1) { + showResult("已经是第一页了"); + return false; + } + } else if (buttonText == '下一页') { + ++pageNowReal; + if (pageNowReal > pageCountReal) { + showResult("已经是最后一页了"); + return false; + } + } else if (buttonText == '最后一页') { + if (pageNowReal == pageCountReal) { + showResult("已经是最后一页了"); + return false; + } + pageNowReal = pageCountReal + } + + reloadGird(pageNowReal); +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + Ext4.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif'; + //耗材种类 + var typeStore = new top.Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + typeStore.load(); + //操作员 + var userJsonStore = new top.Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + //清洗机 + var rinserStore = new top.Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/rinserAction!getAllRinserInfo.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + var width = Ext4.getBody().dom.clientWidth; + var form = new Ext4.form.Panel({ + region: 'north', + frame: true, + border: 0, + title: '清洗耗材使用记录', + bodyPadding: '5 5 0', + autoScroll: true, + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right', + labelWidth: 70 + }, + width: width, + items: [{ + height: 60, + width: '100%', + layout: 'column', + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'datefield', + border: 0, + fieldLabel: '开始时间', + id: 'startDate', + name: 'startDate', + format: 'Y-m-d', + allowBlank: false, + editable: false, + anchor: '95%', + value: new Date(startDate) + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'datefield', + border: 0, + fieldLabel: '结束时间', + id: 'endDate', + name: 'endDate', + format: 'Y-m-d', + allowBlank: false, + editable: false, + anchor: '95%', + value: new Date(startDate) + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '耗材种类', + id: 'consumptiveMaterialTypeId', + name: 'consumptiveMaterialTypeId', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: typeStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + id: 'userId', + name: 'userId', + queryParam: 'spell', + fieldLabel: '操作员', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: userJsonStore, + pageSize: 50, + forceSelection: true, + lazyInit: true, + anchor: '95%', + listWidth: 300, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '清洗机', + id: 'rinserId', + name: 'rinserId', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: rinserStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'textfield', + border: 0, + fieldLabel: '流水号', + allowBlank: true, + anchor: '100%', + name: "washDisinfectRecordSerialNum", + id: "washDisinfectRecordSerialNum" + }] + }], + }], + buttons: [{ + text: '查询', + handler: function () { + reloadGird(); + } + }, { + text: '重置', + handler: function () { + Ext4.getCmp('userId').setValue(''); + Ext4.getCmp('consumptiveMaterialTypeId').setValue(''); + Ext4.getCmp('rinserId').setValue(''); + Ext4.getCmp('washDisinfectRecordSerialNum').setValue(''); + Ext4.getCmp('startDate').setRawValue(startDate); + Ext4.getCmp('endDate').setRawValue(startDate); + } + }] + }); + + Ext4.define('columnTreeGrid', { + extend: 'Ext4.tree.Panel', + xtype: 'tree-grid', + useArrows: true, + rootVisible: false, + multiSelect: false, + columnLines: true, + rowLines: true, + cls: 'no-leaf-icons', + initComponent: function () { + Ext4.apply(this, { + columns: [{ + header: '流水号', + width: 120, + sortable: true, + xtype: 'treecolumn', // 必须有此定义,否则不能显示文件夹图标 + dataIndex: 'washDisinfectRecordSerialNum' + }, { + header: '清洗机', + width: 100, + dataIndex: 'rinserName' + }, { + header: '清洗程序', + width: 100, + dataIndex: 'cleanMethod' + }, { + header: '操作员', + width: 80, + dataIndex: 'operator' + }, { + header: '耗材种类', + width: 100, + dataIndex: 'consumptiveMaterialTypeName' + }, { + header: '消耗数量', + width: 80, + dataIndex: 'useAmount' + }, { + header: '消耗剩余容量', + width: 100, + dataIndex: 'consumptiveMaterialVolumn' + }, { + header: '容量单位', + width: 80, + dataIndex: 'consumptiveMaterialTypeUnit' + }, { + header: '操作时间', + width: 160, + dataIndex: 'operationDateTime' + }, { + header: '备注', + width: 200, + dataIndex: 'remark' + }] + }); + this.superclass.initComponent.call(this); + } + }); + + Ext4.define('cModel', { + extend: 'Ext4.data.Model', + fields: [ + { name: 'washDisinfectRecordSerialNum' }, + { name: 'rinserName' }, + { name: 'cleanMethod' }, + { name: 'operator' }, + { name: 'consumptiveMaterialTypeName' }, + { name: 'useAmount' }, + { name: 'consumptiveMaterialVolumn' }, + { name: 'consumptiveMaterialTypeUnit' }, + { name: 'pageCount' }, + { name: 'pageNow' }, + { name: 'rowCount' }, + { name: 'operationDateTime' }, + { name: 'remark' } + ] + }); + + treeStore = new Ext4.data.TreeStore({ + model: cModel, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadConsumptiveMaterialUseRecord.do' + }, + folderSort: true, + listeners: { + beforeload: function (thiz) { + var startDate = Ext4.getCmp('startDate').getRawValue(); + var endDate = Ext4.getCmp('endDate').getRawValue(); + treeStore.proxy.extraParams.startDate = startDate; + treeStore.proxy.extraParams.endDate = endDate; + }, + load: function (_this, node, records, successful, eOpts) { + var temp = records[0]; + if (temp) { + var pageNow = temp.data.pageNow; + var pageCount = temp.data.pageCount; + var rowCount = temp.data.rowCount; + var fristIndex = ((pageNow - 1) * 20) + 1; + var endIndex = (pageNow * 20 > rowCount) ? rowCount : pageNow * 20; + + Ext4.getCmp('pageNow').setValue(pageNow); + Ext4.getCmp('pagCountInfo').setText('共有' + pageCount + '页'); + Ext4.getCmp('pagingInfo').setText('显示' + fristIndex + '-' + endIndex + ',共有' + rowCount + '条'); + Ext4.getCmp('pageNowReal').setValue(pageNow); + Ext4.getCmp('pageCountReal').setValue(pageCount); + } else { + Ext4.getCmp('pagCountInfo').setText(''); + Ext4.getCmp('pagingInfo').setText('没数据'); + } + } + } + }); + + useRecordGrid = Ext4.create('columnTreeGrid', { + id: 'useRecordGrid', + flex: 1, + border: false, + viewConfig: { loadMask: { msg: '正在加载,请稍候...' } }, + store: treeStore, + bbar: [{ + text: '第一页', + handler: handlePagingButtonRequest + }, { + text: '上一页', + handler: handlePagingButtonRequest + }, { + xtype: 'label', + text: '第' + }, { + xtype: 'numberfield', + hideTrigger: true, + id: 'pageNow', + value: 1, + minValue: 1, + width: 30, + enableKeyEvents: true, + listeners: { + keypress: function (_this, e, eOpts) { + if (e.getKey() == 13) { + var pagCountInfo = Ext4.getCmp('pagCountInfo').text + if (pagCountInfo) { + reloadGird(); + } else { + showResult("没数据"); + return false; + } + } + } + } + }, { + xtype: 'label', + id: 'pagCountInfo' + }, { + text: '下一页', + handler: handlePagingButtonRequest + }, { + text: '最后一页', + handler: handlePagingButtonRequest + }, '->', { + xtype: 'label', + id: 'pagingInfo' + }, { + xtype: 'hiddenfield', + id: 'pageNowReal' + }, { + xtype: 'hiddenfield', + id: 'pageCountReal' + }] + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [form, { + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: [useRecordGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js =================================================================== diff -u -r33570 -r34037 --- ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js (.../interferewashAndDisinfectForm.js) (revision 33570) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js (.../interferewashAndDisinfectForm.js) (revision 34037) @@ -649,9 +649,13 @@ } var washBasketTreePanelTitle = '清洗篮筐'; +var oldRinserName = ''; +var oldDisinfectProgram = ''; function addAndEditWashAndDisinfectRecord(id,isWashAgain) { personInChargeAllowBlank = getBoolValueFromJs('sstsConfig.washAndDisinfectRecordPersonInChargeAllowBlank',true); this.id = id; + oldRinserName = ''; + oldDisinfectProgram = ''; materialStore.removeAll(); var basketTreePanel = new top.Ext.tree.ColumnTree({ id : 'basketTreePanel', @@ -1356,6 +1360,8 @@ if(rinserName == "人工清洗"){ setFieldsHide(true); } + oldRinserName = rinserName; + oldDisinfectProgram = action.result.data.disinfectProgram; // 判断要不要显示循环次数输入框 WashAndDisinfectRecordTableManager.isDefineDeviceInterface(rinserName,function(result){ if( result == false) @@ -1630,7 +1636,7 @@ var washRecordMsg = top.Ext.getCmp('washRecordMsg').getValue(); formObj.form.submit({ url : WWWROOT + '/disinfectSystem/washAndDisinfect/washAndDisinfectRecordAction!interfereWashAndDisinfectRecord.do', - params : {conCurrent :conCurrent, orgWashStartTime : orgWashStartTime, orgWashEndTime : orgWashEndTime,washRecordMsg : washRecordMsg, washPersonInCharge : washPersonInCharge, washPersonInChargeCode : washPersonInChargeCode,skipNewBasketVerification:false}, + params : {conCurrent :conCurrent, orgWashStartTime : orgWashStartTime, orgWashEndTime : orgWashEndTime,washRecordMsg : washRecordMsg, washPersonInCharge : washPersonInCharge, washPersonInChargeCode : washPersonInChargeCode,skipNewBasketVerification:false,oldRinserName:oldRinserName,oldDisinfectProgram:oldDisinfectProgram}, method : 'POST', waitMsg : '正在保存数据,请稍候', waitTitle : '提交表单', Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js (revision 34037) @@ -0,0 +1,96 @@ +var listStore; +var listGrid; + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { + header: "序号", width: 100, renderer: function (v, p, record) { + return (p.rowIndex + 1) + } + }, + { header: "名称", dataIndex: 'name', width: 150 }, + { header: "单位", dataIndex: 'unit', width: 150 }, + { header: "备注", dataIndex: 'remark', width: document.body.clientWidth - 450, sortable: false } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(); + } + }, '-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + handler: function () { + var selectedRecords = listGrid.getSelectionModel().getSelection(); + var selectedCount = listGrid.getSelectionModel().getCount(); + if (selectedCount < 1) { + showResult("请选择要修改的数据"); + } else if (selectedCount > 1) { + showResult("只能修改一条数据"); + } else { + var id = selectedRecords[0].data['id']; + var name = selectedRecords[0].data['name']; + var unit = selectedRecords[0].data['unit']; + var remark = selectedRecords[0].data['remark']; + editConfig(id, name, unit, remark); + } + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(listGrid); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do', + reader: { + root: 'data' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'name' }, + { name: 'unit' }, + { name: 'remark' } + ] + }); + + listStore.loadPage(1); + + listGrid = 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: [listGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js =================================================================== diff -u -r32837 -r34037 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 32837) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 34037) @@ -1,188 +1,343 @@ var id; var formObj; var cleanMethodWin; +var listStore; +function renderDeleteButton(v, p, record) { + return ""; +} + +function deleteItem(id){ + for(var i=0;i', { + text: '耗材种类:' + },{ + xtype:'hidden', + id:'consumptiveMaterialTypeId', + name:'consumptiveMaterialTypeId' + },{ + xtype:'hidden', + id:'consumptiveMaterialTypeUnit', + name:'consumptiveMaterialTypeUnit' }, { - layout : 'column', - items : [ { - columnWidth : 0.5, - layout : 'form', - items : [ { - xtype : 'textfield', - fieldLabel : "条形码", - name : "barcode", - id : "barcode", - cls : 'fieldReadOnlyNoRemove', - allowBlank : true, - readOnly : true, - anchor : '90%' - } ] + xtype: 'combo', + fieldLabel: '', + id: 'consumptiveMaterialType', + name: 'consumptiveMaterialType', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: typeStore, + forceSelection: true, + lazyInit: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true, + listeners:{ + select:function(v,record){ + top.Ext.getCmp('consumptiveMaterialTypeId').setValue(record.data.id); + top.Ext.getCmp('consumptiveMaterialTypeUnit').setValue(record.data.unit); + } + } + }, { + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + var id = top.Ext.getCmp('consumptiveMaterialTypeId').getValue(); + var name = top.Ext.getCmp('consumptiveMaterialType').getRawValue(); + var unit = top.Ext.getCmp('consumptiveMaterialTypeUnit').getValue(); + if(id == '' || name == ''){ + showResult('请选择耗材种类'); + return; + } + var isHas = false; + for(var i=0;i