dispatch.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 dispatchStockOut = (params) => {
  48. return axios({
  49. url: `/dispatch/stockOut/${params.dispatchBillSn}`,
  50. method: 'get'
  51. })
  52. }
  53. // 备货审核
  54. export const dispatchStockUpAduit = (params) => {
  55. return axios({
  56. url: '/dispatch/stockUpAduit',
  57. data: params,
  58. method: 'post'
  59. })
  60. }
  61. // 下推 详情 打印
  62. export const dispatchDetailPrint = params => {
  63. const url = `/dispatch/print/${params.type}`
  64. delete params.type
  65. return axios.request({
  66. url: url,
  67. data: params,
  68. method: 'post',
  69. responseType: 'blob'
  70. })
  71. }
  72. // 下推 详情 该销售单的产品二级分类
  73. export const dispatchDetailType = (params) => {
  74. return axios({
  75. url: `/dispatch/detail/queryProductType/${params.dispatchBillSn}`,
  76. method: 'get'
  77. })
  78. }
  79. // 下推 详情 导出Excel
  80. export const dispatchDetailExcel = params => {
  81. const url = `/dispatch/excel/${params.printType}`
  82. delete params.printType
  83. return axios.request({
  84. url: url,
  85. data: params,
  86. method: 'post',
  87. responseType: 'blob'
  88. })
  89. }
  90. // 备货审核列表分页
  91. export const dispatchlBhshList = (params) => {
  92. const url = `/dispatch/queryBhshPage/${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. })
  100. }
  101. // 发货单统计查询
  102. export const dispatchQueryBhshCount = (params) => {
  103. return axios({
  104. url: '/dispatch/queryBhshCount',
  105. data: params,
  106. method: 'post'
  107. })
  108. }