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

// 查询人员总工工时
export function searchtable(num1, num2, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_工时统计_设备工时_Vue',
      param: '开始时间=' + num1 + '&结束时间=' + num2,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
// 查询人员具体工序
export function searchtable2(num1, num2, num3, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_工时统计_设备工时_Vue_详细',
      param: '人员编号=' + num1 + '&开始时间=' + num2 + '&结束时间=' + num3,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
export function searchoperator() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
      param: '考核部门编号=12'
    }
  })
}
// 查询所有候补工时
export function searchtableAlternateHours(time1, time2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_工时统计_设备工时_Vue_详细_候补工时',
      param: '开始时间=' + time1 + '&结束时间=' + time2
    }
  })
}
