stock.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. import { axios } from '@/utils/request'
  2. // 库存列表 分页
  3. export const stockList = (params) => {
  4. const url = `/stock/queryPage/${params.pageNo}/${params.pageSize}`
  5. delete params.pageNo
  6. delete params.pageSize
  7. return axios({
  8. url: url,
  9. data: params,
  10. method: 'post',
  11. headers:{
  12. 'module': encodeURIComponent('列表查询')
  13. }
  14. })
  15. }
  16. // 库存 列表 合计
  17. export const stockCount = (params) => {
  18. return axios({
  19. url: '/stock/queryPageCount',
  20. data: params,
  21. method: 'post'
  22. })
  23. }
  24. // 库存 导出
  25. export const stockExport = (params) => {
  26. return axios({
  27. url: '/stock/exportExcel',
  28. data: params,
  29. method: 'post',
  30. responseType: 'blob',
  31. headers:{
  32. 'module': encodeURIComponent('导出')
  33. }
  34. })
  35. }
  36. // 库存 详情列表 分页
  37. export const stockDetailList = (params) => {
  38. const url = `/stock/queryDetailPage/${params.pageNo}/${params.pageSize}`
  39. delete params.pageNo
  40. delete params.pageSize
  41. return axios({
  42. url: url,
  43. data: params,
  44. method: 'post',
  45. headers:{
  46. 'module': encodeURIComponent('明细列表查询')
  47. }
  48. })
  49. }
  50. // 库存 详情列表 合计
  51. export const stockDetailCount = (params) => {
  52. return axios({
  53. url: '/stock/queryDetailPageCount',
  54. data: params,
  55. method: 'post'
  56. })
  57. }
  58. // 分页查询产品库存列表
  59. export const queryStockProductPage = (params) => {
  60. const url = `/stock/queryStockProductPage/${params.pageNo}/${params.pageSize}`
  61. delete params.pageNo
  62. delete params.pageSize
  63. return axios({
  64. url: url,
  65. data: params,
  66. method: 'post',
  67. headers:{
  68. 'module': encodeURIComponent('列表查询')
  69. }
  70. })
  71. }
  72. // 非经销商产品库存列表
  73. export const queryStockProductForOtherPage = (params) => {
  74. const url = `/stock/queryStockProductForOtherPage/${params.pageNo}/${params.pageSize}`
  75. delete params.pageNo
  76. delete params.pageSize
  77. return axios({
  78. url: url,
  79. data: params,
  80. method: 'post',
  81. headers:{
  82. 'module': encodeURIComponent('列表查询')
  83. }
  84. })
  85. }
  86. // 分页查询促销产品
  87. export const queryPromoProductPage = (params) => {
  88. const url = `/stock/queryPromoProductPage/${params.pageNo}/${params.pageSize}`
  89. delete params.pageNo
  90. delete params.pageSize
  91. return axios({
  92. url: url,
  93. data: params,
  94. method: 'post',
  95. headers:{
  96. 'module': encodeURIComponent('列表查询')
  97. }
  98. })
  99. }
  100. // 出入库明细 列表 有分页
  101. export const stockFlowList = (params) => {
  102. const url = `/stock/queryFlowPage/${params.pageNo}/${params.pageSize}`
  103. delete params.pageNo
  104. delete params.pageSize
  105. return axios({
  106. url: url,
  107. data: params,
  108. method: 'post',
  109. headers:{
  110. 'module': encodeURIComponent('列表查询')
  111. }
  112. })
  113. }
  114. // 出入库明细 列表 合计
  115. export const stockFlowCount = (params) => {
  116. return axios({
  117. url: '/stock/queryFlowPageCount',
  118. data: params,
  119. method: 'post'
  120. })
  121. }
  122. // 库存预警 列表 分页
  123. export const stockWarnList = (params) => {
  124. const url = `/stock/queryWarnPage/${params.pageNo}/${params.pageSize}`
  125. delete params.pageNo
  126. delete params.pageSize
  127. return axios({
  128. url: url,
  129. data: params,
  130. method: 'post',
  131. headers:{
  132. 'module': encodeURIComponent('列表查询')
  133. }
  134. })
  135. }
  136. // 库存预警 保存
  137. export const stockWarnSaveBatch = (params) => {
  138. return axios({
  139. url: '/stock/updateStateBatch',
  140. data: params,
  141. method: 'post',
  142. headers:{
  143. 'module': encodeURIComponent('保存')
  144. }
  145. })
  146. }
  147. // 根据产品sn查询库存
  148. export const stockByProductSn = (params) => {
  149. const url = `/stock/queryStockByProductSn/${params.sn}`
  150. return axios({
  151. url: url,
  152. data: params,
  153. method: 'post',
  154. headers:{
  155. 'module': encodeURIComponent('库存查询')
  156. }
  157. })
  158. }
  159. // 库存 出入库明细 导出
  160. export const stockFlowExport = (params) => {
  161. return axios({
  162. url: '/stock/exportStockFlow',
  163. data: params,
  164. method: 'post',
  165. responseType: 'blob',
  166. headers:{
  167. 'module': encodeURIComponent('导出')
  168. }
  169. })
  170. }