import { postJ, post, get } from "@/utils/request";
import Vue from "vue";


// 投料保存
export async function batchSave(params) {
  const data = await postJ(
   Vue.prototype.apiUrl  + `/pda/mes/feed/batchSave`, params, true,
  );
  if (data.code == 0) {
    return data.data;
  }
  return Promise.reject(data.message);
}


// pda根据工单ids查询投料单
export async function feedByOrderIds(params) {
  const data = await postJ(
   Vue.prototype.apiUrl  + `/pda/mes/feed/listByOrderIds`, params, true,
  );
  if (data.code == 0) {
    return data.data;
  }
  return Promise.reject(data.message);
}


// 库存明细
export async function getInventoryDetails(params) {
  const data = await get(
   Vue.prototype.apiUrl  + `/wms/outin/getInventoryDetails`, params, true,
  );
  if (data.code == 0) {
    return data.data;
  }
  return Promise.reject(data.message);
}


