[feat] 新增外部合同管理功能

This commit is contained in:
wyw
2024-07-24 16:22:04 +08:00
parent 967a83948b
commit f0dc469105
28 changed files with 3650 additions and 28 deletions

View File

@@ -0,0 +1,69 @@
import request from '@/config/axios'
// 合同 VO
export interface ContractVO {
name: string // 合同名称
type: string // 合同类型
progress: string // 合同进展
expectedTime: Date // 合同拟定时间
printingTime: Date // 合同用印时间
signingTime: Date // 签订时间
archiveTime: Date // 归档时间
status: string // 合同状态
countType: string // 计费方式
remark: string // 备注
contractFileUrl: string // 合同url
constructionCost: number // 建安费
source: string // 资金来源
discount: string // 优惠
consortium: boolean // 是否联合体
consortiumCompany: string // 联合体单位
extProportion: string // 占主合同比例
approvedAmount: number // 审定金额
reviewFileUrl: string // 审核文件url
creator: string // 创建者
createTime: Date // 创建时间
updater: string // 更新者
updateTime: Date // 更新时间
deleted: boolean // 是否删除
tenantId: number // 租户编号
amount: number // 签订合同总额
preAmount: number // 前期费
designAmount: number // 设计费
surveyFees: number // 勘测费
measurementFee: number // 测量费
otherFee: number // 其他费
}
// 合同 API
export const ContractApi = {
// 查询合同分页
getContractPage: async (params: any) => {
return await request.get({ url: `/cms/contract/page`, params })
},
// 查询合同详情
getContract: async (id: number) => {
return await request.get({ url: `/cms/contract/get?id=` + id })
},
// 新增合同
createContract: async (data: ContractVO) => {
return await request.post({ url: `/cms/contract/create`, data })
},
// 修改合同
updateContract: async (data: ContractVO) => {
return await request.put({ url: `/cms/contract/update`, data })
},
// 删除合同
deleteContract: async (id: number) => {
return await request.delete({ url: `/cms/contract/delete?id=` + id })
},
// 导出合同 Excel
exportContract: async (params) => {
return await request.download({ url: `/cms/contract/export-excel`, params })
},
}