Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r40302 -r40578 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 40302) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 40578) @@ -2737,11 +2737,24 @@ */ function createSearchTbar() { //1、状态筛选(width=165) - if (sstsConfig.quickQueryForApply && sstsConfig.quickQueryForApply.items.length > 0) { - var quickQuerySearchTbarArr = []; - quickQuerySearchTbarArr.push({text: '状态筛选:'}); - quickQuerySearchTbarArr.push(createQuickQueryCombo()); - addSearchTbar(quickQuerySearchTbarArr, 165); + var quickQueryForApply = sstsConfig.quickQueryForApply || []; + if (quickQueryForApply && quickQueryForApply.length > 0) { + var recordItems = {}; + for(var i=0;i 0){ + var quickQuerySearchTbarArr = []; + quickQuerySearchTbarArr.push({text: '状态筛选:'}); + quickQuerySearchTbarArr.push(createQuickQueryCombo(recordItems)); + addSearchTbar(quickQuerySearchTbarArr, 165); + if(recordItems.defaultValue && recordItems.defaultValue !== ''){ + document.getElementById('parm_s_status').value = recordItems.defaultValue; + } + } } //2、按时间过滤(width=415) @@ -3257,12 +3270,12 @@ * 创建状态筛选的combo. * @returns */ -function createQuickQueryCombo() { +function createQuickQueryCombo(recordItems) { return { xtype: 'multiSelect', store: new Ext.data.SimpleStore({ fields: ['value'], - data: sstsConfig.quickQueryForApply.items + data: recordItems.items }), width: 100, listWidth: 100, @@ -3274,7 +3287,7 @@ name: 'quickQueryCombo', forceSelection: false, readOnly: true, - value: sstsConfig.quickQueryForApply.defaultValue, + value: recordItems.defaultValue, listeners : { select: function (combo, record, index) { //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 @@ -3617,6 +3630,7 @@ listWidth: 200, forceSelection : true, queryParam : 'spell', + // queryDelay:500, value: '', minChars : 0, listeners: { Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp =================================================================== diff -u -r40442 -r40578 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 40442) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 40578) @@ -240,17 +240,11 @@ var version = 1; //设置状态筛选的默认值 var quickQueryDefaultValue = ALL; -var quickQueryForApply = sstsConfig.quickQueryForApply; var joinSql = ""; if(sstsConfig.enableUrgentFunction){ joinSql = " left join fetch po.urgentLevel "; } document.getElementById('parm_s_joinSql').value = joinSql; -if (quickQueryForApply && quickQueryForApply.defaultValue) { - quickQueryDefaultValue = quickQueryForApply.defaultValue; -} -var parm_s_status = document.getElementById('parm_s_status'); -parm_s_status.value = quickQueryDefaultValue; //设置查询时间的默认值 document.getElementById('parm_s_timeSearchFmt').value = sstsConfig.timeSearchFmt ? sstsConfig.timeSearchFmt : 'Y-m-d'; Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp =================================================================== diff -u -r40568 -r40578 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 40568) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 40578) @@ -275,6 +275,7 @@ + Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r40567 -r40578 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 40567) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 40578) @@ -949,6 +949,74 @@ } var tbarItems = []; + //GDSFYBJY-20:新增查询状态 + var quickQueryForApply = sstsConfig.quickQueryForApply || []; + if (quickQueryForApply && quickQueryForApply.length > 0) { + var recordItems = {}; + for(var i=0;i 0){ + tbarItems.push({text: '状态筛选:'}); + tbarItems.push({ + xtype: 'multiSelect', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: recordItems.items + }), + width: 100, + listWidth: 100, + mode: 'local', + triggerAction: 'all', + valueField: 'value', + displayField: 'value', + id: 'quickQueryCombo', + name: 'quickQueryCombo', + forceSelection: false, + readOnly: true, + value: recordItems.defaultValue, + listeners : { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('value') == '全部') { + if (record.get(this.checkField)) { + combo.selectAll() + } else { + combo.deselectAll() + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('value') != '全部' && !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()); + + document.getElementById('parm_s_queryStatus').value = Ext.getCmp('quickQueryCombo').getValue(); + grid.dwrReload(); + } + } + }); + if(recordItems.defaultValue && recordItems.defaultValue !== ''){ + document.getElementById('parm_s_queryStatus').value = recordItems.defaultValue; + } + } + } + var expandQueryFieldsConfigOfForeignTousseApplication = sstsConfig.expandQueryFieldsConfigOfForeignTousseApplication || []; if(expandQueryFieldsConfigOfForeignTousseApplication.length > 0){ @@ -1136,7 +1204,7 @@ frame: false, listeners: { render: function (thisGrid) { - if (expandQueryFieldsConfigOfForeignTousseApplication.length > 0) { + if (tbarItems.length > 0) { requestTbar.render(thisGrid.tbar); } }