车辆信息

This commit is contained in:
XaoLi717 2024-11-29 07:53:14 +08:00
parent 35c4b63065
commit aa0f2ba231

View File

@ -0,0 +1,49 @@
import request from '@/config/axios'
// 车辆信息录入 VO
export interface CarinfoVO {
id: number // id
licensePlate: string // 车牌号
model: string // 具体名称型号
brand: string // 车辆品牌
carStatus: number // 车辆状态
carType: number // 车辆类型
color: string // 车身主要颜色
purchaseDate: Date // 购买日期
purchasePrice: number // 购买金额(元)
engineNumber: string // 发动机号
remark: string // 备注
}
// 车辆信息录入 API
export const CarinfoApi = {
// 查询车辆信息录入分页
getCarinfoPage: async (params: any) => {
return await request.get({ url: `/home/carinfo/page`, params })
},
// 查询车辆信息录入详情
getCarinfo: async (id: number) => {
return await request.get({ url: `/home/carinfo/get?id=` + id })
},
// 新增车辆信息录入
createCarinfo: async (data: CarinfoVO) => {
return await request.post({ url: `/home/carinfo/create`, data })
},
// 修改车辆信息录入
updateCarinfo: async (data: CarinfoVO) => {
return await request.put({ url: `/home/carinfo/update`, data })
},
// 删除车辆信息录入
deleteCarinfo: async (id: number) => {
return await request.delete({ url: `/home/carinfo/delete?id=` + id })
},
// 导出车辆信息录入 Excel
exportCarinfo: async (params) => {
return await request.download({ url: `/home/carinfo/export-excel`, params })
},
}