import request from '@/utils/request'

//-----------------出入库记录管理

// 入库导出
export function tataStoreRecordInExport(params) {
  return request({
    url: '/tataStoreRecord/in/export',
    method: 'get',
    responseType: 'blob',
    timeout: 300000,
    params
  })
}

// 出库导出
export function tataStoreRecordOutExport(params) {
  return request({
    url: '/tataStoreRecord/out/export',
    method: 'get',
    responseType: 'blob',
    timeout: 300000,
    params
  })
}

// 出入库分页
export function tataStoreRecordPage(params) {
  return request({
    url: '/tataStoreRecord/page',
    method: 'get',
    params
  })
}

//-----------------大屏链接模块

// 部分入库
export function partStoreOrders(params) {
  return request({
    url: '/alert-order/partStoreOrders',
    method: 'get',
    params
  })
}

// 待入库
export function producingOrder(params) {
  return request({
    url: '/alert-order/producingOrder',
    method: 'get',
    params
  })
}

// 查询预警订单
export function queryAlertOrder(params) {
  return request({
    url: '/alert-order/queryAlertOrder',
    method: 'get',
    params
  })
}

//----------------- 库位分类控制器
// 新增
export function storeCategoryAdd(data) {
  return request({
    url: '/storeCategory/add',
    method: 'PUT',
    data
  })
}

// 编辑
export function storeCategoryEdit(data) {
  return request({
    url: '/storeCategory/edit',
    method: 'PUT',
    data
  })
}

// 库位分类树形数据显示
export function storeCategoryTree() {
  return request({
    url: '/storeCategory/storeCategoryTree',
    method: 'get'
  })
}

// 删除
export function deleteStoreCategoryId(id) {
  return request({
    url: `/storeCategory/${id}`,
    method: 'DELETE'
  })
}

//----------------- 库位信息控制器

// 新增
export function storeAdd(data) {
  return request({
    url: '/store/add',
    method: 'PUT',
    data
  })
}

// 批量新增
export function storeAddBatch(data) {
  return request({
    url: '/store/addBatch',
    method: 'PUT',
    data
  })
}

// 详情
export function storeDetail(params) {
  return request({
    url: '/store/detail',
    method: 'get',
    params
  })
}

// 修改
export function storeEdit(data) {
  return request({
    url: '/store/edit',
    method: 'PUT',
    data
  })
}

// 材质一级大类
export function getMaterialStairClassify(params) {
  return request({
    url: '/store/getMaterialStairClassify',
    method: 'get',
    params
  })
}

// 库位列表
export function storelist(params) {
  return request({
    url: '/store/list',
    method: 'get',
    params
  })
}

// 存放订单信息列表
export function storeOrders(params) {
  return request({
    url: '/store/storeOrders',
    method: 'get',
    params
  })
}

// 退库
export function storeRecede(data) {
  return request({
    url: '/store/storeRecede',
    method: 'POST',
    data
  })
}

// 删除
export function deleteStoreIds(id) {
  return request({
    url: `/store/${id}`,
    method: 'DELETE'
  })
}

//------------订单信息

// 查询成品库房订单信息
export function queryStoreOrderList(params) {
  return request({
    url: '/ordPartOrder/queryStoreOrderList',
    method: 'get',
    params
  })
}

// 批量导出-成品库房订单信息
export function ordPartOrderExport(params) {
  return request({
    url: '/ordPartOrder/export',
    method: 'get',
    responseType: 'blob',
    timeout: 300000,
    params
  })
}

// 查询成品库房预警订单信息
export function queryWarningOrderList(params) {
  return request({
    url: '/ordPartOrder/queryWarningOrderList',
    method: 'get',
    params
  })
}

// 批量导出-成品库房预警订单
export function exportWarning(params) {
  return request({
    url: '/ordPartOrder/exportWarning',
    method: 'get',
    responseType: 'blob',
    timeout: 300000,
    params
  })
}

// 根据订单状态查询成品库房订单信息
export function queryOrderListByStatus(params) {
  return request({
    url: '/ordPartOrder/queryOrderListByStatus',
    method: 'get',
    params
  })
}

// 根据订单状态批量导出成品库房订单信息
export function exportFileByStatus(params) {
  return request({
    url: '/ordPartOrder/exportFileByStatus',
    method: 'get',
    responseType: 'blob',
    timeout: 300000,
    params
  })
}
// 获取提醒人员
export function storeCategoryGetRemindStaffIds(){
  return request({
    url:"storeCategory/getRemindStaffIds",
    method:"get"
  })
}