memberInvoice.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import { requestApi } from '../util/network'
  2. // 获取用户发票列表
  3. export const getInvoiceList =
  4. () =>
  5. requestApi(
  6. '/Memberinvoice/invoice_list',
  7. 'POST',
  8. {
  9. },
  10. 'member'
  11. )
  12. // 获取单个发票信息
  13. export const getInvoiceInfo =
  14. (invoiceId) =>
  15. requestApi(
  16. '/Memberinvoice/invoice_info',
  17. 'POST',
  18. {
  19. 'invoice_id': invoiceId
  20. },
  21. 'member'
  22. )
  23. // 新增发票
  24. export const addInvoice =
  25. (data) =>
  26. requestApi(
  27. '/Memberinvoice/invoice_add',
  28. 'POST',
  29. {
  30. 'invoice_state': data.invoice_state,
  31. 'invoice_title': data.invoice_title,
  32. 'invoice_code': data.invoice_code,
  33. 'invoice_content': data.invoice_content,
  34. 'invoice_company': data.invoice_company,
  35. 'invoice_company_code': data.invoice_company_code,
  36. 'invoice_reg_addr': data.invoice_reg_addr,
  37. 'invoice_reg_phone': data.invoice_reg_phone,
  38. 'invoice_reg_bname': data.invoice_reg_bname,
  39. 'invoice_reg_baccount': data.invoice_reg_baccount
  40. },
  41. 'member'
  42. )
  43. // 编辑发票
  44. export const editInvoice =
  45. (data, invoiceId) =>
  46. requestApi(
  47. '/Memberinvoice/invoice_edit',
  48. 'POST',
  49. {
  50. 'invoice_id': invoiceId,
  51. 'invoice_state': data.invoice_state,
  52. 'invoice_title': data.invoice_title,
  53. 'invoice_code': data.invoice_code,
  54. 'invoice_content': data.invoice_content,
  55. 'invoice_company': data.invoice_company,
  56. 'invoice_company_code': data.invoice_company_code,
  57. 'invoice_reg_addr': data.invoice_reg_addr,
  58. 'invoice_reg_phone': data.invoice_reg_phone,
  59. 'invoice_reg_bname': data.invoice_reg_bname,
  60. 'invoice_reg_baccount': data.invoice_reg_baccount
  61. },
  62. 'member'
  63. )
  64. // 删除发票
  65. export const delInvoice =
  66. (invoiceId) =>
  67. requestApi(
  68. '/Memberinvoice/invoice_del',
  69. 'POST',
  70. {
  71. 'invoice_id': invoiceId
  72. },
  73. 'member'
  74. )