
import { Progress,Button,Input} from 'antd'
import {message} from "antd/lib/index";
import {extendRule, initQueryFilter} from "../../utils/common";
import DropDownPagination from "../../components/common/DropDownPaginationEx"
import moment from 'moment';
//用户列表页
export default {

//自动分配
  BatchSchedul:({record,getSelectedRowKeys,login,loadData,getLoadParam,dispatch,getSelectedRecords})=>{
    let val ={
      "CODE":"",
      "SCHEDUE_PATTERN":0,
      "SCHEDUE_TYPE":0,
      "INSERTING":false,
      "INSERT_EFFECT_TYPE":0,
      "INSERT_EFFECT_SORT":0,
      "FILTER_PARAM":true,
      "ORDER_STATUS":1
    }
    if(getSelectedRecords){
      getSelectedRecords.forEach((n,i)=>{
          val.Nav_SchdeulInDetails[i].OVERDUE=n.OVERDUE;
        val.Nav_SchdeulInDetails[i].PLAN_TASK_ID=n.ID;
        val.Nav_SchdeulInDetails[i].PLAN_TASK_CODE=n.CODE;
        val.Nav_SchdeulInDetails[i].NUM=0;
        val.Nav_SchdeulInDetails[i].START_TIME=n.PLAN_SCH_START_TIME;
        val.Nav_SchdeulInDetails[i].END_TIME=n.PLAN_SCH_END_TIME;
        val.Nav_SchdeulInDetails[i].DUE_TIME=n.Nav_PdtOrder.DUE_TIME;
        val.Nav_SchdeulInDetails[i].QTY=n.PLAN_SCH_QTY;
      })
    }
    dispatch({
      type: 'app/getDataByPost',
      payload: val,
      url:"PM/Assign/Scheduling",
      onComplete: (ret) => {
        if (ret) {
        }
      }
    });

  },
}
