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

export default {
  paging(data: TransTypes.SearchTransParam) {
    return get<G.PageResult<TransTypes.SearchTransResult>>("/order_trans/paging", data);
  },
  detail(id: string) {
    return get<TransTypes.SearchTransResult>("/order_trans/detail", { id });
  },
  add(data: TransTypes.AddTransParam) {
    return post("/order_trans/add", data);
  },
  modify(data: TransTypes.ModifyTransParam) {
    return post("/order_trans/modify", data);
  },
  del(ids: string[]) {
    return post("/order_trans/del", ids);
  },

  coming(data: TransTypes.InOutResult) {
    return post("/order/truck_coming", data);
  },

  leaving(data: TransTypes.InOutResult) {
    return post("/order/truck_leaving", data);
  },

  check(data: TransTypes.CheckResult) {
    return post("/order/check", data);
  },
};
