
import React from 'react';
import FormPage from '../../components/FormPage'

//工程方案
export default {
  btnPartsInwh: ({ record, close, loadData, login, btn, dispatch }) => {
    const closeF = () => {
      close();
      loadData();
    };
    const data = {
      id: (record ? record.ID : ''),
      OrgId: (record ? record.ORG_ID : ''),
      close: closeF,
      engineeringPlanEditClick: login.engineeringPlanEditClick,
    };
    btn.LABEL = "入库";
    return {
      content: <FormPage formCode={'MR101'} data={data} />,
    }
  },
  btnPartsOutwh: ({ record, close, loadData, login, btn, dispatch }) => {
    const closeF = () => {
      close();
      loadData();
    };
    const data = {
      id: (record ? record.ID : ''),
      OrgId: (record ? record.ORG_ID : ''),
      close: closeF,
      engineeringPlanEditClick: login.engineeringPlanEditClick,
    };
    btn.LABEL = "出库";
    return {
      content: <FormPage formCode={'MR102'} data={data} />,
    }
  },
  btnPartsShowRecord: ({ record, close, loadData, login, btn, dispatch }) => {
    const closeF = () => {
      close();
    };
    const data = {
      id: (record ? record.ID : ''),
      isReview: true,
      close: closeF
    };
    return {
      content: <FormPage formCode={'MR011'} data={data} />,
    }
  },
}
