/* eslint-disable no-undef */
import {extendInclude, extendRule} from "../../utils/common";

/**
 * @return {string}
 */

export default {
  onChange: ({value,colInfo,getFieldValue,setFieldValue,setFieldEditable}) => {


  },
  onFetchAutoFilter:({colInfo,params,getFieldValue,pageCode})=>{


  },
  onBeforeEdit:({isNew,getFieldValue,setFieldValueByBatch,setFieldEditable})=>{
    if(isNew){
      const temps=[];
      temps.push({field:'TYPE',value:0})
      setFieldValueByBatch(temps);
    }

  },
  onBeforeSave:({data,getFieldValue,setFieldValue})=>{
  },
  onFetchAutoFilterDetail:({colInfo,params,record,stateData})=>{
    if(colInfo.FIELD_NAME=='Nav_WorkStageChild.NAME') {
      if(stateData&&stateData.length) {
        stateData.forEach((n,i)=>{
          if(n.WORKSTAGE_CHILD_ID) {
            extendRule(params, 'ID', 2, n.WORKSTAGE_CHILD_ID);
          }
        });
      }
    }
  },
}
