import { main, User } from '@/api'
import request from '@/utils/require'

// 分页
export function dataReviseOrderPage(data) {
    return request({
        url: `${main}/client/dataReviseOrder/page/${data.pageNum}/${data.pageSize}`,
        method: 'post',
        data: data,
    })
}
// 新增
export function dataReviseOrderAdd(data) {
    return request({
        url: `${main}/client/dataReviseOrder/add`,
        method: 'post',
        data: data,
    })
}
// 修改
export function dataReviseOrderUpdate(data) {
    return request({
        url: `${main}/client/dataReviseOrder/update`,
        method: 'post',
        data: data,
    })
}

//详情
export function dataReviseOrderInfo(id) {
    return request({
        url: `${main}/client/dataReviseOrder/info/${id}`,
        method: 'get',
    })
}

//添加问题描述项
export function addProblem(data) {
    return request({
        url: `${main}/client/dataReviseOrder/add_problem`,
        method: 'post',
        data: data,
    })
}


//问题处理
export function addSolve(data) {
    return request({
        url: `${main}/client/dataReviseOrder/add_solve`,
        method: 'post',
        data: data,
    })
}
// 根据工单主表id， 查询所有的追加问题
export function listProblem(data) {
    return request({
        url: `${main}/client/dataReviseOrder/list_problem?id=${data.id}`,
        method: 'get',
    })
}

//根据工单主表id， 查询所有的问题处理
export function listSolve(data) {
    return request({
        url: `${main}/client/dataReviseOrder/list_solve?id=${data.id}`,
        method: 'get',
    })
}

//处室下拉

export function findByOrgCodes(data) {
    return request({
        url: `${User}/department/findByOrgCodes?OrgCodes=LS001&deptType=10330000`,
        method: 'post',
    })
}
//导出数据删改单
export function exportDataReviseOrderExcel(data) {
    return request({
        url: `${main}/client/dataReviseOrder/export_data_revise_order_excel`,
        method: 'post',
        responseType: "blob",
        data,
    })
}




