@Override
  public boolean isCellEditable(EventObject anEvent) {
    NHzInfo hzInfo = StorageModule.getInstance().getHzInfo();
    NJtInfo jtInfo = new NJtInfo();
    jtInfo.ID = hzInfo.REFERENCE_NJt;
    jtInfo.JTMC = hzInfo.REFERENCE_NJt_desc;

    List<Condition> filterList = new ArrayList<Condition>();
    Condition condition = new Condition();
    condition.fieldName = ReferenceConstants.JT_REFERENCE_NAME;
    condition.fieldDesc = "集团";
    condition.operator = Operator.equal.id;
    condition.value.data = jtInfo;
    filterList.add(condition);

    NHzmsInfo hzmsInfo = StorageModule.getInstance().getHzmsInfo();
    if (NHzmsEnum.ENUM_KCMS.ZCZYLKC.key == hzmsInfo.ENUM_KCMS) {
      condition = new Condition();
      condition.fieldName = "ENUM_ZHSP";
      condition.fieldDesc = "组合商品";
      condition.operator = Operator.equal.id;
      condition.value.data = KasaEnumFactory.getEnum(NSpEnum.ENUM_ZHSP.YL);
      filterList.add(condition);
    }

    ((JDataTableSelect) this.getEditorComponent()).setFilterConditon(filterList);

    return true;
  }
예제 #2
0
    @Override
    public boolean verify(Object source) {
      if (kqfwSelect == source) {
        NSzInfo szInfo = (NSzInfo) szfwSelect.getObject();
        if (null == szInfo) {
          StorageModule.showMessageDialog(ZxyjbzPane.this, "请先选择所站!");
          return false;
        }
      } else if (cwfwSelect == source) {
        NSzInfo szInfo = (NSzInfo) szfwSelect.getObject();

        List<Condition> filterList = new ArrayList<Condition>();

        Condition condition = new Condition();
        condition.fieldName = "REFERENCE_NSz";
        condition.fieldDesc = "所站";
        condition.operator = Operator.equal.id;
        condition.value.data = szInfo;
        condition.isDefault = true;
        filterList.add(condition);

        NKqInfo kqInfo = (NKqInfo) kqfwSelect.getObject();
        if (null != kqInfo) {
          condition = new Condition();
          condition.fieldName = "REFERENCE_NKq";
          condition.fieldDesc = "库区";
          condition.operator = Operator.equal.id;
          condition.value.data = kqInfo;
          condition.isDefault = true;
          filterList.add(condition);
        }

        cwfwSelect.setFilterConditon(filterList);
      } else if (spSelect == source) {
        NHzInfo hzInfo = (NHzInfo) hzSelect.getObject();
        if (null == hzInfo) {
          StorageModule.showMessageDialog(ZxyjbzPane.this, "请先选择货主!");
          return false;
        } else {
          NJtInfo jtInfo = new NJtInfo();
          jtInfo.ID = hzInfo.REFERENCE_NJt;
          jtInfo.JTMC = hzInfo.REFERENCE_NJt_desc;

          List<Condition> filterList = new ArrayList<Condition>();

          Condition condition = new Condition();
          condition.fieldName = "REFERENCE_NJt";
          condition.fieldDesc = "集团";
          condition.operator = Operator.equal.id;
          condition.value.data = jtInfo;
          condition.isDefault = true;
          filterList.add(condition);

          spSelect.setFilterConditon(filterList);
        }
      }
      return true;
    }