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

// 初始化获取已生成的外协加工任务单
export function getTable(checked, contractNumber, check, check1, num, num1, check2, part) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理_外协加工任务查询_查询数据',
      param: '表单号_check=' + checked + '&表单号=' + contractNumber + '&查询历史_check=' + check + '&下达日期_check=' + check1 + '&任务下达开始时间=' + num + '&任务下达结束时间=' + num1 + '&零件图号_check=' + check2 + '&零件图号=' + part
    }
  })
}
// 查询任务单明细
export function getParts(Number, check2, part) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_外协任务查询_外协加工任务单明细_查询数据',
      param: '外协加工任务单流水号=' + Number + '&零件图号_check=' + check2 + '&零件图号=' + part
    }
  })
}
