index.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import request from '@/config/axios'
  2. export interface ContractVO {
  3. id: number
  4. name: string
  5. customerId: number
  6. businessId: number
  7. processInstanceId: number
  8. orderDate: Date
  9. ownerUserId: number
  10. no: string
  11. startTime: Date
  12. endTime: Date
  13. price: number
  14. discountPercent: number
  15. productPrice: number
  16. roUserIds: string
  17. rwUserIds: string
  18. contactId: number
  19. signUserId: number
  20. contactLastTime: Date
  21. remark: string
  22. }
  23. // 查询合同列表
  24. export const getContractPage = async (params) => {
  25. return await request.get({ url: `/crm/contract/page`, params })
  26. }
  27. // 查询合同详情
  28. export const getContract = async (id: number) => {
  29. return await request.get({ url: `/crm/contract/get?id=` + id })
  30. }
  31. // 新增合同
  32. export const createContract = async (data: ContractVO) => {
  33. return await request.post({ url: `/crm/contract/create`, data })
  34. }
  35. // 修改合同
  36. export const updateContract = async (data: ContractVO) => {
  37. return await request.put({ url: `/crm/contract/update`, data })
  38. }
  39. // 删除合同
  40. export const deleteContract = async (id: number) => {
  41. return await request.delete({ url: `/crm/contract/delete?id=` + id })
  42. }
  43. // 导出合同 Excel
  44. export const exportContract = async (params) => {
  45. return await request.download({ url: `/crm/contract/export-excel`, params })
  46. }