import request from "@/utils/request";

// 创建wms交易
export function createMaterialTransaction(data) {
  return request({
    url: "/rtkwms/material-transaction/create",
    method: "post",
    data: data,
  });
}

// 更新wms交易
export function updateMaterialTransaction(data) {
  return request({
    url: "/rtkwms/material-transaction/update",
    method: "put",
    data: data,
  });
}

// 删除wms交易
export function deleteMaterialTransaction(id) {
  return request({
    url: "/rtkwms/other-out-sock/delete?id=" + id,
    method: "delete",
  });
}

// 获得wms交易
export function getMaterialTransaction(id) {
  return request({
    url: "/rtkwms/material-transaction/get?id=" + id,
    method: "get",
  });
}

// 获得wms交易分页
export function getMaterialTransactionPage(query) {
  return request({
    url: "/rtkwms/other-out-stock/page",
    method: "get",
    params: query,
  });
}

// 导出wms交易 Excel
export function exportMaterialTransactionExcel(query) {
  return request({
    url: "/rtkwms/material-transaction/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
// 发料完成 /wms/other-out-sock/createBatch
export function createBatch(data) {
  return request({
    url: "/rtkwms/other-out-stock/createBatch",
    method: "post",
    data: data,
  });
}

// 获取部门下拉列表
export function getDepartmentPage(query) {
  return request({
    url: "/rtkerp/department/page",
    method: "get",
    params: query,
  });
}
// 扫码获取员工
export function getEmployeeMaster(id) {
  return request({
    url: "/system/employee-master/get?id=" + id,
    method: "get",
  });
}
