- {text}
+ title: '是否支付', dataIndex: 'isPayed', key: 'isPayed', width: 100, align: 'center',
+ render: (v) => (
+
+ {v ? '已支付' : '未支付'}
),
},
{
- title: '会员类型',
- dataIndex: 'memberTypeLabel',
- key: 'memberTypeLabel',
- width: 220,
+ title: '是否激活', dataIndex: 'isActived', key: 'isActived', width: 100, align: 'center',
+ render: (v) => (
+
+ {v ? '已激活' : '未激活'}
+
+ ),
},
+ { title: '注册时间', dataIndex: 'registerTime', key: 'registerTime', width: 180, render: formatDateTime },
+ { title: '过期时间', dataIndex: 'expireTime', key: 'expireTime', width: 220, render: renderExpireTime },
{
- title: '单位名称',
- dataIndex: 'unitName',
- key: 'unitName',
- ellipsis: true,
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- width: 120,
- align: 'center',
- },
- {
- title: '操作',
- key: 'action',
- width: 100,
- align: 'center',
- fixed: 'right',
+ title: '操作', key: 'action', width: 90, align: 'center', fixed: 'right',
render: (_, record) => (
- }
- onClick={() => handleViewDetail(record)}
- style={{ borderRadius: 6 }}
- >
+ }
+ onClick={() => handleViewDetail(record)} style={{ borderRadius: 6 }}>
详情
),
},
]
+ /** 个人会员列 —— 对齐协议 PersonalMemberVO */
+ const personalColumns = [
+ {
+ title: '序号', key: 'index', width: 60, align: 'center', fixed: 'left',
+ render: (_, __, index) => (pagination.current - 1) * pagination.pageSize + index + 1,
+ },
+ { title: 'ID', dataIndex: 'id', key: 'id', width: 80, fixed: 'left' },
+ { title: '姓名', dataIndex: 'name', key: 'name', width: 100, fixed: 'left' },
+ {
+ title: '性别', dataIndex: 'gender', key: 'gender', width: 70, align: 'center',
+ render: renderEnum(GENDER_MAP),
+ },
+ { title: '手机号', dataIndex: 'phone', key: 'phone', width: 130 },
+ { title: '邮箱', dataIndex: 'email', key: 'email', width: 200, ellipsis: true, render: dash },
+ { title: '身份证号', dataIndex: 'identityCard', key: 'identityCard', width: 190, ellipsis: true, render: dash },
+ {
+ title: '会员类型', dataIndex: 'memberType', key: 'memberType', width: 200,
+ render: (v) => (
+
+ {PERSONAL_MEMBER_TYPE_MAP[v] || v || '-'}
+
+ ),
+ },
+ {
+ title: '政治面貌', dataIndex: 'politicalStatus', key: 'politicalStatus', width: 130,
+ render: renderEnum(POLITICAL_STATUS_MAP),
+ },
+ {
+ title: '学历', dataIndex: 'educationLevel', key: 'educationLevel', width: 120,
+ render: renderEnum(EDUCATION_LEVEL_MAP),
+ },
+ { title: '职称', dataIndex: 'title', key: 'title', width: 120, render: dash },
+ { title: '职务', dataIndex: 'position', key: 'position', width: 120, render: dash },
+ {
+ title: '地区/单位', dataIndex: 'regionOrUnit', key: 'regionOrUnit', width: 160,
+ render: renderEnum(REGION_OR_UNIT_MAP),
+ },
+ {
+ title: '单位名称', dataIndex: 'unitName', key: 'unitName', width: 200, ellipsis: true,
+ render: (v) => (v ? {v} : '-'),
+ },
+ {
+ title: '单位地址', dataIndex: 'unitAddress', key: 'unitAddress', width: 220, ellipsis: true,
+ render: (v) => (v ? {v} : '-'),
+ },
+ { title: '邮编', dataIndex: 'zipCode', key: 'zipCode', width: 90, render: dash },
+ {
+ title: '发票抬头', dataIndex: 'invoiceTitle', key: 'invoiceTitle', width: 200, ellipsis: true,
+ render: (v) => (v ? {v} : '-'),
+ },
+ { title: '纳税人识别号', dataIndex: 'invoiceTaxNo', key: 'invoiceTaxNo', width: 200, ellipsis: true, render: dash },
+ {
+ title: '是否支付', dataIndex: 'isPayed', key: 'isPayed', width: 100, align: 'center',
+ render: (v) => (
+
+ {v ? '已支付' : '未支付'}
+
+ ),
+ },
+ {
+ title: '是否激活', dataIndex: 'isActived', key: 'isActived', width: 100, align: 'center',
+ render: (v) => (
+
+ {v ? '已激活' : '未激活'}
+
+ ),
+ },
+ { title: '注册时间', dataIndex: 'registerTime', key: 'registerTime', width: 180, render: formatDateTime },
+ { title: '过期时间', dataIndex: 'expireTime', key: 'expireTime', width: 220, render: renderExpireTime },
+ {
+ title: '操作', key: 'action', width: 90, align: 'center', fixed: 'right',
+ render: (_, record) => (
+ }
+ onClick={() => handleViewDetail(record)} style={{ borderRadius: 6 }}>
+ 详情
+
+ ),
+ },
+ ]
+
+ const isUnitTab = activeTab === MEMBER_CATEGORY.UNIT
+ const columns = isUnitTab ? unitColumns : personalColumns
+ const scrollX = isUnitTab ? 3000 : 3200
+
return (
@@ -154,54 +377,51 @@ function MemberList() {
筛选条件
+
handleFilterChange('name', e.target.value)}
+ onPressEnter={handleSearch}
allowClear
- style={{ width: 170, borderRadius: 6 }}
+ style={{ width: 220, borderRadius: 6 }}
/>
-
- handleFilterChange('phone', e.target.value)}
- allowClear
- style={{ width: 190, borderRadius: 6 }}
- />
-
-
-
-
+ {isUnitTab ? (
+
+
+
+ ) : (
+
+
+
+ )}
- }
- onClick={handleSearch}
- style={{ borderRadius: 6 }}
- >
+ } onClick={handleSearch} style={{ borderRadius: 6 }}>
查询
- }
- onClick={handleReset}
- style={{ borderRadius: 6 }}
- >
+ } onClick={handleReset} style={{ borderRadius: 6 }}>
重置
@@ -211,33 +431,58 @@ function MemberList() {
- 会员列表
-
- 共 {filteredData.length} 条数据
-
-
- }
+ styles={{ body: { paddingTop: 0 } }}
>
+
+ }
+ onClick={handleExport}
+ loading={exporting}
+ style={{
+ borderRadius: 6,
+ background: 'linear-gradient(135deg, #52c41a 0%, #73d13d 100%)',
+ borderColor: 'transparent',
+ color: '#fff',
+ }}
+ >
+ {isUnitTab ? '导出单位会员' : '导出个人会员'}
+
+ }
+ onClick={() => setFormModalVisible(true)} style={{ borderRadius: 6 }}>
+ 新增会员
+
+
+ 共 {total} 条数据
+
+