dispatch.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. })
  12. }
  13. // 发货单明细列表分页
  14. export const dispatchDetaillList = (params) => {
  15. const url = `/dispatch/detail/queryPage/${params.pageNo}/${params.pageSize}`
  16. delete params.pageNo
  17. delete params.pageSize
  18. return axios({
  19. url: url,
  20. data: params,
  21. method: 'post'
  22. })
  23. }
  24. // 根据销售单SN查询发货单
  25. export const findBySalesBillSn = (params) => {
  26. return axios({
  27. url: `/dispatch/findBySalesBillSn/${params.salesBillSn}`,
  28. method: 'get'
  29. })
  30. }
  31. // 根据发货单SN查询发货单对象
  32. export const dispatchFindBySn = (params) => {
  33. return axios({
  34. url: `/dispatch/findBySn/${params.dispatchBillSn}`,
  35. method: 'get'
  36. })
  37. }
  38. // 发货单统计查询
  39. export const dispatchQueryCount = (params) => {
  40. return axios({
  41. url: '/dispatch/queryCount',
  42. data: params,
  43. method: 'post'
  44. })
  45. }
  46. // 对单通过
  47. export const dispatchCheck = (params) => {
  48. return axios({
  49. url: `/dispatch/check/${params.dispatchBillSn}`,
  50. data: params,
  51. method: 'post'
  52. })
  53. }
  54. // 出库
  55. export const dispatchStockOut = (params) => {
  56. return axios({
  57. url: `/dispatch/stockOut/${params.dispatchBillSn}`,
  58. method: 'get'
  59. })
  60. }
  61. // 备货审核
  62. export const dispatchStockUpAduit = (params) => {
  63. return axios({
  64. url: '/dispatch/stockUpAduit',
  65. data: params,
  66. method: 'post'
  67. })
  68. }
  69. // 允许备货打印
  70. export const dispatchPrintStatus = (params) => {
  71. return axios({
  72. url: `/dispatch/updatePrintStatus/${params.dispatchBillSn}/${params.printStatus}`,
  73. method: 'get'
  74. })
  75. }
  76. // 下推 详情 打印
  77. export const dispatchDetailPrint = params => {
  78. const url = `/dispatch/print/${params.type}`
  79. delete params.type
  80. return axios.request({
  81. url: url,
  82. data: params,
  83. method: 'post',
  84. responseType: 'blob'
  85. })
  86. }
  87. // 下推 详情 该销售单的产品二级分类
  88. export const dispatchDetailType = (params) => {
  89. return axios({
  90. url: `/dispatch/detail/queryProductType/${params.dispatchBillSn}`,
  91. method: 'get'
  92. })
  93. }
  94. // 下推 详情 导出Excel
  95. export const dispatchDetailExcel = params => {
  96. const url = `/dispatch/excel/${params.printType}`
  97. delete params.printType
  98. return axios.request({
  99. url: url,
  100. data: params,
  101. method: 'post',
  102. responseType: 'blob'
  103. })
  104. }
  105. // 备货审核列表分页
  106. export const dispatchlBhshList = (params) => {
  107. const url = `/dispatch/queryBhshPage/${params.pageNo}/${params.pageSize}`
  108. delete params.pageNo
  109. delete params.pageSize
  110. return axios({
  111. url: url,
  112. data: params,
  113. method: 'post'
  114. })
  115. }
  116. // 发货单统计查询
  117. export const dispatchQueryBhshCount = (params) => {
  118. return axios({
  119. url: '/dispatch/queryBhshCount',
  120. data: params,
  121. method: 'post'
  122. })
  123. }