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

export function intPartState() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_基础表_零件考核状态_查询数据'
    }
  })
}
export function searchmachine(role, personnel) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '机床_查询_营销筛选',
      param: '角色编号=' + role + '&人员编号=' + personnel
    }
  })
}
export function searchgroup(num, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'PDM_组件名称_查询数据',
      param: '机床流水号=' + num
    }
  })
}
export function searchTable(check1, machine, check2, groupNum, check3, partNumber, check4, partStateValue, check5, partTypeValue, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_自制件状态查询_查询',
      param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
    }
  })
}
export function gettabledata1(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_追溯加工过程_查询工序',
      param: '工艺计划流水号=' + num + '=int'
    }
  })
}
export function getPersons(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_自制件状态查询_每阶段操作者查询',
      param: '工艺计划流水号=' + num
    }
  })
}
