import request from '@/apps/mobile/utils/request'

// 抽成设置 新增提交
export function addData(data) {
    return request({
        method: 'post',
        url: '/api/commissionSettings/insert',
        data,
    });
}


// 新增保存
export function addDataSave(data) {
    return request({
        method: 'post',
        url: '/api/commissionSettings/insert-save',
        data,
    });
}
// 删除
export function removeData(data) {
    return request({
        method: 'delete',
        url: '/api/commissionSettings/delete-batch',
        data,
    });
}

// 编辑
export function editData(data) {
    return request({
        method: 'put',
        url: '/api/commissionSettings/update',
        data,
    });
}


// 审批
export function examine(data) {
    return request({
        method: 'post',
        url: `/api/commissionSettings/examine`,
        data
    });
}

// 提交操作
export function submitData(id) {
    return request({
        method: 'post',
        url: `/api/commissionSettings/submit/${id}`,
    });
}

// 查询最新的版本
export function queryNew() {
    return request({
        method: 'get',
        url: `/api/commissionSettings/query-new`,
    });
}

// 查询历史版版本
export function queryHistory() {
    return request({
        method: 'get',
        url: `/api/commissionSettings/query-history`,
    });
}

// 查询所有待提交的
export function queryCommit() {
    return request({
        method: 'get',
        url: `/api/commissionSettings/query-commit`,
    });
}

// 查询所有待审核的
export function queryStay() {
    return request({
        method: 'get',
        url: `/api/commissionSettings/query-stay`,
    });
}