/*
 * @Date: 2022-10-17 09:09:15
 * @LastEditors: 陈禹琨 cyk910622@163.com
 * @LastEditTime: 2023-01-10 09:52:11
 * @FilePath: \upcloud-wms-henanyiyao-web\src\views\kzyWMS\bound\replenishment\config\api.js
 * @Description: cyk
 */
import request from "@/utils/request";
import qs from "qs";
import {
  SERVICE_CTRL_TOWER,
  upcloud_base_wh_operate,
  upcloud_base_wh_outbound,
  SERVICE_DATA_API_BASE,
  upcloud_base_common,
} from "@/config/serviceSettings";

/* 条件分页查询(接口id) post  */
export function search_page(params) {
  return request({
    url: SERVICE_DATA_API_BASE + "/search/page",
    method: "post",
    data: params,
  });
}

/*件查询所有(接口id) 不带分页 post  */
export function search_noPage(params) {
  return request({
    url: SERVICE_DATA_API_BASE + "/search",
    method: "post",
    data: params,
  });
}

/* 上架/下架确认 post */
export function replenish_confirm(params) {
  return request({
    url: upcloud_base_wh_operate + "/replenish/v1/confirm",
    method: "post",
    data: params,
  });
}

// 上架确认 / 补货查询
export function replenish_list(params) {
  return request({
    url: upcloud_base_wh_operate + "/replenish/v1/list",
    method: "get",
    params: params,
  });
}

/* 波次"补货任务（更新移库任务状态 post） */
export function updateStatus(params) {
  return request({
    url: upcloud_base_wh_outbound + "/moveTask/updateStatus",
    method: "post",
    data: params,
  });
}

//获取货主信息
export function getAuthByUser(params) {
  return request({
    url: SERVICE_CTRL_TOWER + "/userDataAuth/allDataAuthByUser/",
    method: "get",
    // headers: { 'Content-Type': 'application/json' },
    params: params,
  });
}
export function WmsLoctype(params) {
  return request({
    url: upcloud_base_common + `/dict/listbytype/?dicttypeCodes=wms_loctype`,
    method: "post",
  });
}
