index.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // @ts-ignore
  2. import request from '@/utils/request'
  3. // @ts-ignore
  4. import { calculateShelfLifeType, getCommodityRuleType, getIReceivingTaskType, getProductAttributeType, getReceivingAsnDetailsType, setProductAttributeDataType, setProductAttributeParamsType, setReceivingType} from '@/types/takeDelivery'
  5. /**
  6. * 获取收货任务详情以及当前员工收货信息
  7. * @param data
  8. */
  9. export function getIReceivingTask(data:getIReceivingTaskType) {
  10. return request({
  11. url: '/api/wms/receiving/getTask',
  12. method: 'post',
  13. data:JSON.stringify(data),
  14. })
  15. }
  16. /**
  17. * 待收货ASN详情
  18. * @param params
  19. */
  20. export function getReceivingAsnDetails(params:getReceivingAsnDetailsType) {
  21. return request({
  22. url: '/api/wms/receiving/get-asn-details',
  23. method: 'get',
  24. params
  25. })
  26. }
  27. /**
  28. * 获取商品物理属性
  29. * @param params
  30. */
  31. export function getProductAttribute(params:getProductAttributeType) {
  32. return request({
  33. url: '/api/basic/product/attribute',
  34. method: 'get',
  35. params
  36. })
  37. }
  38. /**
  39. * 获取商品物理属性
  40. * @param params
  41. */
  42. export function setProductAttribute(params:setProductAttributeParamsType,data:setProductAttributeDataType) {
  43. return request({
  44. url: '/api/basic/product/update-attribute',
  45. method: 'post',
  46. params,
  47. data
  48. })
  49. }
  50. /**
  51. * 获取商品批次属性
  52. * @param params
  53. */
  54. export function getProductLot(params:getProductAttributeType) {
  55. return request({
  56. url: '/api/basic/product/lot',
  57. method: 'get',
  58. params
  59. })
  60. }
  61. /**
  62. * 获取商品批次属性
  63. * @param params
  64. */
  65. export function calculateShelfLife(params:calculateShelfLifeType) {
  66. return request({
  67. url: '/api/basic/product/calculateShelfLife',
  68. method: 'get',
  69. params
  70. })
  71. }
  72. /**
  73. * 查询商品规则
  74. * @param params
  75. */
  76. export function getCommodityRule(params:getCommodityRuleType) {
  77. return request({
  78. url: '/api/base/commodity/rule/list',
  79. method: 'get',
  80. params
  81. })
  82. }
  83. /** 货主规则 */
  84. export function getOwnerRule(code: string) {
  85. return request({
  86. url: '/api/basic/owner/rule/get',
  87. method: 'get',
  88. params: { code },
  89. })
  90. }
  91. /** 组合商品外箱唯一码换子件唯一码 */
  92. export function getPanpassCodeRelation(params: { docNo: string; uniqueCode: string; customer: string }) {
  93. return request({
  94. url: '/api/wms/panpass/code-relation',
  95. method: 'post',
  96. params,
  97. })
  98. }
  99. /**
  100. * 完成收货
  101. * @param params
  102. */
  103. export function setReceiving(data:setReceivingType) {
  104. return request({
  105. url: '/api/wms/receiving',
  106. method: 'post',
  107. data
  108. })
  109. }
  110. /**
  111. * 完成收货
  112. * @param params
  113. */
  114. export function setBotReceiving(data:setReceivingType) {
  115. return request({
  116. url: '/api/wms/receiving/botReceiving',
  117. method: 'post',
  118. data
  119. })
  120. }