Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionView.js =================================================================== diff -u -r40302 -r41013 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionView.js (.../foreignProxyDisinfectionView.js) (revision 40302) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionView.js (.../foreignProxyDisinfectionView.js) (revision 41013) @@ -751,7 +751,238 @@ } } } + var tbar2 = [] + + if(!sstsConfig.hiddenForeignProxyPartElement){ + tbar2 = new top.Ext.Toolbar({ + items :[{ + text: '数量:' + }, { + xtype: 'numberfield', + id: 'count1', + name: 'count1', + style: 'text-align: left', + anchor: '95%', + width: 50, + maxValue: 9999, + allowNegative: false, + allowDecimals: false, + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + addForeignProxyDisinfectionItem(); + } + } + } + }, { + text: '添加', + id: 'addTousseBt', + iconCls: 'btn_ext_add', + handler: function () { + addForeignProxyDisinfectionItem(); + } + }] + }); + }else { + tbar.push({ + text: '数量:' + }, { + xtype: 'numberfield', + id: 'count1', + name: 'count1', + style: 'text-align: left', + anchor: '95%', + width: 50, + maxValue: 9999, + allowNegative: false, + allowDecimals: false, + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + addForeignProxyDisinfectionItem(); + } + } + } + }, { + text: '添加', + id: 'addTousseBt', + iconCls: 'btn_ext_add', + handler: function () { + addForeignProxyDisinfectionItem(); + } + }) + } + var tbar = [{ + text: '物品名称:' + }, { + xtype: 'combo', + id: 'package1', + name: 'package1', + queryParam: 'spell', + minChars: 0, + valueField: 'id', + displayField: 'name', + width: 200, + store: tousseStore, + forceSelection: true, + lazyInit: true, + editable: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + anchor: '97%', + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + top.Ext.getCmp('packageType1').focus(); + } + }, + select: function (combo, record, index) { + top.Ext.getCmp('packageType1').setValue(record.data.packageType); + top.Ext.getCmp('sterilingType1').setValue(record.data.sterilingMethod); + top.Ext.getCmp('tousseType1').setValue(record.data.tousseType); + } + } + }, { + xtype: 'hidden', + name: 'tousseType1', + id: 'tousseType1' + }, { + text: '包装类型:' + }, { + xtype: 'combo', + id: 'packageType1', + name: 'packageType1', + valueField: 'typeName', + displayField: 'typeName', + store: packTypeStore, + width: 80, + editable: false, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + anchor: '97%', + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + top.Ext.getCmp('sterilingType1').focus(); + } + } + } + }, { + text: '灭菌程序:', + hidden: sstsConfig.hiddenForeignProxyPartElement + }, { + hidden: sstsConfig.hiddenForeignProxyPartElement, + xtype: 'combo', + id: 'sterilingType1', + name: 'sterilingType1', + valueField: 'typeName', + displayField: 'typeName', + store: foldersJsonStore, + width: 80, + editable: false, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + anchor: '97%', + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + top.Ext.getCmp('count1').focus(); + } + } + } + }, { + text: '灭菌日期:', + hidden: false + }, { + xtype: 'dateextensiablefield', + id: 'sterileStartDate1', + name: 'sterileStartDate1', + width: 200, + minWidth: 190, + // hidden : sstsConfig.printLabelWhenReviewing, + emptyText: '默认为今天', + // inputAttrTpl: " data-qtip='空白表示灭菌日期为今天' ", + editable: false, + altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + // selectOnFocus :true, + format: 'Y-m-d', + allowBlank: true, + anchor: '97%' + }] + + var tbar2 = [] + + if(!sstsConfig.hiddenForeignProxyPartElement){ + tbar2 = new top.Ext.Toolbar({ + items :[{ + text: '数量:' + }, { + xtype: 'numberfield', + id: 'count1', + name: 'count1', + style: 'text-align: left', + anchor: '95%', + width: 50, + maxValue: 9999, + allowNegative: false, + allowDecimals: false, + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + addForeignProxyDisinfectionItem(); + } + } + } + }, { + text: '添加', + id: 'addTousseBt', + iconCls: 'btn_ext_add', + handler: function () { + addForeignProxyDisinfectionItem(); + } + }] + }); + }else { + tbar.push({ + text: '数量:' + }, { + xtype: 'numberfield', + id: 'count1', + name: 'count1', + style: 'text-align: left', + anchor: '95%', + width: 50, + maxValue: 9999, + allowNegative: false, + allowDecimals: false, + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + addForeignProxyDisinfectionItem(); + } + } + } + }, { + text: '添加', + id: 'addTousseBt', + iconCls: 'btn_ext_add', + handler: function () { + addForeignProxyDisinfectionItem(); + } + }) + } + form = new top.Ext.FormPanel( { id : 'proxyDisinfectionForm', frame : true, @@ -1278,139 +1509,7 @@ border : true, frame : false, clicksToEdit : 1,// 设置点击几次才可编辑 - tbar : [{ - text : '物品名称:' - },{ - xtype : 'combo', - id : 'package1', - name : 'package1', - queryParam : 'spell', - minChars : 0, - valueField : 'id', - displayField : 'name', - width : 200, - store : tousseStore, - forceSelection : true, - lazyInit : true, - editable:true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : true, - anchor : '97%', - listeners : { - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('packageType1').focus(); - } - }, - select : function(combo, record, index) { - top.Ext.getCmp('packageType1').setValue(record.data.packageType); - top.Ext.getCmp('sterilingType1').setValue(record.data.sterilingMethod); - top.Ext.getCmp('tousseType1').setValue(record.data.tousseType); - } - } - },{ - xtype : 'hidden', - name : 'tousseType1', - id : 'tousseType1' - },{ - text : '包装类型:' - },{ - xtype : 'combo', - id : 'packageType1', - name : 'packageType1', - valueField : 'typeName', - displayField : 'typeName', - store : packTypeStore, - width : 80, - editable:false, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : true, - anchor : '97%', - listeners : { - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('sterilingType1').focus(); - } - } - } - },{ - text : '灭菌程序:', - hidden : sstsConfig.hiddenForeignProxyPartElement - },{ - hidden : sstsConfig.hiddenForeignProxyPartElement, - xtype : 'combo', - id : 'sterilingType1', - name : 'sterilingType1', - valueField : 'typeName', - displayField : 'typeName', - store : foldersJsonStore, - width : 80, - editable:false, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : true, - anchor : '97%', - listeners : { - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('count1').focus(); - } - } - } - },{ - text : '灭菌日期:', - hidden : false - },{ - xtype : 'dateextensiablefield', - id : 'sterileStartDate1', - name : 'sterileStartDate1', - width: 200, - minWidth : 190, -// hidden : sstsConfig.printLabelWhenReviewing, - emptyText : '默认为今天', -// inputAttrTpl: " data-qtip='空白表示灭菌日期为今天' ", - editable : false, - altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', -// selectOnFocus :true, - format : 'Y-m-d', - allowBlank : true, - anchor : '97%' - },{ - text : '数量:' - },{ - xtype : 'numberfield', - id : 'count1', - name : 'count1', - style : 'text-align: left', - anchor : '95%', - width : 50, - maxValue:9999, - allowNegative : false, - allowDecimals : false, - listeners : { - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - addForeignProxyDisinfectionItem(); - } - } - } - },{ - text : '添加', - id : 'addTousseBt', - iconCls : 'btn_ext_add', - handler : function() { - addForeignProxyDisinfectionItem(); - } - }], + tbar:tbar, listeners :{ beforeedit :function(obj){ if(!gridEditable){ @@ -1431,6 +1530,11 @@ if(sstsConfig.enableTheAdditionOfToussesToForeignProxyDisinfectionToBeShipped && deliverStatus == '待发货' && obj.value < oldCount){ item.set('count',oldCount); } + }, + render : function() { + if(tbar2 && tbar2.items){ + tbar2.render(this.tbar); + } } } })]