/*
 * @Author: zc
 * @description 业务管理-工单延期
 */
import request from '@/utils/request';

/**
 * @description 申请延期
 * @param data
 */
export const delayApply = (data: object) => {
    return request({
        url: `/api/v1/Order/delay`,
        method: 'post',
        data
    });
};
/**
 * @description 延期工单列表
 * @param {object} params
 */
export const delayList = (params: object) => {
    return request({
        url: `/api/v1/Order/delay`,
        method: 'get',
        params
    });
};
/**
 * @description 可申请延期基础信息
 */
export const delayBaseData = () => {
    return request({
        url: `/api/v1/Order/delay/basedata`,
        method: 'get'
    });
};
/**
 * @description 延期详情
 * @param id
 */
export const delayDetail = (id: string) => {
    return request({
        url: `/api/v1/Order/delay/${id}`,
        method: 'get'
    });
};
/**
 * @description 延期计算期满时间
 * @param {object} data
 */
export const delayCalcEndTime = (data: object) => {
    return request({
        url: `/api/v1/Order/delay/calc-endtime`,
        method: 'post',
        data
    });
};
/**
 * @description 获取延期参数
 */
export const workflowDelayParams= () => {
    return request({
        url: `/api/v1/Order/delay/startflow`,
        method: 'get'
    });
};
/**
 * @description 延期审批参数
 * @param {string} workflowId
 */
export const delayApproveParams = (workflowId:string) => {
    return request({
        url: `/api/v1/Order/delay/${workflowId}/nextsteps`,
        method: 'get'
    });
}
/**
 * @description 延期修改
 * @param {object} data
 */
export const delayModify = (data: object) => {
    return request({
        url: `/api/v1/Order/delay/initial_nextFlow`,
        method: 'post',
        data
    });
}