| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- 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
- }
- 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
- }
|