Files
school-developer/src/api/purchase/purchasingfiles.ts
吴红兵 5a53648ee7 fix
2026-03-08 15:17:13 +08:00

68 lines
1.8 KiB
TypeScript

/*
* Copyright (c) 2018-2025, cyweb All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form to reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
*/
import request from '/@/utils/request';
/**
* 获取文件类型列表
*/
export function getFileTypes() {
return request({
url: '/purchase/purchasingfiles/file-types',
method: 'get',
});
}
/**
* 获取 140 部门会议纪要文件类型
*/
export function getDeptSelfMeetingFiletype() {
return '140';
}
/**
* 获取 120 采购需求表文件类型
*/
export function getPurchaseRequirementFiletype() {
return '120';
}
/**
* 按文件类型获取采购附件列表
* @param purchaseId 采购申请ID
* @param fileType 文件类型(可选)
*/
export function getFilesByType(purchaseId: string, fileType?: string) {
return request({
url: '/purchase/purchasingfiles/listByType',
method: 'get',
params: { purchaseId, fileType },
});
}
/**
* 获取采购需求文件列表(招标代理可见)
* @param purchaseId 采购申请ID
*/
export function getRequirementFiles(purchaseId: string) {
return request({
url: '/purchase/purchasingfiles/listByType',
method: 'get',
params: { purchaseId, fileType: '120' },
});
}