presale.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 getYSProductionModeList() {
  22. return getEnumTypeList('YSProductionMode')
  23. }
  24. /**
  25. * 获取预售生产方式名称
  26. * @returns
  27. */
  28. export function getYSProductionModeName(value?: number) {
  29. const enums = getYSProductionModeList()
  30. return getEnumTypeName(enums, value)
  31. }
  32. /**
  33. * 获取预售状态列表
  34. * @returns
  35. */
  36. export function getWRPresaleStatusList() {
  37. return getEnumTypeList('WRPresaleStatus')
  38. }
  39. /**
  40. * 获取预售状态名称
  41. * @returns
  42. */
  43. export function getWRPresaleStatusName(value?: number) {
  44. const enums = getWRPresaleStatusList()
  45. return getEnumTypeName(enums, value)
  46. }
  47. /**
  48. * 获取预售申请状态列表
  49. * @returns
  50. */
  51. export function getInOutApplyStatusList() {
  52. return getEnumTypeList('inoutapplystatus')
  53. }
  54. /**
  55. * 获取预售申请状态名称
  56. * @returns
  57. */
  58. export function getInOutApplyStatusName(value?: number) {
  59. const enums = getInOutApplyStatusList()
  60. return getEnumTypeName(enums, value)
  61. }