Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js =================================================================== diff -u -r14745 -r14787 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js (.../qualitymonitoringForm.js) (revision 14745) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js (.../qualitymonitoringForm.js) (revision 14787) @@ -1,7 +1,9 @@ var qualityMonitoringWin = null; var disableShowImageButton = false; var materialDefinitionStore; -var i = 0; +var tousseDefinitionStore; +var materialItemCount = 0; +var tousseItemCount = 0; var qualityMonitoringId; var formPanel; var qualityMonitoringSterilizationID; @@ -314,6 +316,54 @@ if(top.Ext.getCmp('itemsFieldSet')){ top.Ext.getCmp('itemsFieldSet').doLayout(); } + if(result.data.scope == "器械包"){ + top.Ext.getCmp('material').setVisible(false); + top.Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('amount').setVisible(false); + top.Ext.getCmp('amount').getEl().up('.x-form-item').setDisplayed(false); + hideExtractCheckMaterial(); + top.Ext.getCmp('tempBarcode').setVisible(true); + top.Ext.getCmp('tempBarcode').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('recycle').setVisible(true); + top.Ext.getCmp('recycle').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('tousseName').setVisible(true); + top.Ext.getCmp('tousseName').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('repacking').setVisible(true); + top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('addExtractCheckTousse').setVisible(false); + top.Ext.getCmp('addExtractCheckMaterial').setVisible(false); + }else if(result.data.scope == "材料"){ + top.Ext.getCmp('tempBarcode').setVisible(false); + top.Ext.getCmp('tempBarcode').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('recycle').setVisible(false); + top.Ext.getCmp('recycle').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tousseName').setVisible(false); + top.Ext.getCmp('tousseName').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('repacking').setVisible(false); + top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('material').setVisible(true); + top.Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('amount').setVisible(true); + top.Ext.getCmp('amount').getEl().up('.x-form-item').setDisplayed(true); + //showExtractCheckMaterial(); + top.Ext.getCmp('addExtractCheckTousse').setVisible(false); + top.Ext.getCmp('addExtractCheckMaterial').setVisible(true); + }else{ + top.Ext.getCmp('material').setVisible(true); + top.Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('amount').setVisible(true); + top.Ext.getCmp('amount').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('tempBarcode').setVisible(true); + top.Ext.getCmp('tempBarcode').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('recycle').setVisible(true); + top.Ext.getCmp('recycle').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('tousseName').setVisible(true); + top.Ext.getCmp('tousseName').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('repacking').setVisible(true); + top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('addExtractCheckTousse').setVisible(false); + top.Ext.getCmp('addExtractCheckMaterial').setVisible(true); + } } }, failure : function(response, options) { @@ -397,17 +447,17 @@ }); } } -function addExtractCheckTousse(){ - i++; +function addExtractCheckMaterial(){ + materialItemCount++; var setLeft = top.Ext.getCmp('setLeft'); var setRight = top.Ext.getCmp('setRight'); var items = new Array(); var items2 = new Array(); items = { xtype : 'combo', - id : "material"+i, - name : 'material'+i, + id : "material"+materialItemCount, + name : 'material'+materialItemCount, fieldLabel : '抽检器械', queryParam : 'spell', minChars : 0, @@ -429,8 +479,8 @@ items2 = { xtype : 'numberfield', allowDecimals : false, - name : 'amount'+i, - id : "amount"+i, + name : 'amount'+materialItemCount, + id : "amount"+materialItemCount, fieldLabel : "数量", anchor : '95%' }; @@ -439,12 +489,126 @@ setLeft.doLayout(); setRight.doLayout(); } + +function hideExtractCheckMaterial(){ + if(materialItemCount > 0){ + for(var i=1;i