コード例 #1
0
  public static TableModel convertToTableModel(List entrustorLst) {
    // TODO Auto-generated method stub

    MyTableModel tableModel = null;

    Vector names = new Vector();

    Vector values = new Vector();

    names.add(LangTransMeta.translate(SfEntrustor.NAME));
    names.add(LangTransMeta.translate(SfEntrustor.LINK_MAN));
    names.add(LangTransMeta.translate(SfEntrustor.LINK_TEL));
    names.add(LangTransMeta.translate(SfEntrustor.ADDRESS));
    if (entrustorLst != null && entrustorLst.size() > 0) {

      for (int i = 0; i < entrustorLst.size(); i++) {

        Vector rowData = new Vector();

        SfEntrustor entrustor = (SfEntrustor) entrustorLst.get(i);

        rowData.add(entrustor.getName());
        rowData.add(entrustor.getLinkMan());
        rowData.add(entrustor.getLinkTel());
        rowData.add(entrustor.getAddress());
        values.add(rowData);
      }
    }

    tableModel =
        new MyTableModel(values, names) {

          public Class getColumnClass(int column) {

            if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {

              for (int row = 0; row < this.getRowCount(); row++) {

                if (getValueAt(row, column) != null) {

                  return getValueAt(row, column).getClass();
                }
              }
            }

            return Object.class;
          }

          public boolean isCellEditable(int row, int colum) {

            return false;
          }
        };

    tableModel.setList(entrustorLst);

    return tableModel;
  }
コード例 #2
0
 static {
   validateDetailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoReq.COL_OUT_INFO_REQ_NAME,
           "infoReq.outInfoReqName",
           LangTransMeta.translate(SfOutInfoReq.COL_OUT_INFO_REQ_NAME)));
   validateDetailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoValidateDetail.COL_VALIDATE_RESULT,
           "validateResult",
           LangTransMeta.translate(SfOutInfoValidateDetail.COL_VALIDATE_RESULT)));
   validateDetailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoValidateDetail.COL_REMARK,
           "remark",
           LangTransMeta.translate(SfOutInfoValidateDetail.COL_REMARK)));
 }
コード例 #3
0
 static {
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoType.COL_OUT_INFO_TYPE_NAME,
           "infoType.outInfoTypeName",
           LangTransMeta.translate(SfOutInfoType.COL_OUT_INFO_TYPE_NAME)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_TI_QU_FANG_SHI,
           "tiQuFangShi",
           LangTransMeta.translate(SfOutInfoDetail.COL_TI_QU_FANG_SHI)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_NAME, "name", LangTransMeta.translate(SfOutInfoDetail.COL_NAME)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_QUANTITY,
           "quantity",
           LangTransMeta.translate(SfOutInfoDetail.COL_QUANTITY)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_UNIT, "unit", LangTransMeta.translate(SfOutInfoDetail.COL_UNIT)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_PRODUCT_TIME,
           "productTime",
           LangTransMeta.translate(SfOutInfoDetail.COL_PRODUCT_TIME)));
   detailInfo.add(
       new ColumnBeanPropertyPair(
           SfOutInfoDetail.COL_DESCRIPTION,
           "description",
           LangTransMeta.translate(SfOutInfoDetail.COL_DESCRIPTION)));
 }
コード例 #4
0
  public static TableModel convertMainLst(List mainLst) {
    // TODO Auto-generated method stub

    MyTableModel tableModel = null;
    Vector names = new Vector();
    Vector values = new Vector();

    names.add(LangTransMeta.translate(SfOutInfo.COL_ENTRUST_CODE));
    names.add(LangTransMeta.translate(SfOutInfo.COL_NAME));
    names.add(LangTransMeta.translate(SfOutInfo.COL_TGF));
    names.add(LangTransMeta.translate(SfOutInfo.COL_TGF_PHONE));
    names.add(LangTransMeta.translate(SfOutInfo.COL_ACCEPT_DATE));
    names.add(LangTransMeta.translate(SfOutInfo.COL_STATUS));
    if (mainLst != null && mainLst.size() > 0) {

      SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
      for (int i = 0; i < mainLst.size(); i++) {
        Vector rowData = new Vector();
        SfOutInfo outInfo = (SfOutInfo) mainLst.get(i);
        rowData.add(outInfo.getEntrustCode());
        rowData.add(outInfo.getName());
        rowData.add(outInfo.getTgf());
        rowData.add(outInfo.getTgfPhone());
        rowData.add(outInfo.getAcceptDate() == null ? null : df.format(outInfo.getAcceptDate()));
        rowData.add(AsValDataCache.getName(SfOutInfo.SF_VS_OUT_INFO_STATUS, outInfo.getStatus()));
        values.add(rowData);
      }
    }

    tableModel =
        new MyTableModel(values, names) {
          public Class getColumnClass(int column) {
            if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {
              for (int row = 0; row < this.getRowCount(); row++) {
                if (getValueAt(row, column) != null) {
                  return getValueAt(row, column).getClass();
                }
              }
            }
            return Object.class;
          }

          public boolean isCellEditable(int row, int colum) {
            return false;
          }
        };
    tableModel.setList(mainLst);
    return tableModel;
  }
