predict.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import { axios } from '@/utils/request'
  2. // 智能补货列表 无分页
  3. export const predictList = (params) => {
  4. return axios({
  5. url: '/predict/stockPredict/queryList',
  6. data: params,
  7. method: 'post',
  8. headers:{
  9. 'module': encodeURIComponent('列表查询')
  10. }
  11. })
  12. }
  13. // 智能补货 产品范围列表 无分页
  14. export const predictRangeList = (params) => {
  15. const url = `/predict/stockPredict/queryRangeList/${params.sn}`
  16. return axios({
  17. url: url,
  18. method: 'get',
  19. headers:{
  20. 'module': encodeURIComponent('产品范围列表查询')
  21. }
  22. })
  23. }
  24. // 智能补货 趋势平均列表
  25. export const predictTrendList = (params) => {
  26. return axios({
  27. url: '/predict/stockPredict/queryTrendList',
  28. params: params,
  29. method: 'get',
  30. headers:{
  31. 'module': encodeURIComponent('趋势平均列表查询')
  32. }
  33. })
  34. }
  35. // 智能补货 保存
  36. export const predictSave = (params) => {
  37. return axios({
  38. url: '/predict/stockPredict/save',
  39. data: params,
  40. method: 'post',
  41. headers:{
  42. 'module': encodeURIComponent('新增')
  43. }
  44. })
  45. }
  46. // 智能补货 删除
  47. export const predictDel = (params) => {
  48. const url = `/predict/stockPredict/delete/${params.sn}`
  49. return axios({
  50. url: url,
  51. data: params,
  52. method: 'post',
  53. headers:{
  54. 'module': encodeURIComponent('删除')
  55. }
  56. })
  57. }
  58. // 智能补货 详情
  59. export const predictDetail = (params) => {
  60. const url = `/predict/stockPredict/queryBySn/${params.sn}`
  61. return axios({
  62. url: url,
  63. data: params,
  64. method: 'post',
  65. headers:{
  66. 'module': encodeURIComponent('详情')
  67. }
  68. })
  69. }
  70. // 智能补货 产品范围 保存
  71. export const predictRangeSave = (params) => {
  72. return axios({
  73. url: '/predict/stockPredict/saveBatchRange',
  74. data: params,
  75. method: 'post',
  76. headers:{
  77. 'module': encodeURIComponent('产品范围保存')
  78. }
  79. })
  80. }
  81. // 智能补货 产品范围 删除
  82. export const predictRangeDel = (params) => {
  83. return axios({
  84. url: '/predict/stockPredict/deleteRange',
  85. data: params,
  86. method: 'post',
  87. headers:{
  88. 'module': encodeURIComponent('产品范围删除')
  89. }
  90. })
  91. }
  92. // 智能补货 计算
  93. export const predictRun = (params) => {
  94. return axios({
  95. url: '/predict/stockPredict/run',
  96. data: params,
  97. method: 'post',
  98. headers:{
  99. 'module': encodeURIComponent('计算')
  100. }
  101. })
  102. }
  103. // 智能补货 基础信息设置 批量插入
  104. export const predictProductInfoInsert = (params) => {
  105. return axios({
  106. url: '/predictProductInfo/batchInsert',
  107. data: params,
  108. method: 'post',
  109. headers:{
  110. 'module': encodeURIComponent('基础信息设置批量插入')
  111. }
  112. })
  113. }
  114. // 智能补货 基础信息设置 下载
  115. export const predictProductInfoExport = (params) => {
  116. return axios({
  117. url: '/predictProductInfo/exportExcel',
  118. data: params,
  119. method: 'post',
  120. responseType: 'blob',
  121. headers:{
  122. 'module': encodeURIComponent('基础信息设置下载')
  123. }
  124. })
  125. }
  126. // 智能补货 基础信息设置 解析
  127. export const predictProductInfoGoods = (params) => {
  128. return axios({
  129. url: '/predictProductInfo/parseGoods',
  130. data: params,
  131. method: 'post',
  132. headers:{
  133. 'module': encodeURIComponent('基础信息设置解析')
  134. }
  135. })
  136. }
  137. // 智能补货 结果下载
  138. export const predictstockPredictExport = (params) => {
  139. return axios({
  140. url: `/predict/stockPredict/exportExcel/${params.sn}`,
  141. data: params,
  142. method: 'post',
  143. responseType: 'blob',
  144. headers:{
  145. 'module': encodeURIComponent('结果下载')
  146. }
  147. })
  148. }