diff --git a/env/.env b/env/.env index 3696e28..7ba4993 100644 --- a/env/.env +++ b/env/.env @@ -12,7 +12,7 @@ VITE_APP_PUBLIC_BASE=/ # 后台请求地址 # http://192.168.101.20:10010 # https://www.cdzhuojing.cn/ebike 外网 -VITE_SERVER_BASEURL = 'http://192.168.101.18:10010' +VITE_SERVER_BASEURL = 'https://www.cdzhuojing.cn/ebike' # 备注:如果后台带统一前缀,则也要加到后面,eg: https://ukw0y1.laf.run/api # 注意,如果是微信小程序,还有一套请求地址的配置,根据 develop、trial、release 分别设置上传地址,见 `src/utils/index.ts`。 diff --git a/src/App.vue b/src/App.vue index ae126ef..acd3e1a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,7 +19,7 @@ onShow((options) => { navigateToInterceptor.invoke({ url: '/' }) } - // appStore.autoLogin() + appStore.autoLogin() }) onHide(() => { console.log('App Hide') diff --git a/src/api/operator.ts b/src/api/operator.ts index a03ff60..cc1a594 100644 --- a/src/api/operator.ts +++ b/src/api/operator.ts @@ -1,4 +1,13 @@ -import type { AddInventoryRecordParams, AddSite, BatchAddInventoryParams, BindEbikeParams, CompleteInspectionWorkParams, CompleteMaintainType, CurrentLocationType } from './types/operator' +import type { + AddInventoryRecordParams, + AddSite, + BatchAddInventoryParams, + BindEbikeParams, + completeDispatchWorkType, + CompleteInspectionWorkParams, + CompleteMaintainType, + CurrentLocationType, +} from './types/operator' import { http } from '@/http/http' /** @@ -138,3 +147,24 @@ export function updateSiteAPI(data: AddSite) { export function deleteSiteAPI(query: { siteId: string }) { return http.get(`/operations/ebikeSite/remove`, query) } + +/** + *完成调度工单 + */ +export function completeDispatchWorkAPI(data: completeDispatchWorkType) { + return http.post(`/operations/ebikeBikeOrder/bikeDispatch`, data) +} + +/** + *生成换电工单 + */ +export function createChangeOrderAPI(ecuSn: string) { + return http.get(`/operations/ebikeBikeOrder/batterySwapOrder`, { ecuSn }) +} + +/** + *生成调度工单 + */ +export function createDispatchOrderAPI(bikeCode: string) { + return http.get(`/operations/ebikeBikeOrder/dispatchSwapOrder`, { bikeCode }) +} diff --git a/src/api/types/operator.ts b/src/api/types/operator.ts index ed27192..317df43 100644 --- a/src/api/types/operator.ts +++ b/src/api/types/operator.ts @@ -67,3 +67,11 @@ export interface AddSite { siteType: number | string sitePolygon: CurrentLocationType } + +// +export interface completeDispatchWorkType { + bikeCode: string + remarks?: string + fileUrls?: string[] + siteId: string +} diff --git a/src/pages-sub/warehouse/dispatch/dispatch.vue b/src/pages-sub/warehouse/dispatch/dispatch.vue index d7deb23..0554fd6 100644 --- a/src/pages-sub/warehouse/dispatch/dispatch.vue +++ b/src/pages-sub/warehouse/dispatch/dispatch.vue @@ -1,4 +1,5 @@