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)
}