import request from '@/utils/request';


/**
 * 列表
 */
export async function getList(data) {
  const res = await request.post('/mes/be_entrusted_management/page', data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 申请入库
export async function warehouseEntry (params) {
  const res = await request.get(`/mes/be_entrusted_management/warehouseEntry`, { params });
  if (res.data.code == 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

//修改
export async function update(data) {
  const res = await request.post('mes/be_entrusted_management/update', data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}