index.uts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. }