dispatch.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. import { axios } from '@/utils/request'
  2. // 发货列表分页
  3. export const dispatchlList = (params) => {
  4. const url = `/dispatch/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 dispatchDetaillList = (params) => {
  18. const url = `/dispatch/detail/queryPage/${params.pageNo}/${params.pageSize}`
  19. delete params.pageNo
  20. delete params.pageSize
  21. return axios({
  22. url: url,
  23. data: params,
  24. method: 'post',
  25. headers:{
  26. 'module': encodeURIComponent('明细列表查询')
  27. }
  28. })
  29. }
  30. // 出库详情列表
  31. export const dispatchDetaillListForOut = (params) => {
  32. const url = `/dispatch/detail/queryPageForOut/${params.pageNo}/${params.pageSize}`
  33. delete params.pageNo
  34. delete params.pageSize
  35. return axios({
  36. url: url,
  37. data: params,
  38. method: 'post',
  39. headers:{
  40. 'module': encodeURIComponent('明细列表查询')
  41. }
  42. })
  43. }
  44. // 根据销售单sn查询关联的所有发货单
  45. export const queryBySalesBillSn = (params) => {
  46. return axios({
  47. url: `/dispatch/queryBySalesBillSn/${params.salesBillSn}`,
  48. method: 'get'
  49. })
  50. }
  51. // 根据销售单SN查询发货单
  52. export const findBySalesBillSn = (params) => {
  53. return axios({
  54. url: `/dispatch/findBySalesBillSn/${params.salesBillSn}`,
  55. method: 'get'
  56. })
  57. }
  58. // 根据发货单SN查询发货单对象
  59. export const dispatchFindBySn = (params) => {
  60. return axios({
  61. url: `/dispatch/findBySn/${params.dispatchBillSn}`,
  62. method: 'get'
  63. })
  64. }
  65. // 发货单统计查询
  66. export const dispatchQueryCount = (params) => {
  67. return axios({
  68. url: '/dispatch/queryCount',
  69. data: params,
  70. method: 'post'
  71. })
  72. }
  73. // 对单通过
  74. export const dispatchCheck = (params) => {
  75. return axios({
  76. url: `/dispatch/check/${params.dispatchBillSn}`,
  77. data: params,
  78. method: 'post',
  79. headers:{
  80. 'module': encodeURIComponent('对单通过')
  81. }
  82. })
  83. }
  84. // 出库
  85. export const dispatchStockOut = (params) => {
  86. return axios({
  87. url: `/dispatch/stockOut/${params.dispatchBillSn}`,
  88. method: 'get',
  89. headers:{
  90. 'module': encodeURIComponent('出库')
  91. }
  92. })
  93. }
  94. // 修改库存类型
  95. export const dispatchUpdateStockType = (params) => {
  96. return axios({
  97. url: '/dispatch/updateStockType',
  98. data: params,
  99. method: 'post',
  100. headers:{
  101. 'module': encodeURIComponent('下推单修改轮胎库存类型')
  102. }
  103. })
  104. }
  105. // 备货审核
  106. export const dispatchStockUpAduit = (params) => {
  107. return axios({
  108. url: '/dispatch/stockUpAduit',
  109. data: params,
  110. method: 'post',
  111. headers:{
  112. 'module': encodeURIComponent('备货审核')
  113. }
  114. })
  115. }
  116. // 允许备货打印
  117. export const dispatchPrintStatus = (params) => {
  118. return axios({
  119. url: `/dispatch/updatePrintStatus/${params.dispatchBillSn}/${params.printStatus}`,
  120. method: 'get',
  121. headers:{
  122. 'module': encodeURIComponent(params.printStatus == 'UNABLE_PRINT' ? '暂不打印' : '允许备货打印')
  123. }
  124. })
  125. }
  126. // 查询备货说明列表
  127. export const queryExplainList = (params) => {
  128. return axios({
  129. url: `/dispatch/queryExplainList/${params.dispatchBillSn}`,
  130. method: 'get',
  131. headers:{
  132. 'module': encodeURIComponent('查询备货说明列表')
  133. }
  134. })
  135. }
  136. // 保存备货说明
  137. export const saveExplain = (params) => {
  138. return axios({
  139. url: '/dispatch/saveExplain',
  140. data: params,
  141. method: 'post',
  142. headers:{
  143. 'module': encodeURIComponent('保存备货说明')
  144. }
  145. })
  146. }
  147. // 批量备货打印
  148. export const dispatchBatchPrintStatus = (params) => {
  149. return axios({
  150. url: `/dispatch/batchUpdatePrintStatus`,
  151. data: params,
  152. method: 'post',
  153. headers:{
  154. 'module': encodeURIComponent('允许备货打印')
  155. }
  156. })
  157. }
  158. // 下推 详情 打印
  159. export const dispatchDetailPrint = params => {
  160. const url = `/dispatch/print/${params.type}`
  161. return axios.request({
  162. url: url,
  163. data: params,
  164. method: 'post',
  165. headers:{
  166. 'module': encodeURIComponent(params.type.indexOf('_TYPE')>=0 ? '发货分类打印' : '发货打印')
  167. }
  168. })
  169. }
  170. // 下推 详情 该销售单的产品二级分类
  171. export const dispatchDetailType = (params) => {
  172. return axios({
  173. url: `/dispatch/detail/queryProductType/${params.dispatchBillSn}`,
  174. method: 'get'
  175. })
  176. }
  177. // 下推 详情 导出Excel
  178. export const dispatchDetailExcel = params => {
  179. const url = `/dispatch/excel/${params.printType}`
  180. return axios.request({
  181. url: url,
  182. data: params,
  183. method: 'post',
  184. responseType: 'blob',
  185. headers:{
  186. 'module': encodeURIComponent(params.printType.indexOf('_TYPE')>=0 ? '发货分类导出' : '导出Excel')
  187. }
  188. })
  189. }
  190. // 备货审核列表分页
  191. export const dispatchlBhshList = (params) => {
  192. const url = `/dispatch/queryBhshPage/${params.pageNo}/${params.pageSize}`
  193. delete params.pageNo
  194. delete params.pageSize
  195. return axios({
  196. url: url,
  197. data: params,
  198. method: 'post',
  199. headers:{
  200. 'module': encodeURIComponent('列表查询')
  201. }
  202. })
  203. }
  204. // 发货单统计查询
  205. export const dispatchQueryBhshCount = (params) => {
  206. return axios({
  207. url: '/dispatch/queryBhshCount',
  208. data: params,
  209. method: 'post'
  210. })
  211. }