enumsName.ts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. import { getItemEnumName } from '@/services/bus/allEnum';
  2. /**
  3. * 获取证件类型枚举名称
  4. * @param enumdicid
  5. * @returns
  6. */
  7. export function getCardTypeEnumItemName(enumdicid: number): string {
  8. return getItemEnumName('certificatetype', enumdicid)
  9. }
  10. /**
  11. *获取仓登录状态枚举名称
  12. */
  13. export function getLoginStatusEnumItemName(enumdicid: number): string {
  14. return getItemEnumName('loginstatus', enumdicid)
  15. }
  16. /**
  17. *获取单位枚举名称
  18. */
  19. export function getGoodsUnitEnumItemName(enumdicid: number): string {
  20. return getItemEnumName('goodsunit', enumdicid)
  21. }
  22. /**
  23. *获取仓库类型枚举名称
  24. */
  25. export function getWarehouseTypeEnumItemName(enumdicid: number): string {
  26. return getItemEnumName('warehouseinfoType', enumdicid)
  27. }
  28. /**
  29. *获取币种类型枚举名称
  30. */
  31. export function getPayCurrencyTypeEnumItemName(enumdicid: number): string {
  32. return getItemEnumName('paycurrency', enumdicid)
  33. }
  34. /**
  35. *获取套保计划类型枚举名称
  36. */
  37. export function getSpotContractTypeEnumItemName(enumdicid: number): string {
  38. return getItemEnumName('spotContractType', enumdicid)
  39. }
  40. /**************** 页面枚举 *******************/
  41. /**
  42. * 获取客户资料状态
  43. * @param state
  44. */
  45. export function getStatusName(state: number): string {
  46. let result = "--";
  47. switch (state) {
  48. case 1:
  49. result = "待激活";
  50. break
  51. case 2:
  52. result = "待审核";
  53. break
  54. case 3:
  55. result = "待复审";
  56. break
  57. case 4:
  58. result = "正常";
  59. break
  60. case 5:
  61. result = "审核拒绝";
  62. break
  63. case 6:
  64. result = "注销";
  65. break
  66. }
  67. return result
  68. }
  69. /**
  70. * 获取现货品种状态
  71. * @param type :未激活 1:正常
  72. */
  73. export function getValidName(type: number) {
  74. let result = "--";
  75. switch (type) {
  76. case 0:
  77. result = "未激活";
  78. break
  79. case 1:
  80. result = "正常";
  81. break
  82. }
  83. return result
  84. }
  85. /**
  86. * 定价类型 - 1:一口价 2:点价 3:暂定价
  87. * @param pricetype 定价类型
  88. */
  89. export function getPriceTypeName(pricetype: number): string {
  90. let result = "--";
  91. switch (pricetype) {
  92. case 1:
  93. result = "一口价";
  94. break
  95. case 2:
  96. result = "点价";
  97. break
  98. case 3:
  99. result = "暂定价";
  100. break
  101. }
  102. return result
  103. }
  104. /**
  105. * 现货合同状态返回
  106. * @param state
  107. * //合同状态 - number;
  108. //0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
  109. */
  110. export function getContractStatusName(state: number): string {
  111. let result = "--";
  112. switch (state) {
  113. case 0:
  114. result = "未提交";
  115. break;
  116. case 1:
  117. result = "待审核";
  118. break
  119. case 2:
  120. result = "执行中";
  121. break
  122. case 3:
  123. result = "正常完结";
  124. break
  125. case 4:
  126. result = "审核拒绝";
  127. break
  128. case 5:
  129. result = "异常完结";
  130. break
  131. case 6:
  132. result = "已撤回";
  133. break
  134. }
  135. return result
  136. }
  137. /**
  138. * 业务类型返回 业务类型 1-套保 2-套利
  139. * @param state
  140. */
  141. export function getBizTypeName(state: number): string {
  142. let result = "--";
  143. switch (state) {
  144. case 1:
  145. result = "套保";
  146. break
  147. case 2:
  148. result = "套利";
  149. break
  150. }
  151. return result
  152. }
  153. /**
  154. * 获取合同类型名称 现货合同类型 - 1:采购 -1:销售
  155. */
  156. export function getContractTypeName(type: number): string {
  157. let result = "--";
  158. switch (type) {
  159. case 1:
  160. result = "采购"
  161. break;
  162. case -1:
  163. result = "销售"
  164. break;
  165. }
  166. return result
  167. }
  168. /**
  169. * 业务审核-点价-状态
  170. * @param type 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
  171. */
  172. export function getApplyStatusName(type: number): string {
  173. let result = "--";
  174. switch (type) {
  175. case 1:
  176. result = "待审核";
  177. break
  178. case 2:
  179. result = "审核通过";
  180. break
  181. case 3:
  182. result = "审核拒绝";
  183. break
  184. case 4:
  185. result = "处理失败";
  186. break
  187. case 5:
  188. result = "已撤回";
  189. break
  190. }
  191. return result
  192. }
  193. /**
  194. * 千海金-提货申请-状态
  195. * @param type 1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄) 7:已拒绝 8:已撤销
  196. */
  197. export function getPickUpStateName(type: number): string {
  198. let result = "--";
  199. switch (type) {
  200. case 1:
  201. result = "备货中";
  202. break
  203. case 2:
  204. result = "待取货";
  205. break
  206. case 3:
  207. result = "已取货";
  208. break
  209. case 4:
  210. result = "待收货";
  211. break
  212. case 5:
  213. result = "已收货";
  214. break
  215. case 6:
  216. result = "自动收货";
  217. break
  218. case 7:
  219. result = "已拒绝";
  220. break
  221. case 8:
  222. result = "已撤销";
  223. break
  224. }
  225. return result
  226. }
  227. /**
  228. * 千海金-收货方式
  229. * @param type 2:自提 3:配送(邮寄)
  230. */
  231. export function getTakeStateName(type: number): string {
  232. let result = "--";
  233. switch (type) {
  234. case 2:
  235. result = "自提";
  236. break
  237. case 3:
  238. result = "配送(邮寄)";
  239. break
  240. }
  241. return result
  242. }
  243. /**
  244. * 千海金-策略状态
  245. * @param type 1:正常 2:暂停 3:终止
  246. */
  247. export function getRegularStateName(type: number): string {
  248. let result = "--";
  249. switch (type) {
  250. case 1:
  251. result = "正常";
  252. break
  253. case 2:
  254. result = "暂停";
  255. break
  256. case 3:
  257. result = "终止";
  258. break
  259. }
  260. return result
  261. }
  262. //1:待确认 2:已确认 3:确认拒绝 4:已支付保证金 5:已激活 6:已违约 7:到期结束 8:延期结束 9:违约结束 10:已注销 11:已关闭 99:未提交
  263. export function getContractName(type: number): string {
  264. let result = "--";
  265. switch (type) {
  266. case 1:
  267. result = "待确认";
  268. break
  269. case 2:
  270. result = "已确认";
  271. break
  272. case 3:
  273. result = "确认拒绝";
  274. break
  275. case 4:
  276. result = "已支付保证金";
  277. break
  278. case 5:
  279. result = "已激活";
  280. break
  281. case 6:
  282. result = "已违约";
  283. break
  284. case 7:
  285. result = "到期结束";
  286. break
  287. case 8:
  288. result = "延期结束";
  289. break
  290. case 9:
  291. result = "违约结束";
  292. break
  293. case 10:
  294. result = "已注销";
  295. break
  296. case 11:
  297. result = "已关闭";
  298. break
  299. case 99:
  300. result = "未提交";
  301. break
  302. }
  303. return result
  304. }
  305. //委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 10:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
  306. export function getOrderStatusName(type: number): string {
  307. let result = "--";
  308. switch (type) {
  309. case 1:
  310. result = "委托请求";
  311. break
  312. case 2:
  313. result = "待冻结";
  314. break
  315. case 3:
  316. result = "委托成功";
  317. break
  318. case 4:
  319. result = "委托失败";
  320. break
  321. case 5:
  322. result = "配对成功";
  323. break
  324. case 6:
  325. result = "已撤销";
  326. break
  327. case 7:
  328. result = "部分成交";
  329. break
  330. case 8:
  331. result = "已成交";
  332. break
  333. case 9:
  334. result = "部成部撤";
  335. break
  336. case 10:
  337. result = "成交失败";
  338. break
  339. case 11:
  340. result = "已拒绝";
  341. break
  342. case 12:
  343. result = "经过摘牌";
  344. break
  345. case 13:
  346. result = "冻结成功";
  347. break
  348. case 14:
  349. result = "通道已撤";
  350. break
  351. case 15:
  352. result = "通道部成部撤";
  353. break
  354. case 16:
  355. result = "成交失败违约";
  356. break
  357. }
  358. return result
  359. }