import request from '@/utils/request';



// 查询仓库下拉列表
export async function getWarehouseList() {
    const res = await request.post(`/wms/warehouse/getWarehouseList`, {});
    if (res.data.code == 0) {
      return res.data;
    }
    return Promise.reject(new Error(res.data.message));
  }
  
 

// 根据当前用户id查询他的负责工序
  export async function listTask(data) {
    const res = await request.get('/main/producetask/listTaskByUserId', {
      params: data
    });
    if (res.data.code == 0) {
      return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
  }
  


  // bom 信息

  export async function getByTaskId(data) {
    const res = await request.get(`/main/categoryparam/getByTaskId`, { params: data });
    if (res.data.code == 0) {
      return res.data;
    }
    return Promise.reject(new Error(res.data.message));
  }
  