コード例 #5
0
    private DataDisplay(
        List<TableDisplay> displays,
        List<TableDisplay> showingDisplays,
        AbstractSearchConditionArea conditionArea,
        boolean showConditionArea) {

      super(
          displays,
          showingDisplays,
          conditionArea,
          showConditionArea,
          ZcSettingConstants.TAB_ID_ZC_EB_EVAL_REPORT);

      setBorder(
          BorderFactory.createTitledBorder(
              BorderFactory.createEtchedBorder(),
              LangTransMeta.translate(getCompoId()),
              TitledBorder.CENTER,
              TitledBorder.TOP,
              new Font("宋体", Font.BOLD, 15),
              Color.BLUE));
    }
コード例 #6
0
package com.ufgov.zc.client.common.converter;
コード例 #7
0
 static {
   LangTransMeta.init("ZC%");
 }
コード例 #8
0
  public String getTitle() {

    return LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_MAKE_TITEL);
  }
コード例 #9
0
  @Override
  public List<AbstractFieldEditor> createFieldEditors() {
    if (fieldEditors != null && fieldEditors.size() > 0) {
      return fieldEditors;
    }

    List<AbstractFieldEditor> editorList = new ArrayList<AbstractFieldEditor>();

    AutoNumFieldEditor zcMakeCode =
        new AutoNumFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_CODE), "zcMakeCode");
    TextFieldEditor zcMakeName =
        new TextFilePathFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_NAME), "zcMakeName");
    AsValFieldEditor zcMakeStatus =
        new AsValFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_STATUS),
            "zcMakeStatus",
            "ZC_VS_MAKE_STATUS");
    IForeignEntityTreeHandler companyHandler =
        new IForeignEntityTreeHandler() {

          @Override
          public void excute(List selectedDatas) {

            ZcPProMake zcPProMake = (ZcPProMake) listCursor.getCurrentObject();

            if (selectedDatas != null && selectedDatas.size() > 0) {

              Company company = (Company) selectedDatas.get(0);

              zcPProMake.setOrgCode(company.getForgCode());

              setEditingObject(zcPProMake);
            }
          }

          @Override
          public boolean isMultipleSelect() {

            return false;
          }

          @Override
          public boolean isSelectLeaf() {

            return false;
          }
        };

    CompanyFieldEditor zcCoCode =
        new CompanyFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_CO_NAME),
            "coCode",
            companyHandler,
            getCompoId(),
            "CO_CODE");

    zcCoCode.setEnabled(false);

    TextFieldEditor zcCoCodeNd =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_CO_CODE_ND), "nd");

    zcCoCodeNd.setEnabled(false);

    OrgFieldEditor zcZgCsCode =
        new OrgFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_ZG_CS_CODE), "orgCode", false);

    TextFieldEditor zcMakeLinkman =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_LINKMAN), "zcMakeLinkman");

    TextFieldEditor zcMakeTel =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_TEL), "zcMakeTel");

    TextFieldEditor zcAttr2 =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_ATTR2), "zcAttr2");

    zcMoneyBiSum =
        new MoneyFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_MONEY_BI_SUM), "zcMoneyBiSum");

    zcMoneyBiSum.setEnabled(false);

    // 委托机构名称,从后面提到前面进行声明

    String columNames[] = {"代理机构代码", "代理机构名称"};

    ZcAgeyFnHandler handler = new ZcAgeyFnHandler(columNames);

    ElementConditionDto elementCondtiontDto = new ElementConditionDto();

    elementCondtiontDto.setBillStatus("1");

    zcAgeyCode =
        new ForeignEntityFieldEditor(
            "ZC_B_AGENCY.getZcBAgencyWithFN",
            elementCondtiontDto,
            20,
            handler,
            columNames,
            LangTransMeta.translate(FIELD_TRANS_ZC_TRUST_AGEY_CODE),
            "zcAgeyCode") {

          public static final long serialVersionUID = -7737549222488261602L;

          @Override
          public void setValue(Object value) {

            //        ZcPProMake make = ((ZcPProMake) value);

            //        Updated By FengYan 2011-08-04

            ZcPProMake make = (ZcPProMake) listCursor.getCurrentObject();

            //        if (make.getZcMakeCode() != null) {

            //          make =
            // getZcPProMakeServiceDelegate().selectByPrimaryKey(make.getZcMakeCode(), requestMeta);

            //        }

            if (make.getAgency() == null) {

              field.setText(null);

              field.setToolTipText(null);

            } else {

              field.setText(make.getAgencyName());

              field.setToolTipText("[" + make.getAgency() + "]" + make.getAgencyName());
            }
          }

          @Override
          public Object getValue() {

            return this.field.getText();
          }
        };

    // 申请采购组织形式 (1集中采购,2部门集中采购,3分散采购)

    zcMakeSequence =
        new AsValFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_MAKE_SEQUENCE),
            "zcMakePfSequence",
            "VS_ZC_ORGTYPE") {

          public void setValue(Object value) {
            super.setValue(value);
          }

          int i = 0; // add by wangkewei,用于判断是不是第一次调用afterChange

          protected void afterChange(AsValComboBox field) {
            if (field.getSelectedAsVal() == null) {
              return;
            }

            ZcPProMake beanData = (ZcPProMake) listCursor.getCurrentObject();

            if (beanData.getProcessInstId() == null || beanData.getZcMakeStatus().equals("0")) {

              String valId = field.getSelectedAsVal().getValId();

              // 采购组织形式和采购方式的联动

              if (valId.equals("1")) { // 采购组织形式和委托机构名称联动 :政府集中采购必须为采购中心,不可修改,不可改变

                haveInitFlag = false;

                beanData.setAgencyName(AsOptionMeta.getOptVal("OPT_ZC_CGZX_NAME"));

                beanData.setAgency(AsOptionMeta.getOptVal("OPT_ZC_CGZX_CODE"));

                //          zcAgeyCode.setEditable(false);

                zcAgeyCode.setEnabled(false); // wangkewei

                zcPitemOpiway.setEnabled(true);

                setEditingObject(beanData);

                haveInitFlag = true;

                valSetId = "1";

                fukuanValId = "1";

                i++;

              } else if (valId.equals("2")) {

                haveInitFlag = false;

                // 判断是采购组织形式选项是否有变化,有变化则清空委托机构名称

                if (!valId.equals(valSetId) && i > 0) { // 如果不是第一次调用,将委托机构名称设置为空,如果是第一次调用,界面上显示数据库的值

                  if (!fukuanValId.equals(valId) && beanData.getZcMakeStatus().equals("0")) {

                    beanData.setAgencyName("");

                    beanData.setAgency("");
                  }
                }

                valSetId = "2";

                fukuanValId = "2";

                // beanData.setZcPifuCgfs(null);

                // beanData.setZcPitemOpiway(null);

                // zcPifuCgfs.setEnabled(false);

                zcPitemOpiway.setEnabled(true);

                zcAgeyCode.setEnabled(true);

                zcAgeyCode.setEditable(false); // guoss

                setEditingObject(beanData);

                haveInitFlag = true;

                i++;

              } else if (valId.equals("3")) { // 采购组织形式和申请采购方式的联动

                haveInitFlag = false;

                // 临时取消选择分散采购时的控件内容及可用联动   Update By FengYan 2011-06-14

                //          beanData.setZcPitemOpiway("6");

                //              beanData.setZcPifuCgfs("6");

                // 判断是采购组织形式选项是否有变化,有变化则清空委托机构名称

                if (!valId.equals(valSetId) && i > 0) {

                  if (!fukuanValId.equals(valId) && beanData.getZcMakeStatus().equals("0")) {

                    beanData.setAgencyName("");

                    beanData.setAgency("");
                  }

                  valSetId = "3";

                  fukuanValId = "3";
                }

                // 临时取消选择分散采购时的控件内容及可用联动   Update By FengYan 2011-06-14

                // zcPifuCgfs.setEnabled(false);

                // zcPitemOpiway.setEnabled(false);

                valSetId = "3";

                fukuanValId = "3";

                zcAgeyCode.setEnabled(true);

                zcAgeyCode.setEditable(false); // guoss

                setEditingObject(beanData);

                haveInitFlag = true;

                i++;
              }

              if ("N".equals(beanData.getZcIsImp())) {

                zcImpFile.setEnabled(false);
              }
            }
          }
        };
    zcMakeSequence
        .getField()
        .addItemListener(
            new ItemListener() {

              public void itemStateChanged(ItemEvent event) {

                if (event.getStateChange() == ItemEvent.SELECTED && haveInitFlag) {

                  haveInitFlag = false;

                  String valId =
                      ((AsValComboBox) zcMakeSequence.getField()).getSelectedAsVal().getValId();

                  ZcPProMake data = (ZcPProMake) listCursor.getCurrentObject();

                  data.setZcMakeSequence(valId);

                  data.setZcMakePfSequence(valId);

                  zcMakePfSequence.setEnabled(false);

                  haveInitFlag = true;

                  setEditingObject(data);
                }
              }
            });

    TextFieldEditor zcAgeyName =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_TRUST_AGEY_NAME), "agencyName");

    zcAgeyName.setVisible(false);

    zcAgeyName.setEnabled(false);

    //    AsValFieldEditor zcIsBudget = new AsValFieldEditor("是否公开预算", "zcIsBudget", "VS_Y/N");
    //
    //    zcIsBudget.setVisible(false); // wangkewei 编辑页面隐藏【是否公开预算】按钮
    //
    //    editorList.add(zcIsBudget);

    // 拟定采购方式  (1公开招标,2邀请招标,3竞争性谈判,4单一来源采购,5询价,6其他)

    zcPitemOpiway =
        new AsValFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_PITEM_OPIWAY),
            "zcPitemOpiway",
            "ZC_VS_PITEM_OPIWAY");

    zcPitemOpiway
        .getField()
        .addItemListener(
            new ItemListener() {

              public void itemStateChanged(ItemEvent event) {

                if (event.getStateChange() == ItemEvent.SELECTED && haveInitFlag) {

                  /* 拟定采购方式和批复采购方式联动 */

                  haveInitFlag = false;

                  String valId =
                      ((AsValComboBox) zcPitemOpiway.getField()).getSelectedAsVal().getValId();

                  ZcPProMake data = (ZcPProMake) listCursor.getCurrentObject();

                  data.setZcPitemOpiway(valId);

                  data.setZcPifuCgfs(valId);

                  data.setZcAttr3("");

                  zcPifuCgfs.setEnabled(false);

                  haveInitFlag = true;
                  //
                  //          if ("7".equals(valId)) { //如果是协议供货二次竞价,竞价品牌可编辑
                  //
                  //            data.setZcAttr3("");
                  //
                  //            zcAttr3.setEnabled(true);
                  //
                  //          } else {
                  //
                  //            zcAttr3.setEnabled(false);
                  //
                  //          }

                  setEditingObject(data);
                }
              }
            });

    // 批复采购方式 ( 1公开招标,2邀请招标,3竞争性谈判,4单一来源采购,5询价,6其他)

    zcPifuCgfs =
        new AsValFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_PIFU_CGFS), "zcPifuCgfs", "ZC_VS_PITEM_OPIWAY") {

          private static final long serialVersionUID = 546680855108337426L;

          protected void afterChange(AsValComboBox field) {
            changeWay(field);
          }
        };

    zcIsImp =
        new AsValFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_IS_IMP), "zcIsImp", "VS_Y/N");

    // add by wangkw   start

    zcIsImp
        .getField()
        .addItemListener(
            new ItemListener() {

              public void itemStateChanged(ItemEvent event) {

                if (event.getStateChange() == ItemEvent.SELECTED) {

                  ZcPProMake data = (ZcPProMake) listCursor.getCurrentObject();

                  String valId = zcIsImp.getField().getSelectedAsVal().getValId();

                  if ("N"
                      .equals(valId)) { // 当是否涉及进出口选择否的时候,将附件上传设置为不可用,如果是从“是”跳转回来的话,要将上传的附件从数据库中删除

                    if (data.getZcImpFileBlobid() != null) {

                      baseDataServiceDelegate.deleteFile(data.getZcImpFileBlobid(), requestMeta);
                    }

                    data.setZcImpFile(null);

                    data.setZcImpFileBlobid(null);

                    zcImpFile.setEnabled(false);

                  } else {

                    zcImpFile.setEnabled(true);
                  }
                }
              }
            });

    // end
    DateFieldEditor zcInputDate =
        new DateFieldEditor(
            LangTransMeta.translate(ZcPProBalConstants.FIELD_TRANS_ZC_INPUT_DATE), "zcInputDate");
    zcInputDate.setEnabled(false);
    zcImpFile =
        new FileFieldEditor(
            LangTransMeta.translate(FIELD_TRANS_ZC_IMP_FILE), "zcImpFile", "zcImpFileBlobid");

    TextFieldEditor zcIsRemark =
        new TextFieldEditor(LangTransMeta.translate(FIELD_TRANS_ZC_IS_REMARK), "zcIsRemark");

    ZcPProHandler zcPProHandler = new ZcPProHandler(self, this.listCursor);

    ElementConditionDto proDto = new ElementConditionDto();

    proDto.setZcText0(requestMeta.getEmpCode());

    ForeignEntityFieldEditor proName =
        new ForeignEntityFieldEditor(
            "ZC_P_PRO.getZcPPro",
            proDto,
            20,
            zcPProHandler,
            zcPProHandler.getColumNames(),
            "预算项目",
            "proName");
    zcMakeStatus.setEnabled(false);

    zcMakePfSequence =
        new AsValFieldEditor("批复采购组织形式", "zcMakeSequence", "VS_ZC_ORGTYPE") {

          private static final long serialVersionUID = 454290003043403563L;

          int i = 0; // add by wangkewei,用于判断是不是第一次调用afterChange

          protected void afterChange(AsValComboBox field) { // hjh inserted 2011-5-5 17:53
            if (field.getSelectedAsVal() == null) {
              return;
            }

            ZcPProMake beanData = (ZcPProMake) listCursor.getCurrentObject();

            if (beanData.getProcessInstId() != null
                && beanData.getProcessInstId() > 0
                && !beanData.getZcMakeStatus().equals("0")
                && saveButton.isVisible()) {

              String valId = field.getSelectedAsVal().getValId();

              // 采购组织形式和采购方式的联动

              if (valId.equals("1")) { // 采购组织形式和委托机构名称联动 :政府集中采购必须为采购中心,不可修改,不可改变

                haveInitFlag = false;

                beanData.setAgencyName(AsOptionMeta.getOptVal("OPT_ZC_CGZX_NAME"));

                beanData.setAgency(AsOptionMeta.getOptVal("OPT_ZC_CGZX_CODE"));

                zcAgeyCode.setEnabled(false); // wangkewei

                setEditingObject(beanData);

                haveInitFlag = true;

                valSetId = "1";

                fukuanValId = "1";

                i++;

              } else if (valId.equals("2")) {

                haveInitFlag = false;

                // 判断是采购组织形式选项是否有变化,有变化则清空委托机构名称

                if (!valId.equals(valSetId) && i > 0) { // 如果不是第一次调用,将委托机构名称设置为空,如果是第一次调用,界面上显示数据库的值

                  if (!fukuanValId.equals(valId)
                      && !beanData.getZcMakeStatus().equals("0")
                      && saveButton.isVisible()) {

                    beanData.setAgencyName("");

                    beanData.setAgency("");
                  }
                }

                valSetId = "2";

                fukuanValId = "2";

                zcAgeyCode.setEnabled(true);

                zcAgeyCode.setEditable(false);

                setEditingObject(beanData);

                haveInitFlag = true;

                i++;

              } else if (valId.equals("3")) { // 采购组织形式和申请采购方式的联动

                haveInitFlag = false;

                if (!valId.equals(valSetId) && i > 0) {

                  if (!fukuanValId.equals(valId)
                      && !beanData.getZcMakeStatus().equals("0")
                      && saveButton.isVisible()) {

                    beanData.setAgencyName("");

                    beanData.setAgency("");
                  }

                  valSetId = "3";

                  fukuanValId = "3";
                }

                valSetId = "3";

                fukuanValId = "3";

                zcAgeyCode.setEnabled(true);

                zcAgeyCode.setEditable(false); // guoss

                setEditingObject(beanData);

                haveInitFlag = true;

                i++;
              }

              if ("N".equals(beanData.getZcIsImp())) {

                zcImpFile.setEnabled(false);
              }
            }
          }
        };

    isDesSup = new AsValFieldEditor("是否指定供应商", "isDesSup", "ZC_VS_YN");

    isPub = new AsValFieldEditor("是否公示", "isPub", "ZC_VS_YN");

    isCar =
        new AsValFieldEditor(
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_P_PROMAKE_IS_CAR),
            "isCar",
            "ZC_VS_YN");

    // ---

    editorList.add(zcMakeName);
    editorList.add(zcMoneyBiSum);
    editorList.add(zcMakeStatus);

    editorList.add(zcCoCode);
    editorList.add(zcMakeCode);
    editorList.add(zcZgCsCode);

    editorList.add(isCar);
    editorList.add(zcIsImp);
    editorList.add(zcImpFile);

    editorList.add(zcMakeLinkman);
    editorList.add(zcAttr2);
    editorList.add(zcMakeTel);

    editorList.add(zcPifuCgfs);
    editorList.add(zcInputDate);
    editorList.add(zcIsRemark);

    return editorList;
  }
