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>
56 lines
2.5 KiB
TypeScript
56 lines
2.5 KiB
TypeScript
import { Tag } from 'antd';
|
|
import { ProTable, type ProColumns } from '@ant-design/pro-components';
|
|
import PageContainer from '@/components/common/PageContainer';
|
|
import { ruleApi, ExceptionCodeResp } from '@/api/rule';
|
|
|
|
const DIRECTION_COLOR = { PLUS: 'success', MINUS: 'error' } as const;
|
|
|
|
export default function ExceptionCodeList() {
|
|
const columns: ProColumns<ExceptionCodeResp>[] = [
|
|
{ title: '예외코드', dataIndex: 'exceptionCode', width: 120, search: false,
|
|
render: (_, r) => <strong>{r.exceptionCode}</strong> },
|
|
{ title: '예외명', dataIndex: 'exceptionName', width: 160, search: false },
|
|
{ title: '카테고리', dataIndex: 'category', width: 110, search: false },
|
|
{
|
|
title: '방향', dataIndex: 'direction', width: 80, align: 'center', search: false,
|
|
render: (_, r) => <Tag color={DIRECTION_COLOR[r.direction as 'PLUS' | 'MINUS'] ?? 'default'}>
|
|
{r.direction === 'PLUS' ? '가산 (+)' : '차감 (-)'}</Tag>,
|
|
},
|
|
{
|
|
title: '자동계산', dataIndex: 'autoCalcYn', width: 90, align: 'center', search: false,
|
|
render: (_, r) => r.autoCalcYn === 'Y' ? <Tag color="processing">자동</Tag> : <Tag>수동</Tag>,
|
|
},
|
|
{
|
|
title: '승인 필요', dataIndex: 'approvalRequired', width: 90, align: 'center', search: false,
|
|
render: (_, r) => r.approvalRequired === 'Y' ? <Tag color="warning">필요</Tag> : <Tag>불요</Tag>,
|
|
},
|
|
{
|
|
title: '과세', dataIndex: 'taxIncluded', width: 80, align: 'center', search: false,
|
|
render: (_, r) => r.taxIncluded === 'Y' ? <Tag color="success">과세</Tag> : <Tag>비과세</Tag>,
|
|
},
|
|
{ title: '설명', dataIndex: 'description', ellipsis: true, search: false },
|
|
{
|
|
title: '활성', dataIndex: 'isActive', width: 70, align: 'center', search: false,
|
|
render: (_, r) => <Tag color={r.isActive === 'Y' ? 'success' : 'default'}>
|
|
{r.isActive === 'Y' ? 'Y' : 'N'}</Tag>,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<PageContainer title="예외 코드" description="가산/차감/승인/세금 정책 마스터 (예외금액 원장에서 사용)">
|
|
<ProTable<ExceptionCodeResp>
|
|
rowKey="exceptionCode"
|
|
columns={columns}
|
|
search={false}
|
|
request={async () => {
|
|
const list = await ruleApi.exceptionCodes();
|
|
return { data: list, total: list.length, success: true };
|
|
}}
|
|
pagination={{ pageSize: 50, showTotal: (t) => `총 ${t}건` }}
|
|
options={{ density: false, fullScreen: true, reload: true, setting: true }}
|
|
dateFormatter="string"
|
|
/>
|
|
</PageContainer>
|
|
);
|
|
}
|