allocateReturn.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. import { axios } from '@/utils/request'
  2. // 审核调拨退货
  3. export const allocateReturnAudit = params => {
  4. return axios({
  5. url: '/allocateReturn/audit',
  6. data: params,
  7. method: 'post',
  8. headers: {
  9. 'module': encodeURIComponent('审核')
  10. }
  11. })
  12. }
  13. // 删除调拨退货
  14. export const allocateReturnDelete = params => {
  15. return axios({
  16. url: `/allocateReturn/delete/${params.allocateReturnSn}`,
  17. data: params,
  18. method: 'post',
  19. headers: {
  20. 'module': encodeURIComponent('删除')
  21. }
  22. })
  23. }
  24. // 品检 提交
  25. export const allocateReturnCheckSubmit = params => {
  26. return axios({
  27. url: '/allocateReturn/check',
  28. data: params,
  29. method: 'post',
  30. headers: {
  31. 'module': encodeURIComponent('提交')
  32. }
  33. })
  34. }
  35. // 财务审核调拨退货
  36. export const allocateReturnFinanceAudit = params => {
  37. return axios({
  38. url: '/allocateReturn/financeAudit',
  39. data: params,
  40. method: 'post',
  41. headers: {
  42. 'module': encodeURIComponent('退货确认')
  43. }
  44. })
  45. }
  46. // 导出excel
  47. export const allocateReturnExcel = params => {
  48. return axios({
  49. url: `/allocateReturn/excel/${params.allocateReturnSn}`,
  50. method: 'get',
  51. responseType: 'blob',
  52. headers: {
  53. 'module': encodeURIComponent('导出excel')
  54. }
  55. })
  56. }
  57. // 打印
  58. export const allocateReturnPrint = params => {
  59. return axios({
  60. url: `/allocateReturn/print/${params.printType}`,
  61. method: 'post',
  62. data: params,
  63. responseType: 'blob',
  64. headers: {
  65. 'module': encodeURIComponent('打印')
  66. }
  67. })
  68. }
  69. // 查询调拨退货详情
  70. export const allocateReturnQueryBySn = params => {
  71. return axios({
  72. url: `/allocateReturn/queryBySn/${params.allocateReturnSn}`,
  73. method: 'get'
  74. })
  75. }
  76. // 分页查询调拨退货列表
  77. export const allocateReturnQueryPage = (params) => {
  78. const url = `/allocateReturn/queryPage/${params.pageNo}/${params.pageSize}`
  79. delete params.pageNo
  80. delete params.pageSize
  81. return axios({
  82. url: url,
  83. data: params,
  84. method: 'post',
  85. headers: {
  86. 'module': encodeURIComponent('列表查询')
  87. }
  88. })
  89. }
  90. // 分页查询调拨退货确认列表
  91. export const allocateReturnQueryConfirmPage = (params) => {
  92. const url = `/allocateReturn/queryConfirmPage/${params.pageNo}/${params.pageSize}`
  93. delete params.pageNo
  94. delete params.pageSize
  95. return axios({
  96. url: url,
  97. data: params,
  98. method: 'post',
  99. headers: {
  100. 'module': encodeURIComponent('列表查询')
  101. }
  102. })
  103. }
  104. // 保存调拨退货
  105. export const allocateReturnSave = params => {
  106. return axios({
  107. url: '/allocateReturn/save',
  108. data: params,
  109. method: 'post',
  110. headers: {
  111. 'module': encodeURIComponent('新增')
  112. }
  113. })
  114. }
  115. // 提交调拨退货
  116. export const allocateReturnSubmit = params => {
  117. return axios({
  118. url: '/allocateReturn/submit',
  119. data: params,
  120. method: 'post',
  121. headers: {
  122. 'module': encodeURIComponent('提交')
  123. }
  124. })
  125. }
  126. // 调拨退货品检批量处理
  127. export const allocateReturnCheck = params => {
  128. return axios({
  129. url: `/allocReturnDetail/check/${params.allocateReturnSn}/${params.allocateCheckType}`,
  130. data: params.list,
  131. method: 'post',
  132. headers: {
  133. 'module': encodeURIComponent(params.allocateCheckType == 'CUSTOM' ? '修改返库数量' : '批量返库')
  134. }
  135. })
  136. }
  137. // 删除调拨退货明细
  138. export const allocReturnDetailDelete = params => {
  139. return axios({
  140. url: '/allocReturnDetail/delete',
  141. data: params,
  142. method: 'post',
  143. headers: {
  144. 'module': encodeURIComponent('删除')
  145. }
  146. })
  147. }
  148. // 新增调拨退货明细
  149. export const allocReturnDetailInsert = params => {
  150. return axios({
  151. url: '/allocReturnDetail/insert',
  152. data: params,
  153. method: 'post',
  154. headers: {
  155. 'module': encodeURIComponent('添加')
  156. }
  157. })
  158. }
  159. // 批量添加退货明细
  160. export const allocReturnDetailInsertBatch = params => {
  161. return axios({
  162. url: '/allocReturnDetail/insertBatch',
  163. data: params,
  164. method: 'post',
  165. headers: {
  166. 'module': encodeURIComponent('批量添加')
  167. }
  168. })
  169. }
  170. // 分页查询调拨退货明细列表
  171. export const allocReturnDetailQueryPage = (params) => {
  172. const url = `/allocReturnDetail/queryPage/${params.pageNo}/${params.pageSize}`
  173. delete params.pageNo
  174. delete params.pageSize
  175. return axios({
  176. url: url,
  177. data: params,
  178. method: 'post',
  179. headers: {
  180. 'module': encodeURIComponent('明细列表查询')
  181. }
  182. })
  183. }
  184. // 更新调拨退货明细
  185. export const allocReturnDetailUpdate = params => {
  186. return axios({
  187. url: '/allocReturnDetail/update',
  188. data: params,
  189. method: 'post',
  190. headers: {
  191. 'module': encodeURIComponent('修改明细')
  192. }
  193. })
  194. }
  195. // 调拨退货 不抓单 选择产品分页列表(经销商)
  196. export const queryStockProductPage = (params) => {
  197. const url = `/allocateReturn/queryStockProductPage/${params.pageNo}/${params.pageSize}`
  198. delete params.pageNo
  199. delete params.pageSize
  200. return axios({
  201. url: url,
  202. data: params,
  203. method: 'post',
  204. headers: {
  205. 'module': encodeURIComponent('列表查询')
  206. }
  207. })
  208. }
  209. // 调拨退货 不抓单 选择产品分页列表(非经销商)
  210. export const stockQueryStockProductPage = (params) => {
  211. const url = `/stock/queryStockProductPage/${params.pageNo}/${params.pageSize}`
  212. delete params.pageNo
  213. delete params.pageSize
  214. return axios({
  215. url: url,
  216. data: params,
  217. method: 'post',
  218. headers: {
  219. 'module': encodeURIComponent('列表查询')
  220. }
  221. })
  222. }