statistics.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import request from '@/utils/request'
  2. // 查询门店统计列表
  3. export function listStatistics(query) {
  4. return request({
  5. url: '/mapi/settlement/store/statistics/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function listStatisticsByStore(query) {
  11. return request({
  12. url: '/mapi/settlement/store/statistics/list/bystore',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. // 查询门店统计详细
  18. export function getStatistics(id) {
  19. return request({
  20. url: '/mapi/settlement/store/statistics/' + id,
  21. method: 'get'
  22. })
  23. }
  24. // 导出门店统计
  25. export function exportStatistics(query) {
  26. return request({
  27. url: '/mapi/settlement/store/statistics/export',
  28. method: 'get',
  29. params: query
  30. })
  31. }
  32. // 查询充值统计列表
  33. export function listChargeStatistics(query) {
  34. return request({
  35. url: '/mapi/settlement/store/statistics/charge/list',
  36. method: 'get',
  37. params: query
  38. })
  39. }
  40. // 导出门店充值统计
  41. export function exportChargeStatistics(query) {
  42. return request({
  43. url: '/mapi/settlement/store/statistics/charge/export',
  44. method: 'get',
  45. params: query,
  46. responseType: 'blob'
  47. })
  48. }
  49. // 查询充值统计列表
  50. export function listChargeStatisticsByStore(query) {
  51. return request({
  52. url: '/mapi/settlement/store/statistics/charge/bystore',
  53. method: 'get',
  54. params: query
  55. })
  56. }
  57. export function listFactoryStatisticsByStore(query) {
  58. return request({
  59. url: '/mapi/settlement/factory/statistics/list/bystore',
  60. method: 'get',
  61. params: query
  62. })
  63. }
  64. // 查询工厂按日期统计列表
  65. export function listStatisticsByDate(query) {
  66. return request({
  67. url: '/mapi/settlement/factory/statistics/list/bydate',
  68. method: 'get',
  69. params: query
  70. })
  71. }
  72. // 获取工厂总统计数据
  73. export function getTotalStatistics(query) {
  74. return request({
  75. url: '/mapi/settlement/factory/statistics/total',
  76. method: 'get',
  77. params: query
  78. })
  79. }
  80. // 导出工厂按日期统计数据
  81. export function exportStatisticsByDate(query) {
  82. return request({
  83. url: '/mapi/settlement/factory/statistics/export/bydate',
  84. method: 'post',
  85. params: query,
  86. responseType: 'blob'
  87. })
  88. }
  89. // 导出工厂按门店统计数据
  90. export function exportStatisticsByStore(query) {
  91. this.downloadJson(
  92. '/mapi/settlement/factory/statistics/export/bystore',
  93. {
  94. ...query
  95. },
  96. `门店统计_${new Date().getTime()}.xlsx`
  97. )
  98. }
  99. //工厂端首页dashboard
  100. export function factoryDashborad() {
  101. return request({
  102. url: '/mapi/settlement/factory/statistics/dashborad',
  103. method: 'get'
  104. })
  105. }