import request from '@/utils/request'

// 查询费用结算申请列表
export function getSltAgreementInfo(query) {
    return request({
      url: '/material/slt_agreement_info/getSltAgreementInfo4Project',
      method: 'get',
      params: query
    })
}

// 查询未结算费用报表---list列表
export function getSltReportList(query) {
  return request({
    url: '/material/slt_agreement_info/getSltReportList',
    method: 'get',
    params: query
  })
}

// 查询材料站费用结算申请列表
export function getClzSltAgreementInfo(query) {
  return request({
    url: '/material/material_sltAgreementInfo/getSltAgreementInfo4Project',
    method: 'get',
    params: query
  })
}

// 查询费用结算申请详情
export function getSltInfo(params){
  return request({
    url: '/material/slt_agreement_info/getSltInfo',
    method: 'post',
    data: params
  })
}

// 协议书详情
export function getSltAgreementBookApi(data){
  return request({
    url: '/material/slt_agreement_info/getSltAgreementBook',
    method: 'post',
    data: data
  })
}

// 更新协议书编号
export function updateSltBookCodeById(data){
  return request({
    url: '/material/slt_agreement_info/updateSltBookCodeById',
    method: 'post',
    data: data
  })
}

// 查询材料站结算待审核详情（仅需 sltApplyCode）
export function getClzSettledInfo(sltApplyCode) {
  return request({
    url: '/material/material_sltAgreementInfo/getSettledInfo',
    method: 'get',
    params: { sltApplyCode }
  })
}

// 查询材料站费用结算申请详情
export function getClzSltInfo(params){
  return request({
    url: '/material/material_sltAgreementInfo/getSltInfo',
    method: 'post',
    data: params
  })
}


// 费用结算申请提交
export function submitFee(params){
  return request({
    url: '/material/slt_agreement_info/submitFee',
    method: 'post',
    data: params
  })
}

// 材料站费用结算申请提交
export function submitClzFee(params){
  return request({
    url: '/material/material_sltAgreementInfo/submitFee',
    method: 'post',
    data: params
  })
}

// 查询费用结算审核列表
export function getSltExam(query) {
  return request({
    url: '/material/slt_agreement_info/getSltExam',
    method: 'get',
    params: query
  })
}


// 查询费用结算审核列表
export function getSltExamInfo(query) {
  return request({
    url: '/material/slt_agreement_info/getSltExamInfo',
    method: 'get',
    params: query
  })
}

// 费用结算审核-同意拒绝
export function settlementReview(query) {
  return request({
    url: '/material/slt_agreement_info/settlementReview',
    method: 'get',
    params: query
  })
}

// 费用结算提交
export function submitCosts(params){
  return request({
    url: '/material/slt_agreement_info/submitCosts',
    method: 'post',
    data: params
  })
}

// 材料站费用结算提交
export function submitClzCosts(params){
  return request({
    url: '/material/material_sltAgreementInfo/submitCosts',
    method: 'post',
    data: params
  })
}

// 查询结算审批列表
export function getSltList(query) {
  return request({
    url: '/material/slt_agreement_info/getSltList',
    method: 'get',
    params: query
  })
}

// 查询材料站的结算审批列表
export function getClzSltList(query) {
  return request({
    url: '/material/material_sltAgreementInfo/getSltList',
    method: 'get',
    params: query
  })
}

// 查询已结算报表列表
export function getSltReportedList(params){
  return request({
    url: '/material/slt_agreement_info/getSltReportedList',
    method: 'get',
    params: params
  })
}

// 结算审批提交
export function costExamine(params){
  return request({
    url: '/material/slt_agreement_info/costExamine',
    method: 'post',
    data: params
  })
}

// 材料站结算审批提交
export function clzCostExamine(params){
  return request({
    url: '/material/material_sltAgreementInfo/costExamine',
    method: 'post',
    data: params
  })
}

// 查询减免费用列表
export function getReliefList(query) {
  return request({
    url: '/material/slt_agreement_reduce/applyByParam',
    method: 'get',
    params: query
  })
}

// 减免费用提交
export function addRelief(params){
  return request({
    url: '/material/slt_agreement_reduce/addApply',
    method: 'post',
    data: params
  })
}

