import request from '@/utils/request'

// 查询来料报告列表
export function listIncome(query) {
	return request({
		url: '/quality/qcIncomeReport/list',
		method: 'get',
		params: query
	});
}

// 查询来料报告详细
export function getIncome(recordId) {
	return request({
		url: '/quality/qcIncomeReport/' + recordId,
		method: 'get'
		});
}

// 新增来料报告
export function addIncome(data) {
	return request({
		url: '/quality/qcIncomeReport',
		method: 'post',
		data: data
	});
}

// 修改来料报告
export function updateIncome(data) {
	return request({
		url: '/quality/qcIncomeReport',
		method: 'put',
		data: data
	});
}

// 删除来料报告
export function delIncome(recordId) {
	return request({
		url: '/quality/qcIncomeReport/' + recordId,
		method: 'delete'
	});
}

// 查询BOM物料管理列表
export function getQcListBom(query) {
	return request({
	  url: '/quality/qcIncomeReport/getQcListBom',
	  method: 'get',
	  params: query
	});
  }

// 查询供应商管理列表
export function getQcListSupplier(query) {
	return request({
	  url: '/quality/qcIncomeReport/getQcListSupplier',
	  method: 'get',
	  params: query
	});
  }

// 查询人员列表
export function getQcListUser(query) {
	return request({
	  url: '/quality/qcIncomeReport/getQcListUser',
	  method: 'get',
	  params: query
	});
  }

//状态修改
export function changeIncomeStatus(recordId, status) {
	const data = {
		recordId,
	    status
	}
	return request({
	  url: '/quality/qcIncomeReport/changeIncomeStatus',
	  method: 'put',
	  data: data
	})
  }

// 查询检测项列表
export function getCkeckProjectList(query) {
	return request({
	  url: '/quality/qcIncomeReport/getCkeckProjectList',
	  method: 'get',
	  params: query
	});
  }
