package com.ufgov.zc.client.component.ui;
package com.ufgov.zc.client.zc.expertevaluate;
  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);
  }