コード例 #10
0
  static {
    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_PITEM_NAME,
            "zcPitemName",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_PITEM_NAME)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_CATALOGUE_CODE,
            "zcCatalogueCode",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_CATALOGUE_CODE)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_CATALOGUE_NAME,
            "zcCatalogueName",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_CATALOGUE_NAME)));

    // itemXyInfo.add(new ColumnBeanPropertyPair("ZC_BRA_NAME", "zcBraName", "品牌"));

    //  itemXyInfo.add(new ColumnBeanPropertyPair("ZC_MER_NAME", "zcMerName", "商品"));

    // itemXyInfo.add(new ColumnBeanPropertyPair("ZC_SU_NAME", "zcSuName", "供应商"));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_PITEM_ARR_DATE,
            "zcPitemArrDate",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_PITEM_ARR_DATE)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_BASE_GGYQ,
            "zcBaseGgyq",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_BASE_GGYQ)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_PITEM_ATTACH,
            "zcPitemAttach",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_PITEM_ATTACH)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_CAIG_NUM,
            "zcCaigNum",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_CAIG_NUM)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_CAIG_UNIT,
            "zcCaigUnit",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_FIELD_ZC_MER_UNIT)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_MER_PRICE,
            "zcMerPrice",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_MER_PRICE)));

    itemXMInfo.add(
        new ColumnBeanPropertyPair(
            ZcElementConstants.FIELD_TRANS_ZC_ITEM_SUM,
            "zcItemSum",
            LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_ITEM_SUM)));
  }
