Index: ssts-web/src/main/webapp/disinfectsystem/config/zsszyy/config.js =================================================================== diff -u -r15250 -r15946 --- ssts-web/src/main/webapp/disinfectsystem/config/zsszyy/config.js (.../config.js) (revision 15250) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsszyy/config.js (.../config.js) (revision 15946) @@ -77,5 +77,7 @@ // {text:'敷料包和一次性物品',value:[2,4]}, // {text:'敷料包、消毒物品、一次性物品',value:[2,3,4]} ] - } + }, +//质量监测记录是否责任环节带出监测项 + responsibilityPartBringInspectItem : true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js =================================================================== diff -u -r15854 -r15946 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js (.../qualitymonitoringForm.js) (revision 15854) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringForm.js (.../qualitymonitoringForm.js) (revision 15946) @@ -315,6 +315,9 @@ if(configName == '无'){ top.Ext.getCmp('optionAmount').setValue(''); top.Ext.getCmp('addQualityMonitoringForm').remove('itemsFieldSet'); + if(!sstsConfig.hasOwnProperty('responsibilityPartBringInspectItem') || !sstsConfig.responsibilityPartBringInspectItem){ + top.Ext.getCmp('responsibilityPart').setValue(''); + } return ; } Ext.Ajax.request({ @@ -339,6 +342,7 @@ top.Ext.getCmp('containerName').setVisible(false); top.Ext.getCmp('containerName').getEl().up('.x-form-item').setDisplayed(false); } + top.Ext.getCmp('responsibilityPart').setValue(result.data.responsibilityPart); var items = new Array(); // 如果显示炉次炉号,添加表单 if(result.data.showSterNameAndFre == '是'){ @@ -780,6 +784,89 @@ inspectItemStore.baseParams.responPartName = responPartName; inspectItemStore.load(); } +// 责任环节带出监测项的配置 +function getResponsibilityPartContent(){ + return { + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'combo', + fieldLabel : "责任环节", + valueField : 'value', + displayField : 'value', + store : new top.Ext.data.SimpleStore({ + fields : [ 'value' ], + data : [[moduleNameArr[0]],[moduleNameArr[1]],[moduleNameArr[2]],[moduleNameArr[3]],[moduleNameArr[4]],[moduleNameArr[5]]] + }), + value : moduleNameArr[0], + triggerAction : 'all', + editable : false, + forceSelection : false, + mode : 'local', + name : "responsibilityPart", + id : "responsibilityPart", + listeners : { + select : function(combo,record,index){ + responPartName = combo.getValue(); + inspectItemStore.baseParams.responPartName = responPartName; + inspectItemStore.load(); + } + }, + anchor : '95%' + }] + }; +} +// 监测项带出责任环节的配置 +function getResponsibilityPartContent1(){ + return { + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'combo', + fieldLabel : "责任环节", + triggerAction : 'all', + editable : false, + forceSelection : false, + name : "responsibilityPart", + id : "responsibilityPart", + anchor : '95%' + }] + }; +} +function getInspectItemContent(){ + return { + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'combo', + fieldLabel : "监测项", + valueField : 'inspectItem', + displayField : 'inspectItem', + store : inspectItemStore, + triggerAction : 'all', + editable : false, + forceSelection : false, + name : "inspectItem", + id : "inspectItem", + listeners : { + beforeselect : function(combo, record, index) { + if(record.data.inspectItem != combo.getValue()){ + if(top.Ext.getCmp('barcode').getValue()){ + getTousseInstanceNameAndResponsiblePerson(top.Ext.getCmp('barcode').getValue(), record.data.inspectItem, null); + } + } + }, + select : function(combo,record,index){ + addQualityMonitoringItem(combo.getValue()); + } + }, + anchor : '95%' + }] + }; +} function addQualityMonitoring(id) { if(id==null||id=='undentified'){ id=""; @@ -860,6 +947,17 @@ if(id==undefined || id == null || id == "undefined" || id < 0){ disableShowImageButton = true; } + var varibaleContent1; + var varibaleContent2; + // 责任环节带出监测项 + if(sstsConfig.hasOwnProperty('responsibilityPartBringInspectItem') && sstsConfig.responsibilityPartBringInspectItem){ + varibaleContent1 = getResponsibilityPartContent(); + varibaleContent2 = getInspectItemContent(); + }else{ + varibaleContent1 = getInspectItemContent(); + varibaleContent2 = getResponsibilityPartContent1(); + } + formPanel = new top.Ext.FormPanel({ id : 'addQualityMonitoringForm', frame : true, @@ -933,77 +1031,14 @@ xtype:'hidden', name:'isAllTousseOfSterile', id:'isAllTousseOfSterile' - },{ + }, + varibaleContent1, + varibaleContent2, + { layout : 'form', columnWidth : .5, labelWidth : 90, items : [{ - xtype : 'combo', - fieldLabel : "责任环节", - valueField : 'value', - displayField : 'value', - store : new top.Ext.data.SimpleStore({ - fields : [ 'value' ], - data : [[moduleNameArr[0]],[moduleNameArr[1]],[moduleNameArr[2]],[moduleNameArr[3]],[moduleNameArr[4]],[moduleNameArr[5]]] -// listeners:{ -// load:function(store,records) { -// if(records.length>0) { -// inspectItemStore.baseParams.responPartName = records[0].data.value; -// inspectItemStore.load(); -// } -// } -// } - }), - value : moduleNameArr[0], - triggerAction : 'all', - editable : false, - forceSelection : false, - mode : 'local', - name : "responsibilityPart", - id : "responsibilityPart", - listeners : { - select : function(combo,record,index){ - responPartName = combo.getValue(); - inspectItemStore.baseParams.responPartName = responPartName; - inspectItemStore.load(); - } - }, - anchor : '95%' - }] - },{ - layout : 'form', - columnWidth : .5, - labelWidth : 90, - items : [{ - xtype : 'combo', - fieldLabel : "监测项", - valueField : 'inspectItem', - displayField : 'inspectItem', - store : inspectItemStore, - triggerAction : 'all', - editable : false, - forceSelection : false, - name : "inspectItem", - id : "inspectItem", - listeners : { - beforeselect : function(combo, record, index) { - if(record.data.inspectItem != combo.getValue()){ - if(top.Ext.getCmp('barcode').getValue()){ - getTousseInstanceNameAndResponsiblePerson(top.Ext.getCmp('barcode').getValue(), record.data.inspectItem, null); - } - } - }, - select : function(combo,record,index){ - addQualityMonitoringItem(combo.getValue()); - } - }, - anchor : '95%' - }] - },{ - layout : 'form', - columnWidth : .5, - labelWidth : 90, - items : [{ xtype : 'datefieldWithMin', fieldLabel : '抽检时间', id : 'dateTime',