
import { Select, Modal, Button,Table, DatePicker,Popconfirm } from 'antd'
import ListPage from '../../components/Table/ListPage';
import FormPage from '../../components/FormPage'
import {extendRule, initFilter} from "../../utils/common";
import {message} from "antd/lib/index";
import moment from 'moment';
//采购单列表
export default {
 
  
  btnShow:({record,getSelectedRecords,close,loadData,login,dispatch})=> {
    const closeF=()=>{
      close();
      loadData();
    };
    const data={
     ...record,
      close:closeF,
     
    };
    const isReturn=record.FLOW_STATUS!=0;
    return {content: <FormPage formCode={'QC010'} data={data} dispatch={dispatch} loadData={loadData}/>,
      isReturn:isReturn}
  },
  btnFlowShow:({record,getSelectedRecords,close,loadData,login,dispatch})=> {
    const data= {
      rules: [{field: 'InstanceId', operator: 1, value: record.FLOW_ID}],
      onlyFirst:false
    };
  
    return {content: <ListPage formCode={'PO007'} data={data} />}
  },
  btnAdmintShow:({record,getSelectedRecords,close,loadData,login,dispatch})=> {
    const isReturn=record.FLOW_STATUS!=2;//审核通过
    
    return {content: <FormPage formCode={'QC012'} data={record} dispatch={dispatch} loadData={loadData}/>,
      isReturn:isReturn}
  }
  
  
}
