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

// 获取机床
export function searchMachine() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'PDM_项目名称_查询数据'
    }
  })
}
// 查询报废零件
export function searchtable(check1, value1, check3, value3, check5, value5, value6, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_传递后_零件报废补投_查询数据_新',
      param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&零件图号_check=' + check3 + '&零件图号=' + value3 + '&时间段_check=' + check5 + '&开始时间=' + value5 + '&结束时间=' + value6 + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
    }
  })
}
export function editA(CutCodebefore, Number, id) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '2',
      name: '车间生产管理工艺_零件工艺计划_报废零件_补投',
      param: '工艺计划流水号=' + CutCodebefore + '&补投数量=' + Number + '&补投人=' + id
    }
  })
}
