index.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import request from '@/config/axios'
  2. // ERP 付款单 VO
  3. export interface FinancePaymentVO {
  4. id: number // 付款单编号
  5. no: string // 付款单号
  6. supplierId: number // 供应商编号
  7. paymentTime: Date // 付款时间
  8. totalPrice: number // 合计金额,单位:元
  9. status: number // 状态
  10. remark: string // 备注
  11. }
  12. // ERP 付款单 API
  13. export const FinancePaymentApi = {
  14. // 查询付款单分页
  15. getFinancePaymentPage: async (params: any) => {
  16. return await request.get({ url: `/erp/finance-payment/page`, params })
  17. },
  18. // 查询付款单详情
  19. getFinancePayment: async (id: number) => {
  20. return await request.get({ url: `/erp/finance-payment/get?id=` + id })
  21. },
  22. // 新增付款单
  23. createFinancePayment: async (data: FinancePaymentVO) => {
  24. return await request.post({ url: `/erp/finance-payment/create`, data })
  25. },
  26. // 修改付款单
  27. updateFinancePayment: async (data: FinancePaymentVO) => {
  28. return await request.put({ url: `/erp/finance-payment/update`, data })
  29. },
  30. // 更新付款单的状态
  31. updateFinancePaymentStatus: async (id: number, status: number) => {
  32. return await request.put({
  33. url: `/erp/finance-payment/update-status`,
  34. params: {
  35. id,
  36. status
  37. }
  38. })
  39. },
  40. // 删除付款单
  41. deleteFinancePayment: async (ids: number[]) => {
  42. return await request.delete({
  43. url: `/erp/finance-payment/delete`,
  44. params: {
  45. ids: ids.join(',')
  46. }
  47. })
  48. },
  49. // 导出付款单 Excel
  50. exportFinancePayment: async (params: any) => {
  51. return await request.download({ url: `/erp/finance-payment/export-excel`, params })
  52. }
  53. }