statistics.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. * 当日订单统计同步
  19. * @param query
  20. * @returns {*}
  21. */
  22. export function orderStaticsSync() {
  23. return request({
  24. url: '/mapi/settlement/store/statistics/sync',
  25. method: 'get'
  26. })
  27. }
  28. // 查询门店统计详细
  29. export function getStatistics(id) {
  30. return request({
  31. url: '/mapi/settlement/store/statistics/' + id,
  32. method: 'get'
  33. })
  34. }
  35. // 导出门店统计
  36. export function exportStatistics(query) {
  37. return request({
  38. url: '/mapi/settlement/store/statistics/export',
  39. method: 'get',
  40. params: query
  41. })
  42. }
  43. // 查询充值统计列表
  44. export function listChargeStatistics(query) {
  45. return request({
  46. url: '/mapi/settlement/store/statistics/charge/list',
  47. method: 'get',
  48. params: query
  49. })
  50. }
  51. // 导出门店充值统计
  52. export function exportChargeStatistics(query) {
  53. return request({
  54. url: '/mapi/settlement/store/statistics/charge/export',
  55. method: 'get',
  56. params: query,
  57. responseType: 'blob'
  58. })
  59. }
  60. // 查询充值统计列表
  61. export function listChargeStatisticsByStore(query) {
  62. return request({
  63. url: '/mapi/settlement/store/statistics/charge/bystore',
  64. method: 'get',
  65. params: query
  66. })
  67. }
  68. export function listFactoryStatisticsByStore(query) {
  69. return request({
  70. url: '/mapi/settlement/factory/statistics/list/bystore',
  71. method: 'get',
  72. params: query
  73. })
  74. }
  75. // 查询工厂按日期统计列表
  76. export function listStatisticsByDate(query) {
  77. return request({
  78. url: '/mapi/settlement/factory/statistics/list/bydate',
  79. method: 'get',
  80. params: query
  81. })
  82. }
  83. // 获取工厂总统计数据
  84. export function getTotalStatistics(query) {
  85. return request({
  86. url: '/mapi/settlement/factory/statistics/total',
  87. method: 'get',
  88. params: query
  89. })
  90. }
  91. // 导出工厂按日期统计数据
  92. export function exportStatisticsByDate(query) {
  93. return request({
  94. url: '/mapi/settlement/factory/statistics/export/bydate',
  95. method: 'post',
  96. params: query,
  97. responseType: 'blob'
  98. })
  99. }
  100. // 导出工厂按门店统计数据
  101. export function exportStatisticsByStore(query) {
  102. this.downloadJson(
  103. '/mapi/settlement/factory/statistics/export/bystore',
  104. {
  105. ...query
  106. },
  107. `门店统计_${new Date().getTime()}.xlsx`
  108. )
  109. }
  110. //工厂端首页dashboard
  111. export function factoryDashborad() {
  112. return request({
  113. url: '/mapi/settlement/factory/statistics/dashborad',
  114. method: 'get'
  115. })
  116. }
  117. //工厂端首页dashboard
  118. export function platformDashborad() {
  119. return request({
  120. url: '/mapi/platform/statistics/dashborad',
  121. method: 'get'
  122. })
  123. }
  124. // 获取工厂总统计数据
  125. export function getplatformDayTrend(query) {
  126. return request({
  127. url: '/mapi/platform/statistics/trend',
  128. method: 'get',
  129. params: query
  130. })
  131. }
  132. // 查询工厂按日期统计列表
  133. export function listplatformStatisticsByDate(query) {
  134. return request({
  135. url: '/mapi/platform/statistics/order/list',
  136. method: 'get',
  137. params: query
  138. })
  139. }
  140. export function listplatformStatisticsByStore(query) {
  141. return request({
  142. url: '/mapi/platform/statistics/order/bystore',
  143. method: 'get',
  144. params: query
  145. })
  146. }