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

//工程方案
export default {
  btnInwh:({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={'MR099'} data={data}/>,
    }
  },
  btnOutwh:({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={'MR098'} data={data}/>,
    }
  },
  btnShowRecord:({record,close,loadData,login,btn,dispatch})=> {
    const closeF=()=>{
      close();
      loadData();
    };
    const data={
      id:(record? record.ID:''),
      close:closeF,
      engineeringPlanEditClick:login.engineeringPlanEditClick,
      rules:[{
        field:'EQUIPMENT_STANDBY_ID',operator:1,value:record.ID
      }]
    };
    btn.LABEL="出入库记录";
    return {
      content: <FormPage formCode={'MR100'} data={data}/>,
    }
  },
}
