public XfkglMainPane(boolean ksdz) {
    super(
        TableNameConstants.XYXFGL,
        Constants.PROPERTY_FILE_BASE_PATH + "fms/ksdz/xyfy/xfkgl/NXyxfgl_filter.properties",
        Constants.PROPERTY_FILE_BASE_PATH + "fms/ksdz/xyfy/xfkgl/NXyxfgl_table.properties",
        null,
        null,
        null);
    this.ksdz = ksdz;

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

    Condition condition = new Condition();
    condition.fieldName = "DJRQ";
    condition.fieldDesc = "登记日期";
    condition.operator = Operator.equal.id;
    condition.value.data = new Date();
    condition.isDefault = false;
    filterList.add(condition);

    this.appendFilterConditon(filterList);

    //        List<OrCondition> orFilterList = new ArrayList<OrCondition>();
    //
    //        OrCondition orConditon = new OrCondition();
    //        orConditon.fieldName1 = "ENUM_DZFS";
    //        orConditon.fieldDesc1 = "对账方式";
    //        orConditon.operator1 = Operator.equal.id;
    //        orConditon.value1.data = null;//NULL;
    //
    //        orConditon.fieldName2 = "ENUM_DZFS";
    //        orConditon.fieldDesc2 = "对账方式";
    //        orConditon.operator2 = Operator.equal.id;
    //        orConditon.value2.data = KasaEnumFactory.getEnumByName(TableNameConstants.XYXFGL,
    // "ENUM_DZFS", "KSDZ");//NXyxfglEnum.ENUM_DZFS.KSDZ;
    //        orFilterList.add(orConditon);
    //
    //        this.appendOrCondition(orFilterList);

    List<FieldOrder> fieldOrderList = new ArrayList<FieldOrder>();

    FieldOrder fieldOrder = new FieldOrder();
    fieldOrder.fieldName = "DJRQ";
    fieldOrder.direction = FieldOrder.DESC;

    fieldOrderList.add(fieldOrder);

    this.setFieldOrderList(fieldOrderList);

    ADD_CMDCODE = StorageCmdCode.XFK_DJ;
    DELETE_CMDCODE = StorageCmdCode.XFK_DEL;
  }
  public SsfcxMainPane(boolean wlfs_xj) {
    super(
        TableNameConstants.XJSSSF,
        Constants.PROPERTY_FILE_BASE_PATH + "fms/xjgl/ssfcx/NXjsssf_filter.properties",
        Constants.PROPERTY_FILE_BASE_PATH + "fms/xjgl/ssfcx/NXjsssf_table.properties",
        null,
        null,
        null);
    this.wlfs_xj = wlfs_xj;

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

    Condition condition = new Condition();
    condition.fieldName = "CLRQ";
    condition.fieldDesc = "处理日期";
    condition.operator = Operator.equal.id;
    condition.value.data = new Date();
    condition.isDefault = false;
    filterList.add(condition);

    if (true == this.wlfs_xj) {
      condition = new Condition();
      condition.fieldName = "ENUM_WLFS";
      condition.fieldDesc = "往来方式";
      condition.operator = Operator.equal.id;
      condition.value.data =
          KasaEnumFactory.getEnumByName(
              TableNameConstants.XJSSSF, "ENUM_WLFS", "XJ"); // NXjsssfEnum.ENUM_WLFS.XJ;
      condition.isDefault = true;
      filterList.add(condition);
    }

    this.appendFilterConditon(filterList);

    this.getManagePane().setPageControlButtonsVisible(false);
    this.getManagePane().setPageComboBoxVisible(false);

    List<FieldOrder> fieldOrderList = new ArrayList<FieldOrder>();

    FieldOrder fieldOrder = new FieldOrder();
    fieldOrder.fieldName = "CLRQ";
    fieldOrder.direction = FieldOrder.ASC;

    fieldOrderList.add(fieldOrder);

    fieldOrder = new FieldOrder();
    fieldOrder.fieldName = "CLSJ";
    fieldOrder.direction = FieldOrder.ASC;

    fieldOrderList.add(fieldOrder);

    this.setFieldOrderList(fieldOrderList);

    tablePane.setQueryType(true);
    QUERY_CMDCODE = StorageCmdCode.SSFCX;
  }
  public YskhfyMainPane() {
    super(
        TableNameConstants.YSKH,
        Constants.PROPERTY_FILE_BASE_PATH + "fms/ksdz/xyfy/yskhfy/NYskh_filter.properties",
        Constants.PROPERTY_FILE_BASE_PATH + "fms/ksdz/xyfy/yskhfy/NYskh_table.properties",
        null,
        null,
        null);

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

    Condition condition = new Condition();
    condition.fieldName = "KHRQ";
    condition.fieldDesc = "考核日期";
    condition.operator = Operator.equal.id;
    condition.value.data = new Date(System.currentTimeMillis());
    condition.isDefault = false;
    filterList.add(condition);

    this.appendFilterConditon(filterList);

    List<OrCondition> orFilterList = new ArrayList<OrCondition>();

    OrCondition orConditon = new OrCondition();
    orConditon.fieldName1 = "ENUM_DZFS";
    orConditon.fieldDesc1 = "对账方式";
    orConditon.operator1 = Operator.equal.id;
    orConditon.value1.data = null; // NULL;

    orConditon.fieldName2 = "ENUM_DZFS";
    orConditon.fieldDesc2 = "对账方式";
    orConditon.operator2 = Operator.equal.id;
    orConditon.value2.data =
        KasaEnumFactory.getEnumByName(
            TableNameConstants.YSKH, "ENUM_DZFS", "KSDZ"); // NYskhEnum.ENUM_DZFS.KSDZ;
    orFilterList.add(orConditon);

    this.appendOrCondition(orFilterList);

    List<FieldOrder> fieldOrderList = new ArrayList<FieldOrder>();

    FieldOrder fieldOrder = new FieldOrder();
    fieldOrder.fieldName = "KHRQ";
    fieldOrder.direction = FieldOrder.DESC;

    fieldOrderList.add(fieldOrder);

    this.setFieldOrderList(fieldOrderList);
  }
  @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;
  }
