import request from '@/utils/request';
import { download } from '@/utils/file';



// 出釜质检列表

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

// 出釜质检详情列表

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

export async function exportList(data) {
  const res = await request.post('/qms/quality_work_order/List_count/export', data, {responseType:'blob'} );
  download(res.data, '出釜质检')
}


