shelf.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. import { axios } from '@/utils/request'
  2. // 货架 列表 分页
  3. export const shelfList = (params) => {
  4. const url = `/shelf/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. })
  12. }
  13. // 货架 详情
  14. export const shelfDetail = (params) => {
  15. return axios({
  16. url: `/shelf/queryBySn/${params.sn}`,
  17. data: params,
  18. method: 'post'
  19. })
  20. }
  21. // 货架 保存
  22. export const shelfSave = (params) => {
  23. return axios({
  24. url: `/shelf/save`,
  25. data: params,
  26. method: 'post'
  27. })
  28. }
  29. // 货架 货位产品 列表 不分页
  30. export const shelfProductList = (params) => {
  31. return axios({
  32. url: `/shelf/placeProduct/queryList`,
  33. data: params,
  34. method: 'post'
  35. })
  36. }
  37. // 货架 货位产品 详情
  38. export const shelfProductDetail = (params) => {
  39. return axios({
  40. url: `/shelf/placeProduct/queryByPlaceSn/${params.shelfPlaceSn}`,
  41. data: params,
  42. method: 'get'
  43. })
  44. }
  45. // 货架 货位产品 保存
  46. export const shelfProductSave = (params) => {
  47. return axios({
  48. url: `/shelf/placeProduct/save`,
  49. data: params,
  50. method: 'post'
  51. })
  52. }
  53. // 货架 货位产品 下载模板
  54. export const shelfProductDownload = params => {
  55. return axios.request({
  56. url: `/shelf/placeProduct/downloadExcel/${params.shelfSn}`,
  57. method: 'post',
  58. responseType: 'blob'
  59. })
  60. }
  61. // 货架 货位产品 解析导入的文件
  62. export const shelfProductParseProducts = params => {
  63. return axios({
  64. url: '/shelf/placeProduct/readExcel',
  65. data: params,
  66. method: 'post'
  67. })
  68. }
  69. // POST 解析货位的导入模板
  70. export const shelfPlaceReadExcel = params => {
  71. return axios({
  72. url: '/shelf/place/readExcel',
  73. data: params,
  74. method: 'post'
  75. })
  76. }
  77. // POST 导出错误项
  78. export const shelfPlaceFailExcel = params => {
  79. return axios({
  80. url: '/shelf/place/downloadFailExcel',
  81. data: params,
  82. method: 'post',
  83. responseType: 'blob'
  84. })
  85. }
  86. // 货架 货位产品 批量插入
  87. export const shelfProductBatchInsert = params => {
  88. return axios({
  89. url: '/shelf/placeProduct/saveBatchExcel',
  90. data: params,
  91. method: 'post'
  92. })
  93. }
  94. // 批量保存货位
  95. export const shelfSaveBatchExcel = params => {
  96. return axios({
  97. url: '/shelf/place/saveBatchExcel',
  98. data: params,
  99. method: 'post'
  100. })
  101. }
  102. // 货架 箭冠产品 分页
  103. export const shelfDealerProductList = (params) => {
  104. const url = `/product/queryPageForXPRH/${params.pageNo}/${params.pageSize}`
  105. delete params.pageNo
  106. delete params.pageSize
  107. return axios({
  108. url: url,
  109. data: params,
  110. method: 'post'
  111. })
  112. }
  113. // 货架监控 列表 不分页
  114. export const shelfControlList = (params) => {
  115. return axios({
  116. url: `/shelf/control/queryList`,
  117. data: params,
  118. method: 'post'
  119. })
  120. }
  121. // 货架监控 出入库明细 分页
  122. export const shelfPutOutDetailList = (params) => {
  123. const url = `/shelf/placeProduct/queryStockPutOutDetailPage/${params.pageNo}/${params.pageSize}`
  124. delete params.pageNo
  125. delete params.pageSize
  126. return axios({
  127. url: url,
  128. data: params,
  129. method: 'post'
  130. })
  131. }
  132. // 修改完成标识
  133. export const modifFinishFlag = (params) => {
  134. return axios({
  135. url: `/shelf/modifFinishFlag`,
  136. data: params,
  137. method: 'post'
  138. })
  139. }
  140. // 新增货位
  141. export const addPlaceAndProduct = (params) => {
  142. return axios({
  143. url: `/shelf/placeAndProduct/save`,
  144. data: params,
  145. method: 'post'
  146. })
  147. }
  148. // 删除货位
  149. export const delShelfPlaceSn = (params) => {
  150. return axios({
  151. url: `/shelf/place/deleteBySn/${params.shelfPlaceSn}`,
  152. data: params,
  153. method: 'post'
  154. })
  155. }