云
2026-11-03 115bc268902a9899d7d159133c2ba693eddfe00d
src/views/ums/application/data.ts
@@ -26,12 +26,16 @@
/** 根据会员类型获取等级字典选项 */
export function getGradeDictOptions(memberType?: number) {
  return getDictOptions(
    memberType === MemberType.UNIT
      ? DICT_TYPE.UMS_UNIT_GRADE
      : DICT_TYPE.UMS_PERSONAL_GRADE,
    'string',
  );
  return memberType === MemberType.UNIT
    ? [{ label: '会长单位', value: '4' }, { label: '副会长单位', value: '3' }, { label: '理事单位', value: '2' }, { label: '会员单位', value: '1' }]
    : [{ label: '个人会员', value: '1' }];
}
export function getApplicationGradeLabel(memberType?: number, grade?: string) {
  if (!grade) return '-';
  return getGradeDictOptions(memberType).find((option) => option.value === grade)?.label
    || getDictOptions(memberType === MemberType.UNIT ? DICT_TYPE.UMS_UNIT_GRADE : DICT_TYPE.UMS_PERSONAL_GRADE, 'string').find((option) => option.value === grade)?.label
    || grade;
}
/** 表单配置 */
@@ -103,6 +107,12 @@
        disabled: formType === 'detail',
      },
      help: '审批通过后将自动创建系统登录账号:用户名与初始密码均为联系电话,请务必填写准确',
    },
    {
      fieldName: 'feePaid',
      label: '是否缴费',
      component: 'Select',
      componentProps: { placeholder: '请核实缴费状态', options: [{ label: '已缴费', value: true }, { label: '未缴费', value: false }], disabled: formType === 'detail' },
    },
    {
      fieldName: 'contactEmail',
@@ -313,6 +323,12 @@
      slots: { default: 'memberGrade' },
    },
    {
      field: 'feePaid',
      title: '是否缴费',
      minWidth: 90,
      formatter: ({ cellValue }) => cellValue == null ? '未记录' : cellValue ? '已缴' : '未缴',
    },
    {
      field: 'status',
      title: '状态',
      minWidth: 95,
@@ -345,4 +361,4 @@
      slots: { default: 'actions' },
    },
  ];
}
}