enchase.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. import request from '@/utils/data_request'
  2. import {
  3. usertoken
  4. } from '../config'
  5. import {
  6. parseXML,
  7. parseEncodedData
  8. } from '@/utils/transUtil.js'
  9. //获取【生产组织】
  10. export function getOrg() {
  11. const data = {
  12. usertoken: usertoken,
  13. searchType: 'org'
  14. }
  15. // const urlEncodedData = Object.keys(data)
  16. // .map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
  17. // .join('&');
  18. // console.log(urlEncodedData)
  19. return request({
  20. 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseBaseData',
  21. 'method': 'post',
  22. 'data': data
  23. })
  24. }
  25. //获取【生产车间】
  26. export function getDept() {
  27. const data = {
  28. usertoken: usertoken,
  29. searchType: 'dept'
  30. }
  31. return request({
  32. 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseBaseData',
  33. 'method': 'post',
  34. 'data': data
  35. })
  36. }
  37. //获取【装箱方式】
  38. export function getenchasetype() {
  39. const data = {
  40. usertoken: usertoken,
  41. searchType: 'enchasetype'
  42. }
  43. return request({
  44. 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseBaseData',
  45. 'method': 'post',
  46. 'data': data
  47. })
  48. }
  49. //根据箱号Id(二维码)获取装箱明细信息
  50. export function GetClothesEnchaseByQRCode(data) {
  51. const param = {
  52. usertoken: usertoken,
  53. QRCode: data
  54. }
  55. console.log(param)
  56. return request({
  57. 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseByQRCode',
  58. 'method': 'post',
  59. 'data': param
  60. })
  61. }
  62. //根据成衣条码(唯一码)获取唯一码信息
  63. // export function GetClothesEnchaseByBarCode(data) {
  64. // const param = {
  65. // usertoken: usertoken,
  66. // BarCode: data
  67. // }
  68. // return request({
  69. // 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseByBarCode',
  70. // 'method': 'post',
  71. // 'data': param
  72. // })
  73. // }
  74. //根据成衣条码(唯一码)与订单号获取成衣信息
  75. export function GetClothesEnchaseByBarCode(barCode, orderNo = null) {
  76. let param = ''
  77. if (orderNo !== null) {
  78. param = {
  79. usertoken: usertoken,
  80. BarCode: barCode,
  81. orderNo: orderNo
  82. }
  83. } else {
  84. param = {
  85. usertoken: usertoken,
  86. BarCode: barCode,
  87. orderNo:''
  88. }
  89. }
  90. return request({
  91. 'url': '/services/LUTAIWebService.asmx/GetClothesEnchaseByBarCode',
  92. 'method': 'post',
  93. 'data': param
  94. })
  95. }
  96. //生成装箱校验
  97. export function GenerateClothesEnchaseCheck(data) {
  98. // let encodeParam = parseEncodedData(data)
  99. const param = {
  100. usertoken: usertoken,
  101. jsonData: data
  102. }
  103. return request({
  104. 'url': '/services/LUTAIWebService.asmx/GenerateClothesEnchaseCheck',
  105. 'method': 'post',
  106. 'data': param
  107. })
  108. }
  109. //生成装箱
  110. export function GenerateClothesEnchase(data) {
  111. // let encodeParam = parseEncodedData(data)
  112. const param = {
  113. usertoken: usertoken,
  114. jsonData: data
  115. }
  116. return request({
  117. 'url': '/services/LUTAIWebService.asmx/GenerateClothesEnchase',
  118. 'method': 'post',
  119. 'data': param
  120. })
  121. }