import request from '@/utils/request'

export function initProject() {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '车间生产管理工艺_基本件成组配套_查询项目名称'
    }
  })
}
export function searchmachine(num, check, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: 'PDM_机床名称_查询数据_分页',
      param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '=int&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0=int&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
    }
  })
}
export function searchgroup(num, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: 'PDM_组件名称_查询数据_分页',
      param: '机床流水号=' + num + '=int&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
    }
  })
}
export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '车间生产管理工艺_基本件成组配套_查询数据',
      param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string',
      pagination: pageCurrent + '&' + pageSize
    }
  })
}
export function searchTable22(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '车间生产管理工艺_基本件成组配套_查询数据',
      param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string'
    }
  })
}
export function searchPurchaseTable(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '车间生产管理工艺_外购件成组配套_查询数据',
      param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string',
      pagination: pageCurrent + '&' + pageSize
    }
  })
}
export function searchTable1(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time, pageCurrent, pageSize) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_车间采购出库_零件查询',
      param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string',
      pagination: pageCurrent + '&' + pageSize
    }
  })
}
export function processingStatus(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '车间生产管理_成组配套加工进度_查询数据',
      param: '工艺计划流水号=' + num
    }
  })
}
