shelfReplenish.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. import { axios } from '@/utils/request'
  2. // 货架列表
  3. export const queryListForSettle = (params) => {
  4. return axios({
  5. url: '/shelf/queryListForSettle',
  6. method: 'get',
  7. headers:{
  8. 'module': encodeURIComponent('货架列表')
  9. }
  10. })
  11. }
  12. // 生成补货单 (废弃)
  13. export const shelfTaskInsertBill = (params) => {
  14. return axios({
  15. url: '/shelfReplenish/taskInsertBill',
  16. data: params,
  17. method: 'post',
  18. headers:{
  19. 'module': encodeURIComponent('生成补货单')
  20. }
  21. })
  22. }
  23. // 补货单列表 有分页
  24. export const shelfReplenishList = (params) => {
  25. const url = `/shelfReplenish/queryPage/${params.pageNo}/${params.pageSize}`
  26. delete params.pageNo
  27. delete params.pageSize
  28. return axios({
  29. url: url,
  30. data: params,
  31. method: 'post',
  32. headers:{
  33. 'module': encodeURIComponent('列表查询')
  34. }
  35. })
  36. }
  37. // 补货单 明细列表 不分页
  38. export const shelfReplenishDetailList = (params) => {
  39. return axios({
  40. url: '/shelfReplenish/detail/queryList',
  41. data: params,
  42. method: 'post',
  43. headers:{
  44. 'module': encodeURIComponent('明细列表')
  45. }
  46. })
  47. }
  48. // 保存补货单和明细
  49. export const saveMainAndDetail = (params) => {
  50. return axios({
  51. url: '/shelfReplenish/saveMainAndDetail',
  52. data: params,
  53. method: 'post',
  54. headers:{
  55. 'module': encodeURIComponent('创建补货单')
  56. }
  57. })
  58. }
  59. // 出库单详情列表
  60. export const queryListForOutStock = (params) => {
  61. return axios({
  62. url: '/shelfReplenish/detail/queryListForOutStock',
  63. data: params,
  64. method: 'post',
  65. headers:{
  66. 'module': encodeURIComponent('出库单明细列表')
  67. }
  68. })
  69. }
  70. // 查询关联的销售单
  71. export const queryRelationSalesBill = (params) => {
  72. return axios({
  73. url: `/shelfReplenish/queryRelationSalesBill/${params.replenishBillSn}`,
  74. method: 'get',
  75. headers:{
  76. 'module': encodeURIComponent('查询关联的销售单')
  77. }
  78. })
  79. }
  80. // 生成销售单
  81. export const createSalesBill = (params) => {
  82. return axios({
  83. url: `/shelfReplenish/createSalesBill/${params.replenishBillSn}`,
  84. data: params,
  85. method: 'post',
  86. headers:{
  87. 'module': encodeURIComponent('生成销售单')
  88. }
  89. })
  90. }
  91. // 补货单 取消补货单
  92. export const shelfReplenishCancel = (params) => {
  93. return axios({
  94. url: '/shelfReplenish/cancel',
  95. data: params,
  96. method: 'post',
  97. headers:{
  98. 'module': encodeURIComponent('取消补货单')
  99. }
  100. })
  101. }
  102. // 删除补货单
  103. export const shelfReplenishDelete = (params) => {
  104. return axios({
  105. url: `/shelfReplenish/delete/${params.replenishBillSn}`,
  106. method: 'get',
  107. headers:{
  108. 'module': encodeURIComponent('删除')
  109. }
  110. })
  111. }
  112. // 补货单 查询每个状态的数据条数
  113. export const shelfReplenishStateCount = (params) => {
  114. return axios({
  115. url: '/shelfReplenish/queryStateCount',
  116. data: params,
  117. method: 'post',
  118. headers:{
  119. 'module': encodeURIComponent('待补货数量')
  120. }
  121. })
  122. }
  123. // 补货单 确认补货
  124. export const shelfReplenishConfirm = (params) => {
  125. return axios({
  126. url: '/shelfReplenish/confirm',
  127. data: params,
  128. method: 'post',
  129. headers:{
  130. 'module': encodeURIComponent('确认补货')
  131. }
  132. })
  133. }
  134. // 补货单 检查补货单库存数量
  135. export const shelfReplenishDetailStock = (params) => {
  136. return axios({
  137. url: '/shelfReplenish/detail/checkDetailStockQty',
  138. data: params,
  139. method: 'post',
  140. headers:{
  141. 'module': encodeURIComponent('补货单库存数量')
  142. }
  143. })
  144. }
  145. // 补货单 详情
  146. export const shelfReplenishDetail = (params) => {
  147. const url = `/shelfReplenish/findBySn/${params.sn}`
  148. delete params.sn
  149. return axios({
  150. url: url,
  151. data: params,
  152. method: 'get',
  153. headers:{
  154. 'module': encodeURIComponent('补货单详情')
  155. }
  156. })
  157. }
  158. // 补货单 入库
  159. export const shelfReplenishPutStock = (params) => {
  160. return axios({
  161. url: '/shelfReplenish/putStock',
  162. data: params,
  163. method: 'post',
  164. headers:{
  165. 'module': encodeURIComponent('签收入库')
  166. }
  167. })
  168. }
  169. // 补货单 出库
  170. export const shelfReplenishOutStock = (params) => {
  171. return axios({
  172. url: '/shelfReplenish/outStock',
  173. data: params,
  174. method: 'post',
  175. headers:{
  176. 'module': encodeURIComponent('出库')
  177. }
  178. })
  179. }
  180. // 补货单 打印贴签
  181. export const shelfReplenishPrintSign = (params) => {
  182. return axios({
  183. url: '/shelfReplenish/detail/printSign',
  184. data: params,
  185. method: 'post',
  186. headers:{
  187. 'module': encodeURIComponent('打印贴签')
  188. }
  189. })
  190. }
  191. // 定时任务,废弃
  192. export const shelfReplenishTaskInsertBill = (params) => {
  193. return axios({
  194. url: '/shelfReplenish/taskInsertBill',
  195. data: params,
  196. method: 'post'
  197. })
  198. }
  199. // 待补货产品
  200. export const queryWaitReplenish = (params) => {
  201. return axios({
  202. url: '/shelfProduct/queryWaitReplenish',
  203. data: params,
  204. method: 'post',
  205. headers:{
  206. 'module': encodeURIComponent('待补货产品列表')
  207. }
  208. })
  209. }
  210. // 货架产品
  211. export const queryShelfProduct = (params) => {
  212. return axios({
  213. url: '/shelfProduct/queryShelfProduct',
  214. data: params,
  215. method: 'post',
  216. headers:{
  217. 'module': encodeURIComponent('全部货架产品列表')
  218. }
  219. })
  220. }