// @ts-ignore
/* eslint-disable */
import request from "../request";

/** 创建经销商账款明细 POST /operation/createDealerAccountRecord */
export async function createDealerAccountRecord(
  body: BusinessAPI.DealerAccountRecordCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
    "/operation/createDealerAccountRecord",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商账款明细删除 DELETE /operation/destroyDealerAccountRecord */
export async function destroyDealerAccountRecord(
  body: BusinessAPI.DealerAccountRecordDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>(
    "/operation/destroyDealerAccountRecord",
    {
      method: "DELETE",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商账款明细列表 GET /operation/listDealerAccountRecord */
export async function listDealerAccountRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listDealerAccountRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseDealerAccountRecordVO>(
    "/operation/listDealerAccountRecord",
    {
      method: "GET",
      params: {
        ...params,
        dealerAccountRecordListQry: undefined,
        ...params["dealerAccountRecordListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商账款明细列表 GET /operation/pageDealerAccountRecord */
export async function pageDealerAccountRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageDealerAccountRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseDealerAccountRecordVO>(
    "/operation/pageDealerAccountRecord",
    {
      method: "GET",
      params: {
        ...params,
        dealerAccountRecordPageQry: undefined,
        ...params["dealerAccountRecordPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商账款明细详情 GET /operation/showDealerAccountRecord */
export async function showDealerAccountRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showDealerAccountRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
    "/operation/showDealerAccountRecord",
    {
      method: "GET",
      params: {
        ...params,
        dealerAccountRecordShowQry: undefined,
        ...params["dealerAccountRecordShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商账款明细更新 PUT /operation/updateDealerAccountRecord */
export async function updateDealerAccountRecord(
  body: BusinessAPI.DealerAccountRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
    "/operation/updateDealerAccountRecord",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商账款明细更新 PATCH /operation/updateDealerAccountRecord */
export async function updateDealerAccountRecord1(
  body: BusinessAPI.DealerAccountRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
    "/operation/updateDealerAccountRecord",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