// 减免费用详情
export function getDiscountViewList(id) {
  return request({
    url: '/material/derateRecordQuery/' + id,
    method: 'get'
  })
}


// 减免费用修改
export function editRelief(params){
  return request({
    url: '/material/slt_agreement_reduce/editApply',
    method: 'post',
    data: params
  })
}

// 查询费用结算申请详情
export function getProjectListByUnitIds(params){
  return request({
    url: '/material/slt_agreement_info/getProjectListByUnitIds',
    method: 'post',
    data: params
  })
}

// 查询材料站的工程列表，根据班组ids
export function getClzProjectListByUnitIds(params){
  return request({
    url: '/material/material_sltAgreementInfo/getProjectListByUnitIds',
    method: 'post',
    data: params
  })
}


// 协议
export function getAgreementInfoById(data) {
  return request({
    url: '/material/slt_agreement_info/getAgreementInfoById',
    method: 'post',
    data: data,
  })
}


// 材料站获取协议
export function getClzAgreementInfoById(data) {
  return request({
    url: '/material/material_sltAgreementInfo/getAgreementInfoById',
    method: 'post',
    data: data,
  })
}

// 查询丢失费用报表列表
export function getLostReportList(query) {
  return request({
    url: '/material/slt_agreement_info/getLostReportList',
    method: 'get',
    params: query
  })
}

// 查询维修费用报表列表
export function getRepairReportList(query) {
  return request({
    url: '/material/slt_agreement_info/getRepairReportList',
    method: 'get',
    params: query
  })
}

// 查询报废费用报表列表
export function getScrapReportList(query) {
  return request({
    url: '/material/slt_agreement_info/getScrapReportList',
    method: 'get',
    params: query
  })
}

// 查询租赁费用区间报表列表
export function getLeaseCostRangeReportList(query) {
  return request({
    url: '/material/slt_agreement_info/leasePeriodCostList',
    method: 'get',
    params: query
  })
}

// 查询租赁费用明细详情
export function getLeaseCostDetails(query) {
  return request({
    url: '/material/slt_agreement_info/leasePeriodCostDetails',
    method: 'get',
    params: query
  })
}

// 维修单查看
export function viewRepairCodeApi(query) {
  return request({
    url: '/material/slt_agreement_info/viewRepairCode',
    method: 'get',
    params: query
  })
}

// 查询历史报表列表（按年月）
export function getHistoryReportList(query) {
  return request({
    url: '/material/slt_agreement_info/getHistoryReportList',
    method: 'get',
    params: query
  })
}

// 查询历史租赁费用详情
export function getHistoryLeaseCostDetails(query) {
  return request({
    url: '/material/slt_agreement_info/getHistoryLeaseCostDetails',
    method: 'get',
    params: query
  })
}

// 查询历史维修费用详情
export function getHistoryRepairCostDetails(query) {
  return request({
    url: '/material/slt_agreement_info/getHistoryRepairCostDetails',
    method: 'get',
    params: query
  })
}

// 查询历史丢失费用详情
export function getHistoryLoseCostDetails(query) {
  return request({
    url: '/material/slt_agreement_info/getHistoryLoseCostDetails',
    method: 'get',
    params: query
  })
}

// 查询历史报废费用详情
export function getHistoryScrapCostDetails(query) {
  return request({
    url: '/material/slt_agreement_info/getHistoryScrapCostDetails',
    method: 'get',
    params: query
  })
}

// 查询资产占有月度报表列表
export function getAssestsReportList(query) {
  return request({
    url: '/material/bm_report/getAssetReportList',
    method: 'get',
    params: query
  })
}

// 导出zip进行导出
export function getExportZipUnsettled(data) {
  return request({
    url: '/material/slt_agreement_info/exportUnsettled',
    method: 'post',
    data: data,
  })
}

// 导出zip获取进度
export function getExportZipProgress(data) {
  return request({
    url: '/material/slt_agreement_info/exZipProgress',
    method: 'post',
    data: data,
  })
}

// 结算-维修单-详情
export function getRepairDetailsListApi(query) {
  return request({
    url: '/material/repair/getRepairDetailsList',
    method: 'get',
    params: query
  })
}
