import request from "@/utils/request";

//获取当前订单物料列表
export function recordList(data: any) {
  return request({
    url: "/api/v1/process/itemRecord/list",
    method: "post",
    data,
  });
}
export function accessoryList(data: any) {
  return request({
    url: "/api/v1/process/accessoryItemRecord/list",
    method: "post",
    data,
  });
}
//采集详情查询
export function itemInfoList(data: any) {
  return request({
    url: "/api/v1/process/itemRecord/itemInfo/list",
    method: "post",
    data: data,
  });
}

//扫码搜寻物料
export function searchMaterial(data: any) {
  return request({
    url: "/api/v1/process/itemRecord/searchMaterial",
    method: "post",
    data: data,
  });
}
export function searchFlMaterial(data: any) {
  return request({
    url: "/api/v1/process/accessoryItemRecord/searchMaterial",
    method: "post",
    data: data,
  });
}

//新增物料采集信息
export function itemRecordAdd(data: any) {
  return request({
    url: "/api/v1/process/itemRecord/add",
    method: "post",
    data: data,
  });
}

//获取采集详情
export function getInfo(data: any) {
  return request({
    url: `/api/v1/process/itemRecord/itemInfo/list`,
    method: "post",
    data,
  });
}
export function getNeedMaterial(data: any) {
  return request({
    url: `/api/v1/process/itemRecord/list`,
    method: "post",
    data,
  });
}
export function getCollectHistory(data: any) {
  return request({
    url: `/api/v1/process/itemRecord/queryCollectHistory`,
    method: "post",
    data,
  });
}
export function getFlCollectHistory(data: any) {
  return request({
    url: `/api/v1/process/accessoryItemRecord/queryCollectHistory`,
    method: "post",
    data,
  });
}
export function saveBatch(data: any) {
  return request({
    url: `/api/v1/process/itemRecord/saveBatch`,
    method: "post",
    data,
  });
}
export function saveFlBatch(data: any) {
  return request({
    url: `/api/v1/process/accessoryItemRecord/saveBatch`,
    method: "post",
    data,
  });
}
