import request from "@/utils/request";

// 新增出库查询
export function addGetOutbound(data) {
  return request({
    url: "/wisdom/stock/listByBillNo",
    method: "get",
    params: data,
  });
}

// 新增出库
export function addOutbound(data) {
  return request({
    url: "/wisdom/bill/out/add",
    method: "post",
    data: data,
  });
}

// 一键出库
export function recordFinish(data) {
  return request({
    url: '/wisdom/record/out/finish',
    method: 'post',
    data: data
  })
}

// 撤销出库
export function backoutRecord(data) {
  return request({
    url: '/wisdom/record/out/rollback',
    method: 'post',
    data: data
  })
}

// 一键删除预出库
export function recordRemove(data) {
  return request({
    url: '/wisdom/record/out/delete',
    method: 'delete',
    data: data
  })
}











//出库记录列表
export function listOutbound(data) {
  return request({
    url: "/wisdom/stock/list",
    method: "post",
    data: data,
  });
}

// 查询库存单据主列表
export function listBill(data) {
  return request({
    url: "/wisdom/stock/bill/groups",
    method: "post",
    data: data,
  });
}
export function picDetail(data) {
  return request({
    url: "/photo/list?billNo=" + data.billNo + "&photoType=" + data.photoType,
    method: "get",
  });
}
//生成调度任务
export function generateDispatch(data) {
  return request({
    url: "/wisdom/dispatch/batchAdd",
    method: "post",
    data: data,
  });
}

//左侧修改主单据
export function editOutbound(data) {
  return request({
    url: "/wisdom/stock/updateByBillNoCk",
    method: "post",
    data: data,
  });
}