Exemplo n.º 5
0
  public void selectEvent() {
    NJtInfo jt = businessDialog.getJt();

    if (null == jt) {
      StorageModule.showMessageDialog(this, "请先选择货主!");
      return;
    }

    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 = jt;
    filterList.add(condition);

    this.setFilterConditon(filterList);

    super.selectEvent();
  }
Exemplo n.º 6
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;
    }
  public ZtdqrMainPane() {
    super(TableNameConstants.YSD);

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

    Condition condition = new Condition();
    condition = new Condition();
    condition.fieldName = "ENUM_YSFS";
    condition.fieldDesc = "运输方式";
    condition.operator = Operator.equal.id;
    condition.value.data = KasaEnumFactory.getEnum(NYsdEnum.ENUM_YSFS.ZT);
    filterList.add(condition);

    condition = new Condition();
    condition = new Condition();
    condition.fieldName = "ENUM_DJZT";
    condition.fieldDesc = "单据状态";
    condition.operator = Operator.noequal.id;
    condition.value.data = KasaEnumFactory.getEnum(NYsdEnum.ENUM_DJZT.ZF);
    filterList.add(condition);

    condition = new Condition();
    condition = new Condition();
    condition.fieldName = "YSRQ";
    condition.fieldDesc = "运输日期";
    condition.operator = Operator.equal.id;
    condition.value.data = new Date();
    condition.isDefault = false;
    filterList.add(condition);

    this.appendFilterConditon(filterList);

    List<FieldOrder> fieldOrderList = new ArrayList<FieldOrder>();

    FieldOrder fieldOrder = new FieldOrder();
    fieldOrder.fieldName = "YSRQ";
    fieldOrder.direction = FieldOrder.DESC;

    fieldOrderList.add(fieldOrder);

    this.setFieldOrderList(fieldOrderList);
  }