import { message, Checkbox, Radio } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty, onBeforeSaveHandleRecordLog, Format } from "../../utils/common";
import { connect } from 'dva';
import moment from 'moment';
/**
 * @return {string}
 */
// 编辑  安全生产费用使用记录
export default {
  onBeforeSaveHandleRecord(params) {
    params.record.TaskID = params.data.TaskID    //TaskID传递消息表ID
    params.record.STATUS = params.customParams;
    onBeforeSaveHandleRecordLog(params, 'TI008', '前端日志')
  },

  onBeforeEdit: ({ isNew, setFieldValueByBatch, login }) => {
    if (isNew) {
      const temps = [];
      temps.push({ field: 'USER_ID', value: login.user.ID })
      temps.push({ field: 'Nav_User.NAME', value: login.user.NAME })
      temps.push({ field: 'USETIME', value: (new Date()).Format("yyyy-MM-dd") })
      setFieldValueByBatch(temps);
    }
  },

}
