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

export default {
  paging(data: OrderTypes.SearchOrderParam) {
    return get<G.PageResult<OrderTypes.SearchOrderResult>>("/order/paging", data);
  },
  detail(id: string) {
    return get<OrderTypes.SearchOrderResult>("/order/detail", { id });
  },
  add(data: OrderTypes.AddOrderParam) {
    return post("/order/add", data);
  },
  modify(data: OrderTypes.ModifyOrderParam) {
    return post("/order/modify", data);
  },
  del(ids: string[]) {
    return post("/order/del", ids);
  },
  assignmentOrg(data: any) {
    return post("/order/assignmentOrg", data);
  },
  orderTrans(data: OrderTypes.SearchOrderParam) {
    return get<G.PageResult<OrderTypes.SearchOrderResult>>("/order_trans/paging", data);
  },
};
