customs.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. import { enumStore } from '@/stores'
  2. const { getEnumTypeList, getEnumTypeName } = enumStore.actions
  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 getGZBSDeliveryTypeList() {
  53. return getEnumTypeList('GZBSDeliveryType')
  54. }
  55. /**
  56. * 获取保税服务提货方式名称
  57. * @returns
  58. */
  59. export function getGZBSDeliveryTypeName(value?: number) {
  60. const enums = getGZBSDeliveryTypeList()
  61. return getEnumTypeName(enums, value)
  62. }
  63. /**
  64. * 获取形状列表
  65. * @returns
  66. */
  67. export function getGZCJShapeTypeList() {
  68. return getEnumTypeList('GZCJShapeType', ['enumdicname', 'param1', 'param2'])
  69. }
  70. /**
  71. * 获取形状名称
  72. * @returns
  73. */
  74. export function getGZCJShapeTypeName(value?: number) {
  75. const enums = getGZCJShapeTypeList()
  76. return getEnumTypeName(enums, value)
  77. }
  78. /**
  79. * 获取刻印服务列表
  80. * @returns
  81. */
  82. export function getGZCJMarkTypeList() {
  83. return getEnumTypeList('GZCJMarkType', ['enumdicname', 'param1'])
  84. }
  85. /**
  86. * 获取刻印服务名称
  87. * @returns
  88. */
  89. export function getGZCJMarkTypeName(value?: number) {
  90. const enums = getGZCJMarkTypeList()
  91. return getEnumTypeName(enums, value)
  92. }
  93. /**
  94. * 获取披露处理列表
  95. * @returns
  96. */
  97. export function getGZCJPublishTypeList() {
  98. return getEnumTypeList('GZCJPublishType')
  99. }
  100. /**
  101. * 获取披露处理名称
  102. * @returns
  103. */
  104. export function getGZCJPublishTypeName(value?: number) {
  105. const enums = getGZCJPublishTypeList()
  106. return getEnumTypeName(enums, value)
  107. }
  108. /**
  109. * 获取服务类别列表
  110. * @returns
  111. */
  112. export function getGZCJServiceTypeList() {
  113. return getEnumTypeList('GZCJServiceType')
  114. }
  115. /**
  116. * 获取服务类别名称
  117. * @returns
  118. */
  119. export function getGZCJServiceTypeName(value?: number) {
  120. const enums = getGZCJServiceTypeList()
  121. return getEnumTypeName(enums, value)
  122. }
  123. /**
  124. * 出境检测状态
  125. */
  126. export enum GZCJStatus {
  127. Audit = 1, // 待审核
  128. Shipping = 2, // 发货中
  129. CheckConfirm = 8, // 检测结果确认中
  130. AdvancePaymentConfirm = 10, // 预付款确认中
  131. PaymentConfirm = 13, // 付款确认中
  132. Uncommitted = 22, // 未提交
  133. }
  134. /**
  135. * 获取出境检测状态列表
  136. * @returns
  137. */
  138. export function getGZCJStatusList() {
  139. return getEnumTypeList('GZCJStatus')
  140. }
  141. /**
  142. * 获取出境检测状态名称
  143. * @returns
  144. */
  145. export function getGZCJStatusName(value?: number) {
  146. const enums = getGZCJStatusList()
  147. return getEnumTypeName(enums, value)
  148. }
  149. /**
  150. * 保税服务状态
  151. */
  152. export enum GZBSStatus {
  153. UploadBill = 1, // 发货单上传中
  154. UploadSeal = 3, // 单据盖章中
  155. AdvancePaymentConfirm = 5, // 预付款确认中
  156. PaymentConfirm = 11, // 付款确认中
  157. }
  158. /**
  159. * 获取保税服务状态列表
  160. * @returns
  161. */
  162. export function getGZBSStatusList() {
  163. return getEnumTypeList('GZBSStatus')
  164. }
  165. /**
  166. * 获取保税服务状态名称
  167. * @returns
  168. */
  169. export function getGZBSStatusName(value?: number) {
  170. const enums = getGZBSStatusList()
  171. return getEnumTypeName(enums, value)
  172. }