import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

export function getMachine() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '机床信息_查询数据'
    }
  })
}
export function searchTable(check, startime, endtime, check1, machine, check2, process, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产工艺管理_各工序完成情况_查询数据_机床工序统计_详细',
      param: '时间_check=' + check + '&开始时间=' + startime + '&结束时间=' + endtime + '&机床_check=' + check1 + '&机床流水号=' + machine + '&工序_check=' + check2 + '&工序=' + process,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
export function searchProcess(check, startime, endtime, check1, machine, check2, process) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产工艺管理_各工序完成情况_查询数据_机床工序统计',
      param: '时间_check=' + check + '&开始时间=' + startime + '&结束时间=' + endtime + '&机床_check=' + check1 + '&机床流水号=' + machine + '&工序_check=' + check2 + '&工序=' + process
    }
  })
}
