Index: ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js =================================================================== diff -u -r14534 -r14936 --- ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 14534) +++ ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 14936) @@ -341,6 +341,25 @@ //需要增加判空处理防止js报错 if(result.data){ top.Ext.getCmp('scope').setValue(result.data.scope); + if('器械包' == result.data.scope){ + top.Ext.getCmp("tousseName").setVisible(true); + top.Ext.getCmp("tousseName").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("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); + }else if('材料' == result.data.scope){ + top.Ext.getCmp("tousseName").setVisible(false); + top.Ext.getCmp("tousseName").getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tempBarcode').setVisible(false); + top.Ext.getCmp('tempBarcode').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); + } for(var i = 0 ; result.data.items && i< result.data.items.length ; i++){ if(top.Ext.getCmp('optionAmount').getValue() == null || top.Ext.getCmp('optionAmount').getValue() == ''){ top.Ext.getCmp('optionAmount').setValue(result.data.items[i].id); @@ -1099,6 +1118,25 @@ }); } } + if('器械包' == result.data.scope){ + top.Ext.getCmp("tousseName").setVisible(true); + top.Ext.getCmp("tousseName").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("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); + }else if('材料' == result.data.scope){ + top.Ext.getCmp("tousseName").setVisible(false); + top.Ext.getCmp("tousseName").getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tempBarcode').setVisible(false); + top.Ext.getCmp('tempBarcode').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); + } top.Ext.getCmp('addRoutineMonitoringForm').remove('itemsFieldSet'); if(items.length > 0){