import request from '@/utils/request';


// 产品合格率

export async function queryHomePage (data) {
    const res = await request.post(`/qms/quality_work_order/queryHomePage` , data);
    if (res.data.code == 0) {
      return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
  }

// 工厂查询

export async function queryFactory () {
  const res = await request.get(`/qms/quality_work_order/queryFactory`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}


// 班组查询

export async function queryTeam () {
  const res = await request.get(`/qms/quality_work_order/queryTeam`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
// 产线查询

export async function queryProductionLine () {
  const res = await request.get(`/qms/quality_work_order/queryProductionLine`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
