| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- /**
- * 工作台详情接口
- */
- 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
- })
- }
|