/* eslint-disable no-undef */
import {extendInclude, extendRule, initFilter} from "../../utils/common";
import moment from 'moment';
import {message} from "antd/lib/index";

/**
 * @return {string}
 */

export default {
  onChange: ({value,colInfo,login,dispatch,getFieldValue,setFieldValueByBatch,setFieldEditable}) => {
  if(colInfo.FIELD_NAME=='VIR_MOVE_QTY')
     {
       if( getFieldValue('VIR_MOVE_QTY')>getFieldValue('QTY'))
       {
        const temps=[];
        temps.push({field:'VIR_MOVE_QTY',value: getFieldValue('QTY')});
        setFieldValueByBatch(temps);

       }
    }
  },
  onBeforeEdit:({getFieldValue,login,dispatch,setFieldValueByBatch,setFieldEditable})=>{
     const temps=[];
        temps.push({field:'VIR_USER_ID',value: login.userId});
        setFieldValueByBatch(temps);
    
  },
 onBeforeSave:({data,getFieldValue,setFieldValue})=>{
   
  },
}