コード例 #11
0
  public static DefaultTableModel convertToTableModel(List beanList) {

    MyTableModel tableModel = null;

    Vector names = new Vector();

    Vector values = new Vector();

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_FIELD_ZC_MER_CODE));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_FIELD_ZC_MER_NAME));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_CATALOGUE_NAME));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_FIELD_ZC_BRA_NAME));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_MER_SPEC));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_MER_M_PRICE));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_YEAR));

    names.add(LangTransMeta.translate(ZcElementConstants.FIELD_TRANS_ZC_FIELD_ZC_MER_STATUS));

    if (beanList != null && beanList.size() > 0) {

      for (int i = 0; i < beanList.size(); i++) {

        Vector rowData = new Vector();

        ZcBMerchandise zcBMerchandise = (ZcBMerchandise) beanList.get(i);

        rowData.add(zcBMerchandise.getZcMerCode());

        rowData.add(zcBMerchandise.getZcMerName());

        rowData.add(zcBMerchandise.getZcCatalogueName());

        rowData.add(zcBMerchandise.getZcBraName());

        rowData.add(zcBMerchandise.getZcMerSpec());

        rowData.add(zcBMerchandise.getZcMerMPrice());

        rowData.add(zcBMerchandise.getZcYear());

        rowData.add(AsValDataCache.getName("ZC_VS_MER_STATUS", zcBMerchandise.getZcMerStatus()));

        values.add(rowData);
      }
    }

    tableModel =
        new MyTableModel(values, names) {

          public Class getColumnClass(int column) {

            if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {

              for (int row = 0; row < this.getRowCount(); row++) {

                if (getValueAt(row, column) != null) {

                  return getValueAt(row, column).getClass();
                }
              }
            }

            return Object.class;
          }

          public boolean isCellEditable(int row, int colum) {

            return false;
          }
        };

    tableModel.setList(beanList);

    return tableModel;
  }
コード例 #12
0
package com.ufgov.zc.client.component.zc.fieldeditor.zcbagency;
コード例 #13
0
package com.ufgov.zc.client.zc.auditsheet;