import request from '@/utils/request'
import { PageType, StrAnyObj } from '@/typings'

// 合同详情分页
export function getPageApi(params: StrAnyObj): Promise<PageType<StrAnyObj>> {
  return request.get('/contractDetail/getPage', params)
}

// 合同详情明细
export function getDetailApi(params: StrAnyObj): Promise<StrAnyObj> {
  return request.get('/contractDetail/getDetail', params)
}

// 合同详情新增
export function addApi(data: StrAnyObj): Promise<void> {
  return request.post('/contractDetail/add', data)
}

// 合同详情编辑
export function editApi(data: StrAnyObj): Promise<void> {
  return request.post('/contractDetail/edit', data)
}

// 合同详情删除
export function deleteApi(data: StrAnyObj): Promise<void> {
  return request.post('/contractDetail/delete', data)
}