receiving.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import { axios } from '@/utils/request'
  2. // 入库 列表 有分页
  3. export const receivingList = (params) => {
  4. const url = `/receiving/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 receivingCount = (params) => {
  18. return axios({
  19. url: '/receiving/queryCount',
  20. data: params,
  21. method: 'post'
  22. })
  23. }
  24. // 入库 详情
  25. export const receivingDetailSn = (params) => {
  26. return axios({
  27. url: `/receiving/findBySn/${params.sn}`,
  28. method: 'get',
  29. headers:{
  30. 'module': encodeURIComponent('详情信息')
  31. }
  32. })
  33. }
  34. // 入库 入库
  35. export const receivingStockIn = (params) => {
  36. return axios({
  37. url: '/receiving/stockIn',
  38. data: params,
  39. method: 'post',
  40. headers:{
  41. 'module': encodeURIComponent('确认入库')
  42. }
  43. })
  44. }
  45. // 入库 入库审核
  46. export const receivingStockInAudit = (params) => {
  47. return axios({
  48. url: '/receiving/stockInAudit',
  49. data: params,
  50. method: 'post',
  51. headers:{
  52. 'module': encodeURIComponent(params.auditState=='FINISH'?'审核通过':'审核不通过')
  53. }
  54. })
  55. }
  56. // 入库 详情 有分页
  57. export const receivingDetailList = (params) => {
  58. const url = `/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`
  59. delete params.pageNo
  60. delete params.pageSize
  61. return axios({
  62. url: url,
  63. data: params,
  64. method: 'post',
  65. headers:{
  66. 'module': encodeURIComponent('明细列表')
  67. }
  68. })
  69. }
  70. // 入库审核 详情 打印
  71. export const receivingDetailPrint = params => {
  72. const data = {
  73. url: `receiving/print/${params.sn}/${params.type}`,
  74. method: 'get',
  75. headers:{
  76. 'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印':'针式打印')
  77. }
  78. }
  79. // 喷墨打印
  80. if (params.type == 'INK') {
  81. data.responseType = 'blob'
  82. }
  83. return axios.request(data)
  84. }
  85. // 备货 详情 导出
  86. export const receivingExport = params => {
  87. return axios.request({
  88. url: `/receiving/export`,
  89. data: params,
  90. method: 'post',
  91. responseType: 'blob',
  92. headers:{
  93. 'module': encodeURIComponent('导出')
  94. }
  95. })
  96. }
  97. // 签收入库 列表 有分页
  98. export const receivingStockList = (params) => {
  99. const url = `/receiving/queryStockInPage/${params.pageNo}/${params.pageSize}`
  100. delete params.pageNo
  101. delete params.pageSize
  102. return axios({
  103. url: url,
  104. data: params,
  105. method: 'post',
  106. headers:{
  107. 'module': encodeURIComponent('列表查询')
  108. }
  109. })
  110. }
  111. // 入库审核 列表 有分页
  112. export const receivingAuditList = (params) => {
  113. const url = `/receiving/queryStockInAuditPage/${params.pageNo}/${params.pageSize}`
  114. delete params.pageNo
  115. delete params.pageSize
  116. return axios({
  117. url: url,
  118. data: params,
  119. method: 'post',
  120. headers:{
  121. 'module': encodeURIComponent('入库审核列表查询')
  122. }
  123. })
  124. }
  125. // 修改入库数量
  126. export const updateRealPutQty = (params) => {
  127. const url = `/receivingDetail/updateRealPutQty`
  128. return axios({
  129. url: url,
  130. data: params,
  131. method: 'post',
  132. headers:{
  133. 'module': encodeURIComponent('修改入库数量')
  134. }
  135. })
  136. }