import request from '@/utils/request'

// 查询计划制造工艺PBOM列表
export function listPbom(query) {
	return request({
		url: '/mm/ppbom/list',
		method: 'get',
		params: query
	})
}

// 查询计划制造工艺PBOM详细
export function getPbom(id) {
	return request({
		url: '/mm/ppbom/' + id,
		method: 'get'
	})
}

// 新增计划制造工艺PBOM
export function addPbom(data) {
	return request({
		url: '/mm/ppbom',
		method: 'post',
		data: data
	})
}

// 修改计划制造工艺PBOM
export function updatePbom(data) {
	return request({
		url: '/mm/ppbom',
		method: 'put',
		data: data
	})
}

// 删除计划制造工艺PBOM
export function delPbom(id) {
	return request({
		url: '/mm/ppbom/' + id,
		method: 'delete'
	})
}

export function importTemplate() {
	return request({
		url: "/mm/ppbom/importTemplate",
		method: 'get'
	})
}