import request from './request'    // 引入封装的axios

/** ----- 站点 ----- */
// 获取油站信息
export const getDataList = (data:any)=>{
	return request({
		url:'/qrFueling/config/getBaseInfo',
		method:'get',		
		params:data
	})
}

// 添加站点信息
export const addStation = (data:any)=>{
	return request({
		url:'/qrFueling/config/uploadBaseInfo',
		method:'post',
		data:data
	})
}

// 删除站点信息 
export const deleteStation = (data:any)=>{
	return request({
		url:'/qrFueling/config/deleteBaseInfo',
		method:'post',
		params:data
	})
}

/** ----- 油罐 ----- */
// 获取油罐基本信息
export const getTankInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/getBaseTankInfo',
		method:'get',
		params:data
	})
}

// 获取油罐详细信息
export const getDetailsTankInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/getDetailsTankInfo',
		method:'get',
		params:data
	})
}

// 配置油罐信息
export const updateTankInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/updateDetailsTankInfo ',
		method:'post',
		data:data
	})
}

// 提交油罐信息
export const addTankInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/addDetailsTankInfo',
		method:'post',
		data:data
	})
}

// 删除油罐信息
export const deleteTank = (data:any)=>{
	return request({
		url:'/qrFueling/tank/deleteTank',
		method:'post',
		params:data
	})
}

/** ----- 油枪 ----- */
// 获取油枪信息
export const getNozzleInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/getDetailsNozzleInfo',
		method:'get',
		params:data
	})
}

// 添加油枪信息 
export const uploadNozzleInfo = (data:any)=>{
	return request({
		url:'/qrFueling/tank/uploadDetailsNozzleInfo',
		method:'post',
		data:data
	})
}

// 删除油枪信息
export const deleteNozzle = (data:any)=>{
	return request({
		url:'/qrFueling/tank/deleteNozzle',
		method:'post',
		params:data
	})
}

/** ----- 油品 ----- */
// 配置油品信息
export const uploadOilInfo = (data:any)=>{
	return request({
		url:'/qrFueling/config/uploadOilInfo',
		method:'post',
		data:data
	})
}

// 获取油品信息
export const getOilInfo = (data:any)=>{
	return request({
		url:'/qrFueling/config/getOilInfo',
		method:'get',
		params:data
	})
}

// 删除油品信息
export const deleteOilInfo = (data:any)=>{
	return request({
		url:'/qrFueling/config/deleteOilInfo',
		method:'post',
		params:data
	})
}

/** ----- 订单 ----- */
export const getOrderInfoPage = (data:any) => {
	return request({
		url:'/qrFueling/order/getPage',
		method:'post',
		data:data,
	})
}



