import {
  get,
  post
} from '@/common/utils/http-util.ts'

export default {
  paging(data: PurchaseOrderTypes.SearchPurchaseOrderParam) {
    return get<G.PageResult<PurchaseOrderTypes.SearchPurchaseOrderResult>>('/purchase_order/paging', data)
  },
  detail(id: string) {
    return get<PurchaseOrderTypes.SearchPurchaseOrderResult>('/purchase_order/detail', {id})
  },
  add(data: PurchaseOrderTypes.AddPurchaseOrderParam) {
    return post('/purchase_order/add', data)
  },
  modify(data: PurchaseOrderTypes.ModifyPurchaseOrderParam) {
    return post('/purchase_order/modify', data)
  },
  del(ids: string[]) {
    return post('/purchase_order/del', ids)
  },
}
