index.uts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /**
  2. * 出库单接口
  3. */
  4. import { request } from '../../utils/request'
  5. /**
  6. * 获取我的领用出库单列表
  7. * @param pageNum 页码
  8. * @param pageSize 每页数量
  9. * @param keyword 关键字
  10. * @param receiverUserId 领用人ID
  11. * @param signStatus 签收状态 PENDING-待签收
  12. * @returns
  13. */
  14. export const getProductSalseList = (pageNum: number, pageSize: number, keyword: string, receiverUserId: string, signStatus: string): Promise<any> => {
  15. let url = `/mes/wm/productsalse/myList?pageNum=${pageNum}&pageSize=${pageSize}&receiverUserId=${receiverUserId}`
  16. if (keyword != null && keyword.length > 0) {
  17. url += `&salseCode=${encodeURIComponent(keyword)}`
  18. }
  19. if (signStatus != null && signStatus.length > 0) {
  20. url += `&signStatus=${signStatus}`
  21. }
  22. return request({
  23. url: url,
  24. method: 'GET'
  25. })
  26. }
  27. /**
  28. * 获取出库单详情
  29. * @param salseId 出库单ID
  30. * @returns
  31. */
  32. export const getProductSalseById = (salseId: string): Promise<any> => {
  33. return request({
  34. url: `/mes/wm/productsalse/${salseId}`,
  35. method: 'GET'
  36. })
  37. }
  38. /**
  39. * 签收取货
  40. * @param salseId 出库单ID
  41. * @returns
  42. */
  43. export const signReceive = (salseId: string): Promise<any> => {
  44. return request({
  45. url: `/mes/wm/productsalse/signReceive/${salseId}`,
  46. method: 'PUT'
  47. })
  48. }
  49. /**
  50. * 签收(明细级)
  51. * @param lineId 出库单明细ID
  52. * @returns
  53. */
  54. export const signReceiveLine = (lineId: string): Promise<any> => {
  55. return request({
  56. url: `/mes/wm/productsalse/signReceiveLine/${lineId}`,
  57. method: 'PUT'
  58. })
  59. }
  60. /**
  61. * 一键签收
  62. * @param salseId 出库单ID
  63. * @returns
  64. */
  65. export const signReceiveAll = (salseId: string): Promise<any> => {
  66. return request({
  67. url: `/mes/wm/productsalse/signReceiveAll/${salseId}`,
  68. method: 'PUT'
  69. })
  70. }
  71. /**
  72. * 获取待签收物料明细列表
  73. * @param pageNum 页码
  74. * @param pageSize 每页数量
  75. * @param receiverUserId 领用人ID
  76. * @returns
  77. */
  78. export const getPendingReceiveLines = (pageNum: number, pageSize: number, receiverUserId: string): Promise<any> => {
  79. return request({
  80. url: `/mes/wm/productsalse/lineList?pageNum=${pageNum}&pageSize=${pageSize}&receiverUserId=${receiverUserId}&receiverStatus=N`,
  81. method: 'GET'
  82. })
  83. }