/** * @desc 获取报废出库申请单 */ import { defaultSuccess, defaultError, http } from '@/plugins/axios' import type { AxiosResponse } from 'axios' export default async function ( /** 申请单ID */ applyId: number, success: (data: Array) => void = defaultSuccess, fail: (error: { code: string; error?: string }) => void = defaultError, ): Promise { return http({ method: 'get', url: `/scrap-out/${applyId}`, }) .then((data: AxiosResponse, unknown>) => { success(data.data) }) .catch((error: { code: string; error?: string }) => fail(error)) }