| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- /**
- * 工作台详情接口
- */
- import { request } from '../../utils/request'
- import type { acceptOrderInfo, acceptOrderInfo2 } from '../../types/order'
- /**
- * 根据 ID 获取维保工单详情
- * @param id 工单 ID
- */
- export const getOrderInfoById = (id: string): Promise<any> => {
- return request({
- url: `/mobile/order/${id}`,
- method: 'GET'
- })
- }
- /**
- * 根据 ID 获取维修工单详情
- * @param id 工单 ID
- */
- export const getRepairOrderInfoById = (id: string): Promise<any> => {
- return request({
- url: `/mobile/order/repairOrder/${id}`,
- method: 'GET'
- })
- }
- // 接单(支持一次性选择处理人员和检修人员)
- export const acceptOrder = (gxtWorkOrder: acceptOrderInfo2 | null): Promise<any> => {
- const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/accept`,
- method: 'PUT',
- data: data
- })
- }
- // 挂起
- export const suspendOrder = (gxtWorkOrder: acceptOrderInfo | null): Promise<any> => {
- const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/suspend`,
- method: 'PUT',
- data: data
- })
- }
- // 审批
- export const approveOrder = (gxtWorkOrder: acceptOrderInfo2 | null): Promise<any> => {
- const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/approve`,
- method: 'PUT',
- data: data
- })
- }
- //
- export const resumeOrder = (gxtWorkOrder: acceptOrderInfo | null): Promise<any> => {
- const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/resume`,
- method: 'PUT',
- data: data
- })
- }
- export const returnRepairOrder = (gxtWorkOrder: UTSJSONObject | null): Promise<any> => {
- // const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- // const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/returnRepairOrder`,
- method: 'PUT',
- data: gxtWorkOrder
- })
- }
- export const resetAndStart = (gxtWorkOrder: UTSJSONObject | null): Promise<any> => {
- // const plainObject = gxtWorkOrder != null ? JSON.parse(JSON.stringify(gxtWorkOrder)) : null;
- // const data: UTSJSONObject | null = plainObject as UTSJSONObject;
- return request({
- url: `/mobile/order/resetAndStart`,
- method: 'PUT',
- data: gxtWorkOrder
- })
- }
- // 维保工单结单
- export const finishOrder = (gxtWorkOrder: UTSJSONObject | null): Promise<any> => {
- return request({
- url: `/mobile/order/finish`,
- method: 'PUT',
- data: gxtWorkOrder
- })
- }
- // 维修工单结单
- export const repairFinishOrder = (gxtWorkOrder: UTSJSONObject | null): Promise<any> => {
- return request({
- url: `/mobile/order/repairFinish`,
- method: 'PUT',
- data: gxtWorkOrder
- })
- }
- // 维保工单停机
- export const shutdownOrder = (gxtWorkOrder: UTSJSONObject | null): Promise<any> => {
- return request({
- url: `/mobile/order/shutdown`,
- method: 'PUT',
- data: gxtWorkOrder
- })
- }
|