import { useRequest } from '@/use/useHttp'

/**
 * 获取自定义码单详情
 * @returns
 */
export const GetCustomCodeDetailApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint',
    method: 'get',
  })
}

/**
 * 获取自定义码单列表
 * @returns
 */
export const GetCustomCodeLApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint/list',
    method: 'get',
  })
}

/**
 * 获取初始化自定义码单
 * @returns
 */
export const GetCustomCodeInitApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint/init',
    method: 'get',
  })
}

/**
 * 更新自定义码单
 * @returns
 */
export const UpdateCustomCodeApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint',
    method: 'put',
  })
}

/**
 * 新建自定义码单
 * @returns
 */
export const CreateCustomCodeApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint/add',
    method: 'post',
  })
}

/**
 * 计算合计信息
 * @returns
 */
export const CustomPrintCalculationApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint/calculation',
    method: 'post',
  })
}

/**
 * 删除自定义码单
 * @returns
 */
export const DeleteCustomCodeApi = () => {
  return useRequest({
    url: '/v1/mall/customPrint',
    method: 'delete',
  })
}
