admin-vue3/src/api/crm/quotation/index.ts

74 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/config/axios'
// CRM 方案报价 VO
export interface QuotationVO {
no: string // 报价单编号
customerId: number // 客户id
businessId: number // 商机编号
invoiceTemplateId: number // 票据模板Id
processInstanceId: string // 工作流编号
auditStatus: number // 审批状态
ownerUserId: number // 商机负责人
expanderUserId: number // 拓展人
pricingUserId: number // 方案报价人
signUserId: number // 报价签约人
signPhoneNumber: number // 签约人联系电话
signEmail: string // 签约人Email
signWechat: string // 签约人微信
startTime: Date // 开始时间
totalPrice: number // 合同总金额
paymentTerm: string // 账期
creditMethod: number // 授信方式
creditCalcCycle: number // 授信计算周期
creditLimit: number // 授信额度
partnerCompanyId: number // 合作主体 关联部门id
deptId: number // 归属部门Id
creator: string // 创建者
createTime: Date // 创建时间
updater: string // 更新者
}
// CRM 方案报价 API
export const QuotationApi = {
// 查询CRM 方案报价分页
getQuotationPage: async (params: any) => {
return await request.get({ url: `/crm/quotation/page`, params })
},
// 查询CRM 方案报价详情
getQuotation: async (id: number) => {
return await request.get({ url: `/crm/quotation/get?id=` + id })
},
// 获得 CRM 方案列表(精简)
getSimpleQuotationList : async () => {
return await request.get({ url: `/crm/quotation/simple-all-list` })
},
// 新增CRM 方案报价
createQuotation: async (data: QuotationVO) => {
return await request.post({ url: `/crm/quotation/create`, data })
},
// 修改CRM 方案报价
updateQuotation: async (data: QuotationVO) => {
return await request.put({ url: `/crm/quotation/update`, data })
},
// 删除CRM 方案报价
deleteQuotation: async (id: number) => {
return await request.delete({ url: `/crm/quotation/delete?id=` + id })
},
// 导出CRM 方案报价 Excel
exportQuotation: async (params) => {
return await request.download({ url: `/crm/quotation/export-excel`, params })
},
// ==================== 子表CRM 报价产品关联) ====================
// 获得CRM 报价产品关联列表
getQuotationProductListByQuotationId: async (quotationId) => {
return await request.get({ url: `/crm/quotation/quotation-product/list-by-quotation-id?quotationId=` + quotationId })
}
}