f176b9702c
신규 페이지 (모두 ProTable / ProCard 패턴): - org/OrgTree: 조직 트리 + 선택 시 우측에 소속 설계사 ProTable - product/CompanyList: 보험사 목록 - product/ProductList: 상품 목록 (보험종 필터) - rule/CommissionRateList: 수수료율 (보험사 통보) - rule/PayoutRuleList: 지급율 (직급 × 보험종 × 회차) - rule/OverrideRuleList: 오버라이드 규정 (직급 페어) - rule/ChargebackRuleList: 환수 규정 (실효 월수 구간) - rule/ExceptionCodeList: 예외 코드 마스터 - ledger/MaintainLedger: 유지수수료 원장 - receive/ReceiveData: 보험사 raw 수신 데이터 - receive/ReceiveMapping: 보험사 프로파일 + 필드 매핑 규칙 - system/MenuManage: 메뉴 트리 표시 (Tree) - system/SystemConfig: 키-값 설정 (그룹별 필터) - system/SystemLog: 로그인/API/변경 이력 3 탭 신규 API 모듈: - api/org.ts (조직 트리) - api/company.ts, api/product.ts - api/rule.ts (5종 통합) - api/receive.ts (profile/field/raw/error) - api/config.ts, api/log.ts App.tsx: 14 라우트 추가 (org/tree, companies, products, rules/*, receive/*, ledger/maintain, system/menus, system/config, system/logs) 검증: - tsc -b 통과 - 12개 백엔드 엔드포인트 200 OK 확인 - dev 서버 HMR 자동 반영 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
2.1 KiB
TypeScript
43 lines
2.1 KiB
TypeScript
import { ProTable, type ProColumns } from '@ant-design/pro-components';
|
|
import { Tag } from 'antd';
|
|
import PageContainer from '@/components/common/PageContainer';
|
|
import { companyApi, CompanyResp, CompanySearchParam } from '@/api/company';
|
|
|
|
export default function CompanyList() {
|
|
const columns: ProColumns<CompanyResp>[] = [
|
|
{ title: '검색어', dataIndex: 'searchKeyword', hideInTable: true,
|
|
fieldProps: { placeholder: '회사명 / 사업자번호' } },
|
|
{ title: '회사코드', dataIndex: 'companyCode', width: 100, search: false },
|
|
{ title: '회사명', dataIndex: 'companyName', width: 180,
|
|
render: (_, r) => <strong>{r.companyName}</strong> },
|
|
{ title: '구분', dataIndex: 'companyType', width: 100, search: false },
|
|
{ title: '사업자번호', dataIndex: 'bizNo', width: 130, search: false },
|
|
{ title: '담당자', dataIndex: 'contactName', width: 100, search: false },
|
|
{ title: '연락처', dataIndex: 'contactPhone', width: 130, search: false },
|
|
{ title: '이메일', dataIndex: 'contactEmail', width: 200, search: false },
|
|
{
|
|
title: '활성', dataIndex: 'isActive', width: 80,
|
|
render: (_, r) => <Tag color={r.isActive === 'Y' ? 'success' : 'default'}>
|
|
{r.isActive === 'Y' ? '활성' : '비활성'}</Tag>,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<PageContainer title="보험사 관리" description="제휴 보험사 정보 / 데이터 수신 프로파일">
|
|
<ProTable<CompanyResp, CompanySearchParam>
|
|
rowKey="companyId"
|
|
columns={columns}
|
|
request={async (params) => {
|
|
const { current, pageSize, ...rest } = params as any;
|
|
const res = await companyApi.list({ ...rest, pageNum: current, pageSize });
|
|
return { data: res.list, total: res.total, success: true };
|
|
}}
|
|
pagination={{ pageSize: 20, showTotal: (t) => `총 ${t.toLocaleString()}건` }}
|
|
search={{ labelWidth: 'auto', searchText: '검색', resetText: '초기화', collapsed: false, collapseRender: false }}
|
|
options={{ density: false, fullScreen: true, reload: true, setting: true }}
|
|
dateFormatter="string"
|
|
/>
|
|
</PageContainer>
|
|
);
|
|
}
|