2025-06-24 10:52:30 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
|
2025-06-27 10:41:33 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 供应商基本信息
|
|
|
|
*/
|
2025-07-02 16:18:03 +08:00
|
|
|
export const coscoSupplierBase = () => request.get(`/coscoSupplierBase/1935265782606135296`);
|
2025-06-27 10:41:33 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 资质分页列表
|
|
|
|
*/
|
|
|
|
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
|
2025-07-02 16:18:03 +08:00
|
|
|
* 银行分页列表
|
2025-06-27 10:41:33 +08:00
|
|
|
*/
|
|
|
|
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 });
|
|
|
|
|
|
|
|
/**
|
2025-07-02 16:18:03 +08:00
|
|
|
* 银行详情
|
2025-06-27 10:41:33 +08:00
|
|
|
*/
|
|
|
|
export const bankView = (id: string) => request.get(`/bank/${id}`);
|
|
|
|
/**
|
2025-07-02 16:18:03 +08:00
|
|
|
* 银行新增
|
2025-06-27 10:41:33 +08:00
|
|
|
*/
|
|
|
|
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
|
2025-07-02 16:18:03 +08:00
|
|
|
* 银行修改
|
2025-06-27 10:41:33 +08:00
|
|
|
*/
|
|
|
|
export const bankEdit = (data: bankAdd) => request.put('/bank', { data });
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-02 16:18:03 +08:00
|
|
|
/** attachments
|
|
|
|
* 附件分页列表
|
|
|
|
*/
|
|
|
|
interface battachmentsGetPage {
|
|
|
|
pageNo: number;
|
|
|
|
pageSize: number;
|
|
|
|
supplierId?: string;
|
|
|
|
}
|
|
|
|
export const battachmentsGetPage = (data: battachmentsGetPage) => request.post('/attachments/getPage', { data });
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 附件详情
|
|
|
|
*/
|
|
|
|
export const attachmentskView = (id: string) => request.get(`/attachments/${id}`);
|
|
|
|
/**
|
|
|
|
* 附件新增
|
|
|
|
*/
|
|
|
|
interface attachmentsAdd {
|
|
|
|
id: string;
|
|
|
|
attachmentsType: string;
|
|
|
|
fileName: string;
|
|
|
|
filePath: string;
|
|
|
|
fileSize: string;
|
|
|
|
fileType: string;
|
|
|
|
fileUrl: string;
|
|
|
|
supplierId: string;
|
|
|
|
[property: string]: any;
|
|
|
|
}
|
|
|
|
export const attachmentsAdd = (data: attachmentsAdd) => request.post('/attachments', { data });
|
|
|
|
/**
|
|
|
|
* @param data
|
|
|
|
* @returns
|
|
|
|
* 附件修改
|
|
|
|
*/
|
|
|
|
export const attachmentsEdit = (data: attachmentsAdd) => request.put('/attachments', { data });
|
|
|
|
|
2025-06-27 10:41:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-02 16:18:03 +08:00
|
|
|
/**
|
|
|
|
* 附件新增
|
|
|
|
*/
|
|
|
|
interface updateSupplierBase {
|
|
|
|
title: string;
|
|
|
|
changeDesc: string;
|
|
|
|
coscoSupplierBase: coscoSupplierBases;
|
|
|
|
coscoSupplierSurveyAttachments: coscoSupplierSurveyAttachment[];
|
|
|
|
}
|
|
|
|
interface coscoSupplierSurveyAttachment {
|
|
|
|
attachmentsType: string;
|
|
|
|
fileName: string;
|
|
|
|
fileType: string;
|
|
|
|
fileSize: string;
|
|
|
|
filePath: string;
|
|
|
|
fileUrl: string;
|
|
|
|
}
|
|
|
|
interface coscoSupplierBases {
|
|
|
|
id?: string;
|
|
|
|
supplierType?: string;
|
|
|
|
name?: string;
|
|
|
|
nameEn?: string;
|
|
|
|
range?: string;
|
|
|
|
workAddress?: string;
|
|
|
|
parentCompanyInvestor?: string;
|
|
|
|
legalPerson?: string;
|
|
|
|
capital?: string;
|
|
|
|
contactsName?: string;
|
|
|
|
contactsPhone?: string;
|
|
|
|
contactsEmail?: string;
|
|
|
|
nation?: string;
|
|
|
|
vat?: string;
|
|
|
|
currency?: string;
|
|
|
|
licenceAccessory?: string;
|
|
|
|
licenceDate?: string;
|
|
|
|
enterpriseType?: string;
|
|
|
|
socialCreditCode?: string;
|
|
|
|
regAddress?: string;
|
|
|
|
idCard?: string;
|
|
|
|
contactsType?: string;
|
|
|
|
telephone?: string;
|
|
|
|
}
|
2025-06-27 10:41:33 +08:00
|
|
|
|
2025-07-02 16:18:03 +08:00
|
|
|
export const updateSupplierBase = (data: updateSupplierBase) => request.post('/coscoSupplierBase/updateSupplierBase', { data });
|
2025-06-27 10:41:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|