import request from "@/utils/request";
import {param} from "@/utils";
//获得可用仓
export function warehouseAdjustmentList(params){
  return request({
    url:'/ecw/warehouse/adjustmentList',
    method:'post',
    params:params
  })
}
//发起调仓请求
export function  orderWarehouseInAdjustApply(data){
  return request({
    url:'/order/order-warehouse-in/adjust-apply',
    method:'put',
    data:data,
  })
}

//获取订单列表
export function ecwOrderList(params){
  return request({
    url:'/ecw/order/list',
    method:'get',
    params:params,
  })
}
//申请退仓
export function orderWarehouseInDelete(data){
  return request({
    url:'/order/order-warehouse-in/rollback-apply',
     method:'put',
    data:data,
  })
}
//获取退仓审批详情
export function getRollbackApprovalInfo(params){
  return request({
    url:'/order/order-warehouse-in/get-rollback-approval-info',
    method:'get',
    params
     })
    }
//通过bpmFormId 获得仓库审核单详情
 export function warehouseApprovalGetByFormId(params){
  return request({
    url:'order/order-warehouse-approval/get-by-form-id',
    method:'get',
    params:params
  })
 }
  export function warehouseAreaPositionList(params){
    return request({
      url:'/ecw/warehouse/list',
      method:'get',
      params:params
    })
}
// 根据审核ID获得仓库审核单详情
export function warehouseApprovalGetById(params){
  return request({
    url:'/order/order-warehouse-approval/get-by-id',
    method:'get',
    params,
  })
}
//调仓-查看状态
export function adjustApplyStatus(params){
  return request({
    url:'/order/order-warehouse-in/adjust-apply-status',
    method:'get',
    params
  })

}
//调仓-撤销
export function cancelAdjustApply(data){
  return request({
    url:'/order/order-warehouse-in/cancel-adjust-apply',
     method:'post',
      data
  })
}
//调仓审核
 export function warehouseApprovalCancel(params,reason){
  return request({
    url: `/order/order-warehouse-approval/cancel/${params}`,
    method:'get',
    params:{reason}
  })
 }
// 调仓-查看最近的调仓纪录和审核状态
export function  adjustLastWithStatus(params){
  return request({
    url:'/order/order-warehouse-in/adjust-last-with-status',
    method:'get',
    params,
  })
}
