customs.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. import { useEnumStore } from '@/stores'
  2. const { getEnumTypeList, getEnumTypeName } = useEnumStore()
  3. /**
  4. * 获取检测账户类型列表
  5. * @returns
  6. */
  7. export function getGZCJAccountTypeList() {
  8. return getEnumTypeList('GZCJAccountType')
  9. }
  10. /**
  11. * 获取检测账户类型名称
  12. * @returns
  13. */
  14. export function getGZCJAccountTypeName(value?: number) {
  15. const enums = getGZCJAccountTypeList()
  16. return getEnumTypeName(enums, value)
  17. }
  18. /**
  19. * 获取货物品类列表
  20. * @returns
  21. */
  22. export function getGZCJCategoryTypeList() {
  23. return getEnumTypeList('GZCJCategoryType')
  24. }
  25. /**
  26. * 获取货物品类名称
  27. * @returns
  28. */
  29. export function getGZCJCategoryTypeName(value?: number) {
  30. const enums = getGZCJCategoryTypeList()
  31. return getEnumTypeName(enums, value)
  32. }
  33. /**
  34. * 获取收货方式列表
  35. * @returns
  36. */
  37. export function getGZCJDeliveryTypeList() {
  38. return getEnumTypeList('GZCJDeliveryType')
  39. }
  40. /**
  41. * 获取收货方式名称
  42. * @returns
  43. */
  44. export function getGZCJDeliveryTypeName(value?: number) {
  45. const enums = getGZCJDeliveryTypeList()
  46. return getEnumTypeName(enums, value)
  47. }
  48. /**
  49. * 获取形状列表
  50. * @returns
  51. */
  52. export function getGZCJShapeTypeList() {
  53. return getEnumTypeList('GZCJShapeType', ['enumdicname', 'param1', 'param2'])
  54. }
  55. /**
  56. * 获取形状名称
  57. * @returns
  58. */
  59. export function getGZCJShapeTypeName(value?: number) {
  60. const enums = getGZCJShapeTypeList()
  61. return getEnumTypeName(enums, value)
  62. }
  63. /**
  64. * 获取刻印服务列表
  65. * @returns
  66. */
  67. export function getGZCJMarkTypeList() {
  68. return getEnumTypeList('GZCJMarkType', ['enumdicname', 'param1'])
  69. }
  70. /**
  71. * 获取刻印服务名称
  72. * @returns
  73. */
  74. export function getGZCJMarkTypeName(value?: number) {
  75. const enums = getGZCJMarkTypeList()
  76. return getEnumTypeName(enums, value)
  77. }
  78. /**
  79. * 获取披露处理列表
  80. * @returns
  81. */
  82. export function getGZCJPublishTypeList() {
  83. return getEnumTypeList('GZCJPublishType')
  84. }
  85. /**
  86. * 获取披露处理名称
  87. * @returns
  88. */
  89. export function getGZCJPublishTypeName(value?: number) {
  90. const enums = getGZCJPublishTypeList()
  91. return getEnumTypeName(enums, value)
  92. }
  93. /**
  94. * 获取服务类别列表
  95. * @returns
  96. */
  97. export function getGZCJServiceTypeList() {
  98. return getEnumTypeList('GZCJServiceType')
  99. }
  100. /**
  101. * 获取服务类别名称
  102. * @returns
  103. */
  104. export function getGZCJServiceTypeName(value?: number) {
  105. const enums = getGZCJServiceTypeList()
  106. return getEnumTypeName(enums, value)
  107. }
  108. /**
  109. * 出境检测状态
  110. */
  111. export enum GZCJStatus {
  112. Audit = 1, // 待审核
  113. Shipping = 2, // 发货中
  114. CheckConfirm = 8, // 检测结果确认中
  115. AdvancePaymentConfirm = 10, // 预付款确认中
  116. PaymentConfirm = 13, // 付款确认中
  117. Uncommitted = 22, // 未提交
  118. }
  119. /**
  120. * 获取出境检测状态列表
  121. * @returns
  122. */
  123. export function getGZCJStatusList() {
  124. return getEnumTypeList('GZCJStatus')
  125. }
  126. /**
  127. * 获取出境检测状态名称
  128. * @returns
  129. */
  130. export function getGZCJStatusName(value?: number) {
  131. const enums = getGZCJStatusList()
  132. return getEnumTypeName(enums, value)
  133. }
  134. /**
  135. * 保税服务状态
  136. */
  137. export enum GZBSStatus {
  138. UploadBill = 1, // 发货单上传中
  139. UploadSeal = 3, // 单据盖章中
  140. AdvancePaymentConfirm = 5, // 预付款确认中
  141. PaymentConfirm = 11, // 付款确认中
  142. }
  143. /**
  144. * 获取保税服务状态列表
  145. * @returns
  146. */
  147. export function getGZBSStatusList() {
  148. return getEnumTypeList('GZBSStatus')
  149. }
  150. /**
  151. * 获取保税服务状态名称
  152. * @returns
  153. */
  154. export function getGZBSStatusName(value?: number) {
  155. const enums = getGZBSStatusList()
  156. return getEnumTypeName(enums, value)
  157. }