combox值作为筛选条件

来源:互联网 发布:淘宝添加客服的代码 编辑:程序博客网 时间:2024/05/02 00:14

combox值作为筛选条件

   var mat_Type1=new Ext.form.ComboBox({ 
    fieldLabel: '客户类型', 
    store : custTypeStore, 
    displayField : 'name', 
    valueField : 'name', 
    typeAhead : true, 
    readOnly:true, 
    mode : 'local', 
    allowBlank : false, 
    hiddenName : 'mat_Type', 
    blankText:"客户类型", 
    triggerAction : 'all', 
    emptyText : "-未选择-", 
    selectOnFocus : true, 
    anchor:'90%' 
  });
    mat_Type1.on('select',function(comboBox){ 
      var codition = []; 
          codition.push({ 
          field : ('MAT_TYPE'), 
                    relation : '=', 
                    value :comboBox.getValue(), 
                    type:'and', 
                    javaClass : 'net.uni.util.Condition' 
          }); 
          mateiralGrid.updateCondition(codition); 
   });