import axios from '@/libs/axios.js'

// 查询产品
export const queryProduct = (params) => {
	return axios.request({
		url: `shelfCart/queryProduct`,
		data: params,
		method: 'post'
	})
}
// 查询产品 分页
export const queryProductPage = (params) => {
	return axios.request({
		url: `shelfCart/queryProductPage/${params.pageNo}/${params.pageSize}`,
		data: params,
		method: 'post'
	})
}
// 查询货架是否有录入的产品
export const shelfCartNotEmpty = (params) => {
	return axios.request({
		url: `shelfCart/shelfCartNotEmpty`,
		data: params,
		method: 'post'
	})
}
// 录入保存
export const shelfCartSave = (params) => {
	return axios.request({
		url: `shelfCart/save`,
		data: params,
		method: 'post'
	})
}

// 已录入的所有产品
export const queryMapList = (params) => {
	return axios.request({
		url: `shelfCart/queryMap`,
		data: params,
		method: 'post'
	})
}
// 查询产品统计
export const queryCountList = (params) => {
	return axios.request({
		url: `shelfCart/queryCount`,
		data: params,
		method: 'post'
	})
}
// 删除产品
export const shelfCartDelete = (params) => {
	return axios.request({
		url: `shelfCart/delete`,
		data: params,
		method: 'post'
	})
}

// 上架确认
export const shelfCartConfirm = (params) => {
	return axios.request({
		url: `shelfCart/confirm`,
		data: params,
		method: 'post'
	})
}

// 查询货架车上结算价为空的产品
export const queryEmptyCostList = (params) => {
	return axios.request({
		url: `shelfCart/queryEmptyCostList/${params.shelfSn}`,
		method: 'get'
	})
}

// 查询货架车上结算价为空的产品
export const updateBatchById = (params) => {
	return axios.request({
		url: `shelfCart/updateBatchById`,
		data: params,
		method: 'post'
	})
}