Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r14148 -r14195 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 14148) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 14195) @@ -30,9 +30,9 @@ var materialCm = new Ext.grid.ColumnModel([ {header : 'id',dataIndex : 'id',hidden :true}, - {header : "名称",dataIndex : 'name',width : 200,menuDisabled : true}, + {header : "名称",dataIndex : 'name',width : 250,menuDisabled : true}, {header : "数量",width : 100,menuDisabled : true,dataIndex : 'amount'}, - {id : 'deleteItem',header:'操作',width : 178,menuDisabled : true, + {id : 'deleteItem',header:'操作',menuDisabled : true, renderer: function(v,p,record){ var str = "\"\""; @@ -560,13 +561,16 @@ items : [{ layout : 'column', items : [{ - columnWidth : 0.71, + columnWidth : 0.73, layout : 'column', items : [{ xtype : "fieldset", title : '基础数据', layout:'column', - autoHeight : true, + width:710, + height:185, + columnWidth : 1, +// autoHeight : true, labelWidth : 95, items : [{ layout : 'column', @@ -910,110 +914,95 @@ anchor : '99%' }] }] + }] + },{ + columnWidth : .56, + layout : 'fit', + items : basketTreePanel },{ - xtype : "fieldset", - title : '清洗消毒物品', - layout:'column', - width : 635, - autoHeight : true, - items : [{ - columnWidth : .56, - layout : 'fit', - items : basketTreePanel - },{ - columnWidth : .44, - layout : 'fit', - items : new top.Ext.grid.EditorGridPanel({ - id : 'washAndDisinfectMaterialGrid', - title : '清洗材料', - bodyStyle : 'border:1px solid #afd7af', - store : materialStore, - cm : materialCm, - width : 125, - height : 320, - autoExpandColumn : 'deleteItem', - frame : false, - viewConfig: { - forceFit:true - }, - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }), - tbar : [{ - text : '器械材料:' - },{ - xtype : 'combo', - id : 'materialName', - name : 'materialName', - queryParam : 'spell', - minChars : 0, - valueField : 'name', - displayField : 'name', - store : materialDefinitionStore, - forceSelection : true, - lazyInit : false, - triggerAction : 'all', - hideTrigger : true, - typeAhead : false, - allowBlank : true, - width : 50, - listeners : { - select : function(combo, record, index) { - combo.setValue(record.data.name); - }, - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('materialAmount').focus(); - } - } + columnWidth : .44, + layout : 'fit', + items : new top.Ext.grid.EditorGridPanel({ + id : 'washAndDisinfectMaterialGrid', + title : '清洗材料', + bodyStyle : 'border:1px solid #afd7af', + store : materialStore, + cm : materialCm, + width : 160, + height : 380, + autoExpandColumn : 'deleteItem', + frame : false, + viewConfig: { + forceFit:true + }, + selModel : new top.Ext.grid.RowSelectionModel({ + singleSelect : false + }), + tbar : [{ + text : '器械材料:' + },{ + xtype : 'combo', + id : 'materialName', + name : 'materialName', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'name', + store : materialDefinitionStore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : true, + width : 120, + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + }, + specialkey : function(field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + top.Ext.getCmp('materialAmount').focus(); + } + } - } - },{ - text : '数量:' - },{ - xtype : 'numberfield', - maxLength : '16', - id : 'materialAmount', - name : 'materialAmount', - width : 50, - style : 'text-align: left', - allowDecimals : false, - allowNegative : false, - listeners : { - specialkey : function(field, e) { - if (e.getKey() == Ext.EventObject.ENTER) { - addMaterial(); - } - } - } - },{ - text : '添加', - iconCls : 'btn_ext_add', - handler : function() { - addMaterial(); - } - }] - }) - }] + } + },{ + text : '数量:' + },{ + xtype : 'numberfield', + maxLength : '16', + id : 'materialAmount', + name : 'materialAmount', + width : 50, + style : 'text-align: left', + allowDecimals : false, + allowNegative : false, + listeners : { + specialkey : function(field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + addMaterial(); + } + } + } + },{ + iconCls : 'btn_ext_add', + handler : function() { + addMaterial(); + } + }] + }) }] - }] },{ - columnWidth : 0.29, + columnWidth : 0.27, layout : 'column', items : [{ -// columnWidth : 0.29, -// bodyStyle : 'margin-left:2px;margin-right:0px', + columnWidth : 1, layout : 'fit', items : [{ layout : 'form', columnWidth : 1, - items : [{ - xtype : "fieldset", - title : "待清洗物品", - autoWidth : true,//405, - height : 520, - items : [pendingWashAndDisinfectColumnTree] - }] + items : [pendingWashAndDisinfectColumnTree] }] }] }] @@ -1054,7 +1043,7 @@ title : '清洗消毒记录', modal : true, border:false, - width : 900, + width : 1000, height : 660, plain : true, items : [ formObj ] @@ -1248,8 +1237,9 @@ } var root = top.Ext.getCmp('basketTreePanel').getRootNode(); - if(materialStore.getCount() < 1 && !root.hasChildNodes()){ - showResult('清洗消毒物品不能为空!'); + + if(materialStore.getCount() == 0 && root.childNodes.length == 0){ + showResult('不能添加空的清洗记录!'); setHiddenFieldsAllowBlank(false); return false; } @@ -1263,10 +1253,6 @@ } //获取篮筐和材料的数据 getWashAndDisinfectGridData(); - if(root.childNodes.length == 0){ - showResult('请扫描篮筐或器械包!'); - return ; - } // 验证循环计数器是否已经存在,一个清洗机的一个循环次数应是唯一的。 { var id = top.Ext.getCmp('id').getValue();