import request from '@/utils/request';

//设备型号下拉框
export async function equipmentModelList(params) {
    return request('/wms/ngic-equipment-asset/equipmentModel/query/selection', {
        method: 'POST',
        data: params,
    });
}

//设备型号--(保养标准页面)下拉框
export async function equipmentMaintainModelList(params) {
    return request('/wms/ngic-equipment-asset/equipmentModel/query/selection/maintainStandard', {
        method: 'POST',
        data: params,
    });
}
//设备型号--(点检标准页面)下拉框
export async function equipmentCheckModelList(params) {
    return request('/wms/ngic-equipment-asset/equipmentModel/query/selection/checkStandard', {
        method: 'POST',
        data: params,
    });
}
//根据设备型号id查询是寿命件的备件
export async function lifespareSelect(params) {
    return request(`/wms/ngic-equipment-asset/equipmentModelSpare/liveparts/selectionbox/byEquipmentModelId`, {
        method: 'POST',
        data: params
    });
}
//备件下拉框
export async function mdmSpareList(params) {
    return request(`/wms/ngic-spare-parts/mdmSpareParts/mdmSpareList`, {
        method: 'POST',
        data: params
    });
}
//设备供应商详情
export async function deviceprovideDetail(params) {
    return request('/wms/ngic-auth/sysSupplier/query/detail', {
        method: 'POST',
        data: params,
    });
}
//供应商下拉框
export async function equipmentSupplierList(params) {
    return request('/wms/ngic-equipment-asset/equipmentSupplier/query/selection', {
        method: 'POST',
        data: params,
    });
}
//设备供应商删除前校验
export async function deleteProvideCheck(params) {
    return request('/wms/ngic-equipment-asset/equipmentSupplier/deleteById', {
        method: 'POST',
        data: params,
    });
}
//设备信息
export async function equipmentDetail(params) {
    return request('/wms/ngic-equipment-asset/equipment/queryDetail', {
        method: 'POST',
        data: params,
    });
}
//查询父设备id和子设备id，添加子设备时使用
export async function equipmentChildren(params) {
    return request('/wms/ngic-equipment-asset/equipment/queryChildren', {
        method: 'POST',
        data: params,
    });
}
//履历详情
export async function equipmentLogDetail(params) {
    return request('/wms/ngic-equipment-asset/equipmentLog/query/detail', {
        method: 'POST',
        data: params,
    });
}
//设备类型树查询
export async function deviceTypequeryTreeList(params) {
    return request(`/wms/ngic-equipment-asset/equipmentType/queryTreeList`, {
        method: 'POST',
        data: params,
    });
}
//设备详情
export async function equipmentAllDetail(params) {
    return request('/wms/ngic-equipment-asset/equipment/query/all/detail', {
        method: 'POST',
        data: params,
    });
}
//设备型号详情
export async function equipmentModelDetails(params) {
    return request('/wms/ngic-equipment-asset/equipmentModelSpare/queryById', {
        method: 'POST',
        data: params,
    });
}

//设备下拉框
export async function equipmentList(params) {
    return request('/wms/ngic-equipment-asset/equipment/query/selection', {
        method: 'POST',
        data: params,
    });
}
//IOT设备下拉框
export async function equipmentIotRelationList(params) {
    return request('/wms/ngic-equipment-asset/equipmentIotRelation/query/device/selection', {
        method: 'POST',
        data: params,
    });
}

//设备下拉框（过滤已报修）
export async function canApplyRepair(params) {
    return request('/wms/ngic-equipment-repair/omEquipmentApplyRepair/canApplyRepair/equipmens/selection', {
        method: 'POST',
        data: params,
    });
}

//关联备件
export async function equipmentModelSpareImport(params) {
    return request('/wms/ngic-equipment-asset/equipmentModelSpare/importExcel', {
        method: 'POST',
        data: params,
        type: "form"
    });
}