Ejemplo n.º 1
0
package com.ufgov.zc.client.component.ui;
Ejemplo n.º 2
0
package com.ufgov.zc.client.zc.expertevaluate;
Ejemplo n.º 3
0
  public void updateWFEditorEditable(WfAware baseBill, RequestMeta requestMeta) {

    Long processInstId = baseBill.getProcessInstId();

    isEdit = false;

    if (processInstId != null && processInstId.longValue() > 0) {

      // 工作流的单据

      //      wfCanEditFieldMap = BillElementMeta.getWfCanEditField(baseBill, requestMeta);

      if ("cancel".equals(this.oldZcPProMake.getZcMakeStatus())) { // 撤销单据设置字段为不可编辑

        wfCanEditFieldMap = null;
      }

      //      if ("0".equals(this.oldZcPProMake.getZcMakeStatus())) {//撤销单据设置字段为不可编辑

      //        isEdit = true;

      //      }

      for (AbstractFieldEditor editor : fieldEditors) {

        // 工作流中定义可编辑的字段

        if (wfCanEditFieldMap != null
            && wfCanEditFieldMap.containsKey(
                Utils.getDBColNameByFieldName(editor.getEditObject(), editor.getFieldName()))) {

          if (!"zcMakeSequence".equals(editor.getFieldName())
              && !"zcPifuCgfs".equals(editor.getFieldName())) {
            isEdit = true;
          }

          editor.setEnabled(true);

          // 退回状态时,明细都可以编辑 add shijia 2011-10-14

          if (WorkEnv.getInstance()
              .containRole(AsOptionMeta.getOptVal(ZcElementConstants.OPT_ZC_YSDWCG_ROLE))) {

            BeanTableModel itmodel = (BeanTableModel) itemTablePanel.getTable().getModel();

            itmodel.setEditable(true);
          }

        } else {

          editor.setEnabled(false);
        }
      }

      // 子表的设置

      updateWFSubTableEditable();
    }
    // 根据采购方式,决定相关属性字段的显示,注释了,暂不应用
    //    AsValFieldEditor pf = (AsValFieldEditor) fieldEditors.get(fieldEditors.size() - 5);
    //    this.changeWay(pf.getField());
    this.changeWay(null);
  }