import request from '@/utils/require'
import { cwbb,baseServer,dict,irpt } from '@/api/index'

//获取品种字典表
export function getPzOptions(data) {
	return request({
		url: `${dict}/dataDictionary/getDataGroup?groupId=PM001&pdictCode=22`,
		method: 'get',
	})
}
//生成审批列表页
export function subsidyapprovalList(data) {
    return request({
      url: `${cwbb}/rotation-report/subsidy/approval/${data.type}/list`,
      method: 'get',
      data:data
    })
  }
//管理端列表页

export function subsidyList(data) {
    return request({
      url: `${cwbb}/rotation-report/rotation-report/subsidy/list1/${data.pageNum}/${data.pageSize}`,
      method:'post',
	  data:data
    })
  }
//预算补贴修改，盖章，接收，撤销

export function subsidyUpdate(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/${data.type}/update`,
		method: 'put',
    data:data
	})
}
//包干轮换补贴详情

export function subsidyInfo(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/info/${data.rsId}`,
		method: 'get'
	})
}
//包干轮换补贴--审批列表
export function subsidySummaryList(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/list/${data.pageNum}/${data.pageSize}`,
		method: 'post',
		data:data
	})
}
//生成审批列表---获取审批生成企业

export function subsidyApprovalList(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/approval/${data.type}/list`,
		method: 'get'
	})
}
//生成审批汇总表

export function subsidysummaryInit(data,val) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/${val.type}/init`,
		method: 'post',
		data:data
	})
}
//预算审批表--保存
export function subsidysummarySave(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/${data.type}/save`,
		method: 'post',
		data:data
	})
}
//审批表---修改--审核

export function subsidysummaryUpdate(data,type) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/update/${type}`,
		method: 'put',
		data:data
	})
}
//审批表--详情

export function subsidysummaryInfo(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/info/${data.id}`,
		method: 'get'
	})
}
//审批表--删除

export function subsidysummaryDelete(data) {
	return request({
		url: `${cwbb}/rotation-report/subsidy/summary/delete/${data.id}`,
		method: 'delete'
	})
}