import type { SystemStorageApi } from '#/api/system/storage';
|
|
import { requestClient } from '#/api/request';
|
|
export namespace ResearchFundRecordApi {
|
/** 经费拨付记录 */
|
export interface FundRecord {
|
id?: number;
|
applicationId: number; // 关联课题申报书 ID
|
batchName?: string; // 拨付批次,如「第一期」
|
amount: number; // 拨付金额(元)
|
payDate?: string; // 拨付日期
|
payee?: string; // 收款单位/账户名
|
status?: number; // 拨付状态,字典 research_fund_status(0-待拨付 15-报销审批中 20-已拨付 30-已驳回)
|
reimbursementId?: number; // 关联财务报销单 ID
|
reimbursementNo?: string; // 关联财务报销单号
|
rejectReason?: string; // 财务报销驳回原因(BPM 回写)
|
rejectTime?: string; // 财务报销驳回时间
|
remark?: string; // 备注
|
creator?: string; // 创建人 ID
|
creatorName?: string; // 创建人姓名
|
createTime?: string; // 创建时间
|
attachmentList?: SystemStorageApi.StorageBlob[]; // 凭证附件列表
|
hasAttachment?: boolean; // 是否有凭证附件
|
blobIds?: number[]; // 提交时的凭证附件 ID 列表(全量)
|
}
|
}
|
|
/** 查询某课题申报书的经费拨付记录列表 */
|
export function getFundRecordList(applicationId: number) {
|
return requestClient.get<ResearchFundRecordApi.FundRecord[]>(
|
'/research/fund-record/list',
|
{ params: { applicationId } },
|
);
|
}
|
|
/** 登记经费拨付记录(登记后自动生成并提交财务报销审批) */
|
export function createFundRecord(data: ResearchFundRecordApi.FundRecord) {
|
return requestClient.post('/research/fund-record/create', data);
|
}
|
|
/** 修改并重新发起报销(仅「待拨付」「已驳回」可改) */
|
export function updateFundRecord(data: ResearchFundRecordApi.FundRecord) {
|
return requestClient.put('/research/fund-record/update', data);
|
}
|
|
/** 删除经费拨付记录(仅待拨付可删) */
|
export function deleteFundRecord(id: number) {
|
return requestClient.delete('/research/fund-record/delete', {
|
params: { id },
|
});
|
}
|