@@ -60,26 +60,33 @@ export const getBoolDictOptions = (dictType: string) => {
6060 return dictOption
6161}
6262
63- export const getDictObj = ( dictType : string , value : any ) => {
63+ /**
64+ * 获取指定字典类型的指定值对应的字典对象
65+ * @param dictType 字典类型
66+ * @param value 字典值
67+ * @return DictDataType 字典对象
68+ */
69+ export const getDictObj = ( dictType : string , value : any ) : DictDataType | undefined => {
6470 const dictOptions : DictDataType [ ] = getDictOptions ( dictType )
65- dictOptions . forEach ( ( dict : DictDataType ) => {
66- if ( dict . value === value . toString ( ) ) {
71+ for ( const dict of dictOptions ) {
72+ if ( dict . value === value + '' ) {
6773 return dict
6874 }
69- } )
75+ }
7076}
7177
7278/**
7379 * 获得字典数据的文本展示
7480 *
7581 * @param dictType 字典类型
7682 * @param value 字典数据的值
83+ * @return 字典名称
7784 */
78- export const getDictLabel = ( dictType : string , value : any ) => {
85+ export const getDictLabel = ( dictType : string , value : any ) : string => {
7986 const dictOptions : DictDataType [ ] = getDictOptions ( dictType )
8087 const dictLabel = ref ( '' )
8188 dictOptions . forEach ( ( dict : DictDataType ) => {
82- if ( dict . value === value ) {
89+ if ( dict . value === value + '' ) {
8390 dictLabel . value = dict . label
8491 }
8592 } )
@@ -131,7 +138,7 @@ export enum DICT_TYPE {
131138 BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type' ,
132139
133140 // ========== PAY 模块 ==========
134- PAY_CHANNEL_CODE = 'pay_channel_code_type ' , // 支付渠道编码类型
141+ PAY_CHANNEL_CODE = 'pay_channel_code ' , // 支付渠道编码类型
135142 PAY_ORDER_STATUS = 'pay_order_status' , // 商户支付订单状态
136143 PAY_REFUND_STATUS = 'pay_refund_status' , // 退款订单状态
137144 PAY_NOTIFY_STATUS = 'pay_notify_status' , // 商户支付回调状态
@@ -143,6 +150,7 @@ export enum DICT_TYPE {
143150
144151 // ========== MALL - 会员模块 ==========
145152 MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type' , // 积分的业务类型
153+ MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type' , // 会员经验业务类型
146154
147155 // ========== MALL - 商品模块 ==========
148156 PRODUCT_UNIT = 'product_unit' , // 商品单位
@@ -157,6 +165,13 @@ export enum DICT_TYPE {
157165 TRADE_ORDER_STATUS = 'trade_order_status' , // 订单 - 状态
158166 TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status' , // 订单项 - 售后状态
159167 TRADE_DELIVERY_TYPE = 'trade_delivery_type' , // 配送方式
168+ BROKERAGE_ENABLED_CONDITION = 'brokerage_enabled_condition' , // 分佣模式
169+ BROKERAGE_BIND_MODE = 'brokerage_bind_mode' , // 分销关系绑定模式
170+ BROKERAGE_BANK_NAME = 'brokerage_bank_name' , // 佣金提现银行
171+ BROKERAGE_WITHDRAW_TYPE = 'brokerage_withdraw_type' , // 佣金提现类型
172+ BROKERAGE_RECORD_BIZ_TYPE = 'brokerage_record_biz_type' , // 佣金业务类型
173+ BROKERAGE_RECORD_STATUS = 'brokerage_record_status' , // 佣金状态
174+ BROKERAGE_WITHDRAW_STATUS = 'brokerage_withdraw_status' , // 佣金提现状态
160175
161176 // ========== MALL - 营销模块 ==========
162177 PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type' , // 优惠类型
0 commit comments