import request from '@/utils/request'
// 生产订单列表
export function ordPartOrderQueryOrderList(data) {
  return request({
    url: '/ordPartOrder/queryOrderList',
    method: 'post',
    data
  })
}
// 生产订单状态
export function ordPartOrdergetOrderStatus() {
  return request({
    url: '/ordPartOrder/getOrderStatus',
    method: 'get'
  })
}
// 获取订单产品信息
export function ordPartOrderGetOrderProductInfo(data) {
  return request({
    url: `/ordPartOrder/getOrderProductInfo/${data}`,
    method: 'get'
  })
}
// 查询主单信息
export function ordPartOrderQueryOrderInfo(data) {
  return request({
    url: '/ordPartOrder/queryOrderInfo',
    method: 'get',
    params: data
  })
}
// 分包信息
export function ordPartOrderQueryOrderSubContractInfo(data) {
  return request({
    url: `/ordPartOrder/queryOrderSubContractInfo/${data}`,
    method: 'get'
  })
}
// 内返记录
export function internalReturnGetInternalReturnByPartNo(data) {
  return request({
    url: `/internalReturn/getInternalReturnByPartNo/${data}`,
    method: 'get'
  })
}
// 分厂
export function ordPartOrderGetSubFactory() {
  return request({
    url: '/ordPartOrder/getSubFactory',
    method: 'get'
  })
}
// 材质
export function ordPartOrderGetMaterial(params) {
  return request({
    url: '/ordPartOrder/getMaterial',
    method: 'get',
    params
  })
}
// 批量生产
export function ordPartOrderOrderPatchProduction(data) {
  return request({
    url: '/ordPartOrder/orderPatchProduction',
    method: 'post',
    data
  })
}
// 取消订单
export function tataCancelOrderPage(data) {
  return request({
    url: '/tataCancelOrder/page',
    method: 'get',
    params: data
  })
}
// 取消订单状态
export function tataCancelOrderstatuslist() {
  return request({
    url: '/tataCancelOrder/status/list',
    method: 'get'
  })
}
// 取消订单获取一级分类
export function tataCancelOrdermaterialStairClassifylist() {
  return request({
    url: '/tataCancelOrder/materialStairClassify/list',
    method: 'get'
  })
}
// 取消订单明细
export function tataCancelOrderTabDetail(param) {
  return request({
    url: `/tataCancelOrder/tab/detail/${param}`,
    method: 'get'
  })
}
// 生产确定
export function tataCancelOrderCconfirm(data) {
  return request({
    url: '/tataCancelOrder/confirm',
    method: 'PUT',
    data
  })
}

//获取用户类型 1总部、2生产厂
export function getAccountUserType() {
  return request({
    url: '/ordPartOrder/getAccountUserType',
    method: 'get'
  })
}

// 得到数据权限
export function getDataScope() {
  return request({
    url: '/ordPartOrder/getDataScope',
    method: 'get'
  })
}

// 获取生产厂责任小单元
export function getFactoryDutyUnit(data) {
  return request({
    url: '/ordPartOrder/getFactoryDutyUnit',
    method: 'post',
    data
  })
}

// 三级问题
export function getFactoryThreeLevelProblem(data) {
  return request({
    url: '/ordPartOrder/getFactoryThreeLevelProblem',
    method: 'post',
    data
  })
}

// 获取工艺节点
export function getProductLineNodes(data) {
  return request({
    url: '/ordPartOrder/getProductLineNodes',
    method: 'post',
    data
  })
}
// 获取当前是否分厂
export function ordPartOrdergetAccountUserType() {
  return request({
    url: '/ordPartOrder/getAccountUserType',
    method: 'get'
  })
}
export function getProductProcess(params) {
  return request({
    url: '/ordPartOrder/getProductProcess',
    method: 'get',
    params
  })
}
