Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r21858 -r22079 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 21858) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 22079) @@ -1998,6 +1998,8 @@ tbar2.push({text: '按器械包分组:'}); tbar2.push(searchComboConfig.tousseGroupCombo); } + tbar2.push({text: '按器械包类型:'}); + tbar2.push(searchComboConfig.tousseTypeCombo); if (sstsConfig.accordingToApplyTypeFilter){ tbar2.push({text: '按申请单类型:'}); tbar2.push(searchComboConfig.applyTypeCombo); @@ -2231,6 +2233,62 @@ } /** + * 创建按器械包类型下拉选项 + * @returns + */ +function createTousseTypeCombo() { + var touseTypeStoreConfig = { + url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getAllTousseType.do', + model : [{name: 'tousseType', mapping: 'tousseType'}] + } + return createCombo({ + xtype : 'multiSelect', + fieldLabel : '按器械包类型', + valueField : 'tousseType', + displayField : 'tousseType', + storeConfig : touseTypeStoreConfig, + triggerAction : 'all', + id : 'tousseType', + name : 'tousseType', + allowBlank : false, + //这个要设置成false,不然多选鼠标离开之后,combo上面的值不会显示 + forceSelection : false, + readOnly:true, + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('tousseType') == ALL) { + if (record.get('checked')) { + combo.selectAll() + } else { + combo.deselectAll() + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('tousseType') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue()); + + reloadConditionPara(combo.getValue(), 'parm_s_tousseTypes'); + } + } + }); +} + +/** * 创建按申请单类型的下拉选项 * @returns */ @@ -2641,6 +2699,7 @@ quickScreenCombo : quickScreenCombo, departmentGroupCombo : createDeptGroupCombo(), tousseGroupCombo : createTousseGroupCombo(), + tousseTypeCombo : createTousseTypeCombo(), applyTypeCombo : createApplyTypeCombo(), printCombo : createPrintCombo() });