presale.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import { enumStore } from '@/stores'
  2. const { getEnumTypeList, getEnumTypeName } = enumStore.actions
  3. /**
  4. * 预售钻石类型
  5. */
  6. export enum YSZSCategory {
  7. Diamonds = 1, // 成品裸钻
  8. Rough = 2, // 毛坯钻石
  9. }
  10. /**
  11. * 获取预售钻石类型列表
  12. * @returns
  13. */
  14. export function getYSZSCategoryList() {
  15. return getEnumTypeList('YSZSCategory')
  16. }
  17. /**
  18. * 获取预售钻石类型名称
  19. * @returns
  20. */
  21. export function getYSZSCategoryName(value?: number) {
  22. const enums = getYSZSCategoryList()
  23. return getEnumTypeName(enums, value)
  24. }
  25. /**
  26. * 获取预售生产方式列表
  27. * @returns
  28. */
  29. export function getYSProductionModeList() {
  30. return getEnumTypeList('YSProductionMode')
  31. }
  32. /**
  33. * 获取预售生产方式名称
  34. * @returns
  35. */
  36. export function getYSProductionModeName(value?: number) {
  37. const enums = getYSProductionModeList()
  38. return getEnumTypeName(enums, value)
  39. }
  40. /**
  41. * 获取预售状态列表
  42. * @returns
  43. */
  44. export function getWRPresaleStatusList() {
  45. return getEnumTypeList('WRPresaleStatus')
  46. }
  47. /**
  48. * 获取预售状态名称
  49. * @returns
  50. */
  51. export function getWRPresaleStatusName(value?: number) {
  52. const enums = getWRPresaleStatusList()
  53. return getEnumTypeName(enums, value)
  54. }
  55. /**
  56. * 获取预售申请状态列表
  57. * @returns
  58. */
  59. export function getInOutApplyStatusList() {
  60. return getEnumTypeList('inoutapplystatus')
  61. }
  62. /**
  63. * 获取预售申请状态名称
  64. * @returns
  65. */
  66. export function getInOutApplyStatusName(value?: number) {
  67. const enums = getInOutApplyStatusList()
  68. return getEnumTypeName(enums, value)
  69. }