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

export default {
  paging(data: SalesOrderTypes.SearchSalesOrderParam) {
    return get<G.PageResult<SalesOrderTypes.SearchSalesOrderResult>>('/sales_order/paging', data)
  },
  detail(id: string) {
    return get<SalesOrderTypes.SearchSalesOrderResult>('/sales_order/detail', {id})
  },
  add(data: SalesOrderTypes.AddSalesOrderParam) {
    return post('/sales_order/add', data)
  },
  modify(data: SalesOrderTypes.ModifySalesOrderParam) {
    return post('/sales_order/modify', data)
  },
  del(ids: string[]) {
    return post('/sales_order/del', ids)
  },
}
