| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459 |
- import { getItemEnumName } from '@/services/bus/allEnum';
- /**
- * 获取证件类型枚举名称
- * @param enumdicid
- * @returns
- */
- export function getCardTypeEnumItemName(enumdicid: number): string {
- return getItemEnumName('certificatetype', enumdicid)
- }
- /**
- *获取仓登录状态枚举名称
- */
- export function getLoginStatusEnumItemName(enumdicid: number): string {
- return getItemEnumName('loginstatus', enumdicid)
- }
- /**
- *获取单位枚举名称
- */
- export function getGoodsUnitEnumItemName(enumdicid: number): string {
- return getItemEnumName('goodsunit', enumdicid)
- }
- /**
- *获取仓库类型枚举名称
- */
- export function getWarehouseTypeEnumItemName(enumdicid: number): string {
- return getItemEnumName('warehouseinfoType', enumdicid)
- }
- /**
- *获取币种类型枚举名称
- */
- export function getPayCurrencyTypeEnumItemName(enumdicid: number): string {
- return getItemEnumName('paycurrency', enumdicid)
- }
- /**
- *获取套保计划类型枚举名称
- */
- export function getSpotContractTypeEnumItemName(enumdicid: number): string {
- return getItemEnumName('spotContractType', enumdicid)
- }
- /**************** 页面枚举 *******************/
- /**
- * 获取客户资料状态
- * @param state
- */
- export function getStatusName(state: number): string {
- let result = "--";
- switch (state) {
- case 1:
- result = "待激活";
- break
- case 2:
- result = "待审核";
- break
- case 3:
- result = "待复审";
- break
- case 4:
- result = "正常";
- break
- case 5:
- result = "审核拒绝";
- break
- case 6:
- result = "停用(注销)";
- break
- case 7:
- result = "注销(删除)";
- break
- }
- return result
- }
- /**
- * 网上开户表里面的状态枚举
- * @param state
- */
- export function getWSKHStatusName(state: number): string {
- let result = "--";
- switch (state) {
- case 1:
- result = "未提交";
- break
- case 2:
- result = "待初审";
- break
- case 3:
- result = "初审拒绝";
- break
- case 4:
- result = "待复审";
- break
- case 5:
- result = "复审拒绝";
- break
- case 6:
- result = "测评不通过";
- break
- }
- return result
- }
- /**
- * 获取现货品种状态
- * @param type :未激活 1:正常
- */
- export function getValidName(type: number) {
- let result = "--";
- switch (type) {
- case 0:
- result = "未激活";
- break
- case 1:
- result = "正常";
- break
- }
- return result
- }
- /**
- * 定价类型 - 1:一口价 2:点价 3:暂定价
- * @param pricetype 定价类型
- */
- export function getPriceTypeName(pricetype: number): string {
- let result = "--";
- switch (pricetype) {
- case 1:
- result = "一口价";
- break
- case 2:
- result = "点价";
- break
- case 3:
- result = "暂定价";
- break
- }
- return result
- }
- /**
- * 现货合同状态返回
- * @param state
- * //合同状态 - number;
- //0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
- */
- export function getContractStatusName(state: number): string {
- let result = "--";
- switch (state) {
- case 0:
- result = "未提交";
- break;
- case 1:
- result = "待审核";
- break
- case 2:
- result = "执行中";
- break
- case 3:
- result = "正常完结";
- break
- case 4:
- result = "审核拒绝";
- break
- case 5:
- result = "异常完结";
- break
- case 6:
- result = "已撤回";
- break
- }
- return result
- }
- /**
- * 业务类型返回 业务类型 1-套保 2-套利
- * @param state
- */
- export function getBizTypeName(state: number): string {
- let result = "--";
- switch (state) {
- case 1:
- result = "套保";
- break
- case 2:
- result = "套利";
- break
- }
- return result
- }
- /**
- * 获取合同类型名称 现货合同类型 - 1:采购 -1:销售
- */
- export function getContractTypeName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "采购"
- break;
- case -1:
- result = "销售"
- break;
- }
- return result
- }
- /**
- * 业务审核-点价-状态
- * @param type 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
- */
- export function getApplyStatusName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "待审核";
- break
- case 2:
- result = "审核通过";
- break
- case 3:
- result = "审核拒绝";
- break
- case 4:
- result = "处理失败";
- break
- case 5:
- result = "已撤回";
- break
- }
- return result
- }
- /**
- * 千海金-提货申请-状态
- * @param type 1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄) 7:已拒绝 8:已撤销
- */
- export function getPickUpStateName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "备货中";
- break
- case 2:
- result = "待取货";
- break
- case 3:
- result = "已取货";
- break
- case 4:
- result = "待收货";
- break
- case 5:
- result = "已收货";
- break
- case 6:
- result = "自动收货";
- break
- case 7:
- result = "已拒绝";
- break
- case 8:
- result = "已撤销";
- break
- }
- return result
- }
- /**
- * 千海金-收货方式
- * @param type 2:自提 3:配送(邮寄)
- */
- export function getTakeStateName(type: number): string {
- let result = "--";
- switch (type) {
- case 2:
- result = "自提";
- break
- case 3:
- result = "配送(邮寄)";
- break
- }
- return result
- }
- /**
- * 千海金-策略状态
- * @param type 1:正常 2:暂停 3:终止
- */
- export function getRegularStateName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "正常";
- break
- case 2:
- result = "暂停";
- break
- case 3:
- result = "终止";
- break
- }
- return result
- }
- //1:待确认 2:已确认 3:确认拒绝 4:已支付保证金 5:已激活 6:已违约 7:到期结束 8:延期结束 9:违约结束 10:已注销 11:已关闭 99:未提交
- export function getContractName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "待确认";
- break
- case 2:
- result = "已确认";
- break
- case 3:
- result = "确认拒绝";
- break
- case 4:
- result = "已支付保证金";
- break
- case 5:
- result = "已激活";
- break
- case 6:
- result = "已违约";
- break
- case 7:
- result = "到期结束";
- break
- case 8:
- result = "延期结束";
- break
- case 9:
- result = "违约结束";
- break
- case 10:
- result = "已注销";
- break
- case 11:
- result = "已关闭";
- break
- case 99:
- result = "未提交";
- break
- }
- return result
- }
- //委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 10:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
- export function getOrderStatusName(type: number): string {
- let result = "--";
- switch (type) {
- case 1:
- result = "委托请求";
- break
- case 2:
- result = "待冻结";
- break
- case 3:
- result = "委托成功";
- break
- case 4:
- result = "委托失败";
- break
- case 5:
- result = "配对成功";
- break
- case 6:
- result = "已撤销";
- break
- case 7:
- result = "部分成交";
- break
- case 8:
- result = "已成交";
- break
- case 9:
- result = "部成部撤";
- break
- case 10:
- result = "成交失败";
- break
- case 11:
- result = "已拒绝";
- break
- case 12:
- result = "经过摘牌";
- break
- case 13:
- result = "冻结成功";
- break
- case 14:
- result = "通道已撤";
- break
- case 15:
- result = "通道部成部撤";
- break
- case 16:
- result = "成交失败违约";
- break
- case 17:
- result = "冻结PD成功";
- break
- case 18:
- result = "冻结PD失败";
- break
- case 19:
- result = "冻结能量成功";
- break
- case 20:
- result = "冻结能量失败";
- break
- case 21:
- result = "预约已报价";
- break
- case 22:
- result = "过期未付";
- break
- case 23:
- result = "优惠券处理中";
- break
- }
- return result
- }
- /**
- * 中文weekday
- * @param type
- */
- export function getWeekName(type: string): string {
- let result = "--";
- switch (type) {
- case "1":
- result = "周一";
- break
- case "2":
- result = "周二";
- break
- case "3":
- result = "周三";
- break
- case "4":
- result = "周四";
- break
- case "5":
- result = "周五";
- break
- }
- return result
- }
|