2025-06-24 10:52:30 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
|
2025-06-27 10:41:33 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 供应商基本信息
|
|
|
|
*/
|
|
|
|
export const coscoSupplierBase = () => request.get(`/coscoSupplierBase/9c12e8ea-a681-4184-81ba-5fa276299a00`);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 资质分页列表
|
|
|
|
*/
|
|
|
|
interface qualificationsGetPage {
|
|
|
|
pageNo: number;
|
|
|
|
pageSize: number;
|
|
|
|
supplierId?: string;
|
2025-06-24 10:52:30 +08:00
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
export const qualificationsGetPage = (data: qualificationsGetPage) => request.post('/qualifications/getPage', { data });
|
2025-06-24 10:52:30 +08:00
|
|
|
|
2025-06-27 10:41:33 +08:00
|
|
|
/**
|
|
|
|
* 资质详情
|
|
|
|
*/
|
|
|
|
export const qualificationsView = (id: string) => request.get(`/qualifications/${id}`);
|
|
|
|
/**
|
|
|
|
* 资质新增
|
|
|
|
*/
|
|
|
|
interface qualificationsaAdd {
|
|
|
|
id: string;
|
|
|
|
accessory: string;
|
|
|
|
authority: string;
|
|
|
|
certificateType: string;
|
|
|
|
code: string;
|
|
|
|
dateTime: string;
|
|
|
|
name: string;
|
|
|
|
supplierId: string;
|
|
|
|
termOfValidity: string;
|
|
|
|
typeLevel: string;
|
2025-06-24 10:52:30 +08:00
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
export const qualificationsaAdd = (data: qualificationsaAdd) => request.post('/qualifications', { data });
|
|
|
|
/**
|
|
|
|
* @param data
|
|
|
|
* @returns
|
|
|
|
* 资质修改
|
|
|
|
*/
|
|
|
|
export const qualificationsEdit = (data: qualificationsaAdd) => request.put('/qualifications', { data });
|
|
|
|
/**
|
|
|
|
* 上传文件
|
|
|
|
* @param file 上传的文件对象
|
|
|
|
* @returns 上传结果
|
|
|
|
*/
|
|
|
|
export const uploadFile = async (file: File) => {
|
|
|
|
const formData = new FormData();
|
|
|
|
formData.append('file', file);
|
|
|
|
return request('/fileConfig/files/upload', {
|
|
|
|
method: 'POST',
|
|
|
|
data: formData,
|
2025-06-24 10:52:30 +08:00
|
|
|
|
|
|
|
});
|
2025-06-27 10:41:33 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** invoice
|
|
|
|
* 开票分页列表
|
|
|
|
*/
|
|
|
|
interface invoiceGetPage {
|
|
|
|
pageNo: number;
|
|
|
|
pageSize: number;
|
|
|
|
supplierId?: string;
|
2025-06-24 10:52:30 +08:00
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
export const invoiceGetPage = (data: invoiceGetPage) => request.post('/invoice/getPage', { data });
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 开票详情
|
|
|
|
*/
|
|
|
|
export const invoiceView = (id: string) => request.get(`/invoice/${id}`);
|
|
|
|
/**
|
|
|
|
* 开票新增
|
|
|
|
*/
|
|
|
|
interface invoiceAdd {
|
|
|
|
id: string;
|
|
|
|
account: string;
|
|
|
|
address: string;
|
|
|
|
bank: string;
|
|
|
|
head: string;
|
|
|
|
phone: string;
|
|
|
|
qualificationCertificate: string;
|
|
|
|
supplierId: string;
|
|
|
|
taxpayerCode: string;
|
|
|
|
taxpayerType: string;
|
2025-06-24 10:52:30 +08:00
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
export const invoiceAdd = (data: invoiceAdd) => request.post('/invoice', { data });
|
|
|
|
/**
|
|
|
|
* @param data
|
|
|
|
* @returns
|
|
|
|
* 开票修改
|
|
|
|
*/
|
|
|
|
export const invoiceEdit = (data: invoiceAdd) => request.put('/invoice', { data });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** bank
|
|
|
|
* 开票分页列表
|
|
|
|
*/
|
|
|
|
interface bankGetPage {
|
|
|
|
pageNo: number;
|
|
|
|
pageSize: number;
|
|
|
|
supplierId?: string;
|
2025-06-24 10:52:30 +08:00
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
export const bankGetPage = (data: bankGetPage) => request.post('/bank/getPage', { data });
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 开票详情
|
|
|
|
*/
|
|
|
|
export const bankView = (id: string) => request.get(`/bank/${id}`);
|
|
|
|
/**
|
|
|
|
* 开票新增
|
|
|
|
*/
|
|
|
|
interface bankAdd {
|
|
|
|
id: string;
|
|
|
|
account: string;
|
|
|
|
accountName: string;
|
|
|
|
bank: string;
|
|
|
|
city: string;
|
|
|
|
currency: string;
|
|
|
|
interbankNumber: string;
|
|
|
|
nation: string;
|
|
|
|
province: string;
|
|
|
|
supplierId: string;
|
|
|
|
swiftCode: null;
|
|
|
|
[property: string]: any;
|
|
|
|
}
|
|
|
|
export const bankAdd = (data: bankAdd) => request.post('/bank', { data });
|
|
|
|
/**
|
|
|
|
* @param data
|
|
|
|
* @returns
|
|
|
|
* 开票修改
|
|
|
|
*/
|
|
|
|
export const bankEdit = (data: bankAdd) => request.put('/bank', { data });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-24 10:52:30 +08:00
|
|
|
|