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

// 保证金退还通知单 refundNotice
export function getRefundNotice(data) {
  return request({
      url: `${main}/transaction/refundNotice/page/${data.pageNum}/${data.pageSize}`,
      method: 'post',
      data
  })
}
// 获取合同列表
export function getContractPage(data) {
  return request({
      url: `${main}/transaction/refundNotice/contractPage/${data.pageNum}/${data.pageSize}`,
      method: 'post',
      data
  })
}
// 全部履约-新增通知单
export function addRefundNotice(data) {
  return request({
      url: `${main}/transaction/refundNotice/save`,
      method: 'post',
      data
  })
}
// 全部履约-修改通知单
export function editRefundNotice(data,type) {
  return request({
      url: `${main}/transaction/refundNotice/update/${type}`,
      method: 'post',
      data
  })
}
// 未履约-新增说明函
export function addRefundLetter(data) {
  return request({
      url: `${main}/transaction/refundNotice/letter/save`,
      method: 'post',
      data
  })
}
// 未履约-修改说明函
export function editRefundLetter(data,type) {
  return request({
      url: `${main}/transaction/refundNotice/letter/update/${type}`,
      method: 'post',
      data
  })
}

// 获取品种列表
export function getVarietyList() {
  return request({
    // url: `${dict}/dataDictionary/findByPDictCode/${pdictCode}`,
    url: `${dict}/dataDictionary/getDataGroup?groupId=PM001&pdictCode=22`,
    method: 'get',
  })
}
