344 lines
11 KiB
TypeScript
344 lines
11 KiB
TypeScript
![]() |
import { Request, Response } from 'express';
|
|||
|
|
|||
|
// const data = [
|
|||
|
// {
|
|||
|
// title: 'Name',
|
|||
|
// dataIndex: '评审项',
|
|||
|
// key: '评审项',
|
|||
|
// },
|
|||
|
// {
|
|||
|
// title: 'Other',
|
|||
|
// children: [
|
|||
|
// {
|
|||
|
// title: 'Age',
|
|||
|
// key: '人员A',
|
|||
|
// },
|
|||
|
// {
|
|||
|
// title: 'Address',
|
|||
|
// key: '人员B',
|
|||
|
// },
|
|||
|
// ]
|
|||
|
// },
|
|||
|
// ]
|
|||
|
const dataInvoiceInfo = [
|
|||
|
{
|
|||
|
id: '1',
|
|||
|
taxpayerType: '一般纳税人',
|
|||
|
taxpayerCode: '91345678901234567X',
|
|||
|
head: '北京某科技有限公司',
|
|||
|
address: '北京市朝阳区XX路99号',
|
|||
|
phone: '010-12345678',
|
|||
|
bank: '中国银行北京分行',
|
|||
|
account: '6228888888888888',
|
|||
|
updateTime: '2025-06-17 10:20:00',
|
|||
|
voided: false,
|
|||
|
qualificationCertificate: 'https://example.com/cert1.pdf',
|
|||
|
},
|
|||
|
{
|
|||
|
id: '2',
|
|||
|
taxpayerType: '小规模纳税人',
|
|||
|
taxpayerCode: '91345678901234566Y',
|
|||
|
head: '上海某信息技术有限公司',
|
|||
|
address: '上海市浦东新区XX大厦8楼',
|
|||
|
phone: '021-87654321',
|
|||
|
bank: '工商银行上海分行',
|
|||
|
account: '6229999999999999',
|
|||
|
updateTime: '2025-06-16 15:30:00',
|
|||
|
voided: true,
|
|||
|
qualificationCertificate: '',
|
|||
|
},
|
|||
|
]
|
|||
|
const mockQualificationData = [
|
|||
|
{
|
|||
|
id: '1',
|
|||
|
certificateType: '建筑业企业资质证书',
|
|||
|
name: '建筑工程施工总承包一级',
|
|||
|
code: 'ZJ-A123456',
|
|||
|
typeLevel: '一级',
|
|||
|
authority: '住房和城乡建设部',
|
|||
|
dateTime: '2023-03-01',
|
|||
|
termOfValidity: '2028-03-01',
|
|||
|
updateTime: '2025-06-17 10:30:00',
|
|||
|
},
|
|||
|
{
|
|||
|
id: '2',
|
|||
|
certificateType: '安全生产许可证',
|
|||
|
name: '施工企业安全生产许可证',
|
|||
|
code: 'AQ-789012',
|
|||
|
typeLevel: 'A级',
|
|||
|
authority: '应急管理部',
|
|||
|
dateTime: '2022-06-15',
|
|||
|
termOfValidity: '2025-06-15',
|
|||
|
updateTime: '2025-06-17 11:45:00',
|
|||
|
},
|
|||
|
]
|
|||
|
export const mockData = {
|
|||
|
base: {
|
|||
|
"id": "123456",
|
|||
|
"supplierType": "dvs",
|
|||
|
"licenceAccessory": "https://example.com/license.pdf",
|
|||
|
"licenceDate": "2025-12-31",
|
|||
|
"enterpriseType": "company",
|
|||
|
"name": "深圳供应商有限公司",
|
|||
|
"nameEn": "Shenzhen Supplier Co., Ltd.",
|
|||
|
"socialCreditCode": "91440300MA5F3XXXXQ",
|
|||
|
"range": "电子元器件、金属材料销售",
|
|||
|
"regAddress": "广东省深圳市南山区科技园",
|
|||
|
"workAddress": "广东省深圳市南山区软件产业基地",
|
|||
|
"parentCompanyInvestor": "深圳控股集团有限公司",
|
|||
|
"legalPerson": "李四",
|
|||
|
"idCard": "440301199001015678",
|
|||
|
"capital": 5000,
|
|||
|
"contactsName": "王五",
|
|||
|
"contactsPhone": "13800138000",
|
|||
|
"contactsType": "法人代表",
|
|||
|
"contactsEmail": "contact@supplier.com",
|
|||
|
"telephone": "0755-12345678",
|
|||
|
"nation": "新加坡",
|
|||
|
"vat": "SG12345678VAT",
|
|||
|
"taxpayerId": "SG-TAX-998877",
|
|||
|
"currency": "SGD",
|
|||
|
"personName": "张三",
|
|||
|
"personPhone": "13812345678",
|
|||
|
"personBank": "中国银行深圳分行",
|
|||
|
"personAccount": "6222020200123456789",
|
|||
|
"remark": "该供应商已完成初步审核",
|
|||
|
"accessStatus": 1,
|
|||
|
"blacklistStatus": 0,
|
|||
|
"greylistStatus": 1,
|
|||
|
"fillinStatus": 0,
|
|||
|
"fillinBy": "",
|
|||
|
"sapCode": "SAP998877",
|
|||
|
"delFlag": "normal",
|
|||
|
"createBy": "admin",
|
|||
|
"createTime": "2024-06-01 10:00:00",
|
|||
|
"updateBy": "admin",
|
|||
|
"updateTime": "2025-06-01 11:00:00",
|
|||
|
"lastUpdateTime": "2025-06-17 09:30:00"
|
|||
|
},
|
|||
|
qualifications: [{
|
|||
|
"id": "cert-001",
|
|||
|
"supplierId": "supplier-123456",
|
|||
|
"certificateType": "安全生产许可证",
|
|||
|
"name": "建筑施工总承包一级资质",
|
|||
|
"code": "ZJ20230605001",
|
|||
|
"typeLevel": "一级",
|
|||
|
"authority": "住房和城乡建设部",
|
|||
|
"dateTime": "2023-06-05",
|
|||
|
"termOfValidity": "2026-06-05",
|
|||
|
"accessory": "https://example.com/certificate.pdf",
|
|||
|
"delFlag": "normal",
|
|||
|
"createBy": "admin",
|
|||
|
"createTime": "2023-06-01 10:00:00",
|
|||
|
"updateBy": "admin",
|
|||
|
"updateTime": "2024-06-01 11:00:00",
|
|||
|
"lastUpdateTime": "2025-06-17 09:30:00"
|
|||
|
}],
|
|||
|
invoice: {
|
|||
|
"id": "invoice-001",
|
|||
|
"supplierId": "supplier-123456",
|
|||
|
"taxpayerType": "general",
|
|||
|
"taxpayerCode": "91440300MA5F3XXXXQ",
|
|||
|
"phone": "0755-12345678",
|
|||
|
"account": "6222020200123456789",
|
|||
|
"head": "深圳供应商有限公司",
|
|||
|
"address": "深圳市南山区科技园开票楼101号",
|
|||
|
"bank": "中国银行深圳分行",
|
|||
|
"qualificationCertificate": "https://example.com/tax-cert.pdf",
|
|||
|
"delFlag": "normal",
|
|||
|
"createBy": "admin",
|
|||
|
"createTime": "2024-06-01 09:00:00",
|
|||
|
"updateBy": "admin",
|
|||
|
"updateTime": "2025-06-01 10:00:00",
|
|||
|
"lastUpdateTime": "2025-06-17 08:30:00"
|
|||
|
},
|
|||
|
bank: [{
|
|||
|
"id": "bank-001",
|
|||
|
"supplierId": "supplier-123456",
|
|||
|
"interbankNumber": "123456789012",
|
|||
|
"bank": "中国银行深圳分行",
|
|||
|
"swiftCode": "BKCHCNBJ45A",
|
|||
|
"accountName": "Shenzhen Supplier Co., Ltd.",
|
|||
|
"account": "6222020200123456789",
|
|||
|
"currency": "CNY",
|
|||
|
"nation": "中国",
|
|||
|
"province": "广东省",
|
|||
|
"city": "深圳市",
|
|||
|
"delFlag": "normal",
|
|||
|
"createBy": "admin",
|
|||
|
"createTime": "2024-06-01 09:00:00",
|
|||
|
"updateBy": "admin",
|
|||
|
"updateTime": "2025-06-01 10:00:00",
|
|||
|
"lastUpdateTime": "2025-06-17 08:30:00"
|
|||
|
}],
|
|||
|
survey: {
|
|||
|
"supplierName": "深圳供应商有限公司",
|
|||
|
"name": "李四",
|
|||
|
"position": "采购经理",
|
|||
|
"phone": "13800138000",
|
|||
|
"email": "lisi@supplier.com",
|
|||
|
"dateTime": "2025-06-17",
|
|||
|
},
|
|||
|
questionReply: [
|
|||
|
{
|
|||
|
"surveyQuestion": "法律法规:\n我们确保经营和提供的产品服务遵守国家及 各业务所在地的所有使用法律、法规",
|
|||
|
"replyValue": "是",
|
|||
|
},{
|
|||
|
"surveyQuestion": "健康和安全:\n我们为员工提供符合法律法规的安全且健康 的工作场所。我们建立安全管理体系,并向 员工传达工作场所或生活设施的健康和安全 标准,致力于减少工作对员工造成的伤害和 疾病。",
|
|||
|
"replyValue": "符合",
|
|||
|
},{
|
|||
|
"surveyQuestion": "环境:\n我们能够以环境友好的方式经营。我们遵守 适用的环境法律、法规和标准;并建立有效 的环境管理体系。\n我们遵守贵集团对相关产品或服务的部分附 加环境要求,这些要求和规定体现在设计与 产品规范的合同文档中。",
|
|||
|
"replyValue": "符合",
|
|||
|
},{
|
|||
|
"surveyQuestion": "监督和记录:\n我们保留记录遵守相关法律和此行为准则的必要文件,并根据要求为贵集团提供对文件的查看权。我们会允许贵集团在适当的时候,以验证行为准则执行为目的的现场勘查",
|
|||
|
"replyValue": "符合",
|
|||
|
}
|
|||
|
],
|
|||
|
attachments: {
|
|||
|
"attachmentsType": "commitment",
|
|||
|
"fileName": "anti-bribery-commitment.pdf",
|
|||
|
"fileType": "pdf",
|
|||
|
"fileSize": "204800",
|
|||
|
"filePath": "/data/files/anti-bribery-commitment.pdf",
|
|||
|
"fileUrl": "http://example.com/files/anti-bribery-commitment.pdf",
|
|||
|
}
|
|||
|
};
|
|||
|
// 代码中会兼容本地 service mock 以及部署站点的静态数据
|
|||
|
export default {
|
|||
|
// 供应商信息
|
|||
|
'GET /api/system/coscoSupplier': (req: Request, res: Response) => {
|
|||
|
res.json({
|
|||
|
code: 200,
|
|||
|
data: mockData,
|
|||
|
msg: '操作成功'
|
|||
|
});
|
|||
|
},
|
|||
|
//
|
|||
|
'GET /api/system/qualifications': (req: Request, res: Response) => {
|
|||
|
res.json({ code: 200,
|
|||
|
data: mockQualificationData,
|
|||
|
total: 2,
|
|||
|
msg: '操作成功'
|
|||
|
});
|
|||
|
},
|
|||
|
//
|
|||
|
'GET /api/system/invoice': (req: Request, res: Response) => {
|
|||
|
res.json({ code: 200,
|
|||
|
data: dataInvoiceInfo,
|
|||
|
total: 2,
|
|||
|
msg: '操作成功'
|
|||
|
});
|
|||
|
},
|
|||
|
//
|
|||
|
'GET /api/system/bank': (req: Request, res: Response) => {
|
|||
|
res.json({ code: 200,
|
|||
|
data: [
|
|||
|
{
|
|||
|
id: '1',
|
|||
|
interbankNumber: '123456789',
|
|||
|
bank: '中国银行',
|
|||
|
accountName: '张三',
|
|||
|
account: '6228480000000000000',
|
|||
|
currency: '人民币',
|
|||
|
nation: '中国',
|
|||
|
province: '广东省',
|
|||
|
city: '广州市',
|
|||
|
updateTime: '2024-06-18',
|
|||
|
},
|
|||
|
{
|
|||
|
id: '2',
|
|||
|
interbankNumber: '987654321',
|
|||
|
bank: '工商银行',
|
|||
|
accountName: '李四',
|
|||
|
account: '6228480000000000001',
|
|||
|
currency: '美元',
|
|||
|
nation: '中国',
|
|||
|
province: '江苏省',
|
|||
|
city: '南京市',
|
|||
|
updateTime: '2024-06-17',
|
|||
|
},
|
|||
|
],
|
|||
|
total: 2,
|
|||
|
msg: '操作成功'
|
|||
|
});
|
|||
|
},
|
|||
|
//
|
|||
|
'GET /api/system/tianyancha': (req: Request, res: Response) => {
|
|||
|
res.json({ code: 200,
|
|||
|
data: [
|
|||
|
{
|
|||
|
key: '1',
|
|||
|
base: '京',
|
|||
|
name: '北京科技有限公司',
|
|||
|
legalPersonName: '张三',
|
|||
|
legalPersonType: '1',
|
|||
|
regNumber: '110108123456789',
|
|||
|
industry: '信息技术',
|
|||
|
companyOrgType: '有限责任公司',
|
|||
|
regLocation: '北京市海淀区中关村',
|
|||
|
estiblishTime: '2010-06-15',
|
|||
|
fromTime: '2010-06-16',
|
|||
|
toTime: '2025-06-15',
|
|||
|
businessScope: '软件开发、技术咨询',
|
|||
|
approvedTime: '2010-06-10',
|
|||
|
regStatus: '存续',
|
|||
|
regCapital: '5000万元',
|
|||
|
regInstitute: '北京市工商局',
|
|||
|
orgNumber: '1234567890',
|
|||
|
creditCode: '91110108MA01A12345',
|
|||
|
property3: 'Beijing Tech Co., Ltd.',
|
|||
|
updatetime: '2025-06-15',
|
|||
|
companyId: '1001',
|
|||
|
taxNumber: '110108123456789',
|
|||
|
email: 'contact@bjtech.com',
|
|||
|
website: 'http://www.bjtech.com',
|
|||
|
phoneNumber: '010-12345678',
|
|||
|
lastUpdateTime: '2025-06-15 10:00:00',
|
|||
|
},
|
|||
|
{
|
|||
|
key: '2',
|
|||
|
base: '沪',
|
|||
|
name: '上海电子商务有限公司',
|
|||
|
legalPersonName: '李四',
|
|||
|
legalPersonType: '1',
|
|||
|
regNumber: '310101987654321',
|
|||
|
industry: '电子商务',
|
|||
|
companyOrgType: '股份有限公司',
|
|||
|
regLocation: '上海市浦东新区',
|
|||
|
estiblishTime: '2015-03-20',
|
|||
|
fromTime: '2015-03-21',
|
|||
|
toTime: '2030-03-20',
|
|||
|
businessScope: '电子商务平台运营、广告设计',
|
|||
|
approvedTime: '2015-03-15',
|
|||
|
regStatus: '存续',
|
|||
|
regCapital: '1亿元',
|
|||
|
regInstitute: '上海市工商局',
|
|||
|
orgNumber: '0987654321',
|
|||
|
creditCode: '91310101MA1AB23456',
|
|||
|
property3: 'Shanghai E-commerce Co., Ltd.',
|
|||
|
updatetime: '2025-06-15',
|
|||
|
companyId: '1002',
|
|||
|
taxNumber: '310101987654321',
|
|||
|
email: 'info@shcommerce.com',
|
|||
|
website: 'http://www.shcommerce.com',
|
|||
|
phoneNumber: '021-87654321',
|
|||
|
lastUpdateTime: '2025-06-15 09:30:00',
|
|||
|
},
|
|||
|
],
|
|||
|
total: 2,
|
|||
|
msg: '操作成功' });
|
|||
|
},
|
|||
|
|
|||
|
'GET /api/500': (req: Request, res: Response) => {
|
|||
|
res.status(500).send({
|
|||
|
timestamp: 1513932555104,
|
|||
|
status: 500,
|
|||
|
error: 'error',
|
|||
|
message: 'error',
|
|||
|
path: '/base/category/list',
|
|||
|
});
|
|||
|
},
|
|||
|
|
|||
|
|
|||
|
};
|