
import React from 'react';
import { Button } from 'antd'
import {message} from "antd/lib/index";

export default {
  examinationBtn:({record,loadData,login,dispatch,btn,getSelectedRowKeys,clearSelectedRowKeys, getSelectedRecords})=> {
    let isReturn=record.DISPOSE_STATUS==0;
    const confirm = () => {
      const json = {Keyword: record.ID, OrgId: login.OrgId};
      dispatch({
        type: 'app/getDataByPost',
        payload: json,
        url: "MR/ResourceAbnonrmalExamination/SendExamination",
        onComplete: (ret) => {
          if (ret) {
            message.success('执行成功');
            loadData();
          }
        }
      })
    };
    return {
        content:
          <Button type={'default'} icon={'right-square'} size="small" disabled={isReturn} title={'送审'} onClick={() => confirm()}></Button>
    };
  }
}
