2025-10-23 15:38:39 +08:00
|
|
|
|
import type { AddInventoryRecordParams, BatchAddInventoryParams, BindEbikeParams } from './types/operator'
|
2025-10-15 16:03:42 +08:00
|
|
|
|
import { http } from '@/http/http'
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取运营商列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getOperatorAllListAPI() {
|
|
|
|
|
|
return http.get<any>('/staff/ebikeOperator/list')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 添加库存
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function addOperatorAPI(data: AddInventoryRecordParams) {
|
|
|
|
|
|
return http.post<any>('/operations/ebikeInventory/addInventory', data)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 库存总览
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getInventoryOverviewAPI() {
|
|
|
|
|
|
return http.get<any>('/operations/ebikeInventory/list')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 批量入库
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function batchAddInventoryAPI(data: BatchAddInventoryParams) {
|
|
|
|
|
|
return http.post<any>('/operations/ebikeEcuInfo/batchSave', data)
|
|
|
|
|
|
}
|
2025-10-23 15:38:39 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 中控总览
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getEcuOverviewAPI() {
|
|
|
|
|
|
return http.get<any>('/operations/ebikeEcuInfo/overview')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 整车绑定
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function bindEbikeAPI(data: BindEbikeParams) {
|
|
|
|
|
|
return http.post<any>('/operations/ebikeBikeInfo/bind', data)
|
|
|
|
|
|
}
|
2025-12-02 11:03:41 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户获取车辆详情
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getEbikeDetailAPI(bikeCode: string) {
|
|
|
|
|
|
return http.get<any>(`/operations/ebikeBikeInfo/api/bikeInfo`, { bikeCode })
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 更换电池(换电工单用)
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function postOperatoringChangeBatteryAPI(data: {
|
|
|
|
|
|
bikeCode: string
|
|
|
|
|
|
batteryCode: string
|
|
|
|
|
|
}) {
|
|
|
|
|
|
return http.post<any>('/operations/ebikeBikeOrder/batteryChange', data)
|
|
|
|
|
|
}
|
2025-12-04 17:26:59 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*
|
|
|
|
|
|
车辆详情(工单用)
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getEbikeDetailForWorkAPI(bikeCode: string) {
|
|
|
|
|
|
return http.get<any>(`/operations/ebikeBikeOrder/bikeInfo`, { bikeCode })
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*
|
|
|
|
|
|
查询所有运营区域表
|
|
|
|
|
|
*/
|
|
|
|
|
|
export function getAllOperatorRegionAPI() {
|
|
|
|
|
|
return http.get<any>(`/operations/ebikeRegion/list`)
|
|
|
|
|
|
}
|