purchaseReturnApply.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. import { axios } from '@/utils/request'
  2. // 采购退货申请单列表 分页
  3. export const purchaseReturnList = (params) => {
  4. const url = `/purchaseReturnApply/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 purchaseReturnSave = (params) => {
  15. return axios({
  16. url: '/purchaseReturnApply/create',
  17. data: params,
  18. method: 'post'
  19. })
  20. }
  21. // 采购退货申请单 删除
  22. export const purchaseReturnDel = (params) => {
  23. return axios({
  24. url: `/purchaseReturnApply/delete`,
  25. data: params,
  26. method: 'post'
  27. })
  28. }
  29. // 生成采购退货单
  30. export const createPurchaseReturnBill = (params) => {
  31. return axios({
  32. url: `/purchaseReturnApply/createPurchaseReturnBill`,
  33. data: params,
  34. method: 'post'
  35. })
  36. }
  37. // 选择产品列表
  38. export const queryDealerScopeProductPage = (params) => {
  39. const url = `/purchaseReturnApply/queryDealerScopeProductPage/${params.pageNo}/${params.pageSize}`
  40. delete params.pageNo
  41. delete params.pageSize
  42. return axios({
  43. url: url,
  44. data: params,
  45. method: 'post'
  46. })
  47. }
  48. // 采购退货 详情 添加产品
  49. export const purchaseReturnDetailSave = (params) => {
  50. return axios({
  51. url: '/purchaseReturnApply/detail/create',
  52. data: params,
  53. method: 'post'
  54. })
  55. }
  56. // 采购退货申请单 详情 删除
  57. export const purchaseReturnDetailDel = (params) => {
  58. return axios({
  59. url: `/purchaseReturnApply/detail/delete`,
  60. data: params,
  61. method: 'post'
  62. })
  63. }
  64. // 采购退货 详情 全部删除
  65. export const purchaseReturnDetailDelAll = (params) => {
  66. return axios({
  67. url: `/purchaseReturnApply/detail/deleteAll`,
  68. data: params,
  69. method: 'post'
  70. })
  71. }
  72. // 申请单详情修改数量
  73. export const purchaseReturnModifyQty = (params) => {
  74. return axios({
  75. url: `/purchaseReturnApply/detail/modifyQty`,
  76. data: params,
  77. method: 'post'
  78. })
  79. }
  80. // 申请单详情修改退货原因
  81. export const modifyReturnReason = (params) => {
  82. return axios({
  83. url: `/purchaseReturnApply/detail/modifyReturnReason`,
  84. data: params,
  85. method: 'post'
  86. })
  87. }
  88. // 批量修改退货原因
  89. export const modifyReturnReasonList = (params) => {
  90. return axios({
  91. url: `/purchaseReturnApply/detail/modifyReturnReasonList`,
  92. data: params,
  93. method: 'post'
  94. })
  95. }
  96. // 申请单详情列表 分页
  97. export const purchaseReturnDetailList = (params) => {
  98. const url = `/purchaseReturnApply/detail/queryPage/${params.pageNo}/${params.pageSize}`
  99. delete params.pageNo
  100. delete params.pageSize
  101. return axios({
  102. url: url,
  103. data: params,
  104. method: 'post'
  105. })
  106. }
  107. // 获取采购退货申请单 详情
  108. export const purchaseReturnDetail = (params) => {
  109. return axios({
  110. url: `/purchaseReturnApply/findBySn/${params.sn}`,
  111. method: 'get'
  112. })
  113. }
  114. // 采购退货申请单提交
  115. export const purchaseReturnSubmit = (params) => {
  116. return axios({
  117. url: `/purchaseReturnApply/submit/${params.sn}`,
  118. method: 'get'
  119. })
  120. }
  121. // 采购退货申请单再次编辑
  122. export const purchaseReturnAgainCreate = (params) => {
  123. return axios({
  124. url: `/purchaseReturnApply/againCreate/${params.sn}`,
  125. method: 'get'
  126. })
  127. }
  128. // 导出删除项
  129. export const exportDeleteExcel = (params) => {
  130. return axios({
  131. url: `/purchaseReturnApply/detail/downloadDeleteFailExcel/${params.sn}`,
  132. data: params,
  133. method: 'post',
  134. responseType: 'blob'
  135. })
  136. }
  137. // 导出错误项
  138. export const exportErrorExcel = (params) => {
  139. return axios({
  140. url: `/purchaseReturnApply/detail/downloadFailExcel`,
  141. data: params,
  142. method: 'post',
  143. responseType: 'blob'
  144. })
  145. }
  146. // 解析产品的导入模板
  147. export const purchaseReturnApplyReadExcel = (params) => {
  148. return axios({
  149. url: `/purchaseReturnApply/detail/readExcel`,
  150. data: params,
  151. method: 'post'
  152. })
  153. }
  154. // 批量导入产品
  155. export const purchaseReturnApplyCreateList = (params) => {
  156. return axios({
  157. url: `/purchaseReturnApply/detail/createList`,
  158. data: params,
  159. method: 'post'
  160. })
  161. }
  162. // 导出明细
  163. export const purchaseReturnApplyExport = (params) => {
  164. return axios({
  165. url: `/purchaseReturnApply/excel/${params.sn}`,
  166. method: 'get',
  167. responseType: 'blob'
  168. })
  169. }
  170. // 详情 打印
  171. export const purchaseReturnApplyPrint = params => {
  172. const data = {
  173. url: `/purchaseReturnApply/print/${params.sn}/${params.type}`,
  174. method: 'get'
  175. }
  176. // 喷墨打印
  177. if (params.type == 'INK') {
  178. data.responseType = 'blob'
  179. }
  180. return axios(data)
  181. }