지도점검 테이블 재수정
This commit is contained in:
@@ -195,7 +195,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [
|
||||
title: "부과금액(천원)",
|
||||
upName: "feeHist",
|
||||
upSequnce: 3,
|
||||
type: "number",
|
||||
type: "text",
|
||||
edit: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
|
||||
import { Checkbox, Input, TableCell, TableRow } from "@common/components/ui";
|
||||
import { formatCommaNumber } from "./commom";
|
||||
import { formatCommaNumber, handleCommaNumberChange } from "./commom";
|
||||
|
||||
export const rainChkTableData = (chkData: rainChkZodType[]) => {
|
||||
// 1. chkgdnSn + utztnUsgCd 기준 누계 정보 만들기
|
||||
@@ -161,22 +161,40 @@ export const chRowspanTable = (
|
||||
onClick={() => handleCellClick(rowIndex, head.id)}
|
||||
>
|
||||
{head.edit === true ? (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
type={head.type}
|
||||
onChange={(e) => {
|
||||
handleChange(rowIndex, head.id, e.target.value);
|
||||
}}
|
||||
value={value || ""}
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
maxLength={numSize}
|
||||
//input type number일때 slice 처리
|
||||
onInput={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (head.type === 'number' && e.target.value.length > numSize) {
|
||||
e.target.value = e.target.value.slice(0, numSize);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
(["levyAmt", "anlOperCst", "dtfcltCpct", "prcsCpct"].includes(head.id)) ? (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
type={head.type}
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, val =>
|
||||
handleChange(rowIndex, head.id, val))
|
||||
}}
|
||||
value={formatCommaNumber(value) || ""}
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
maxLength={numSize}
|
||||
onInput={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (head.type === 'number' && e.target.value.length > numSize) {
|
||||
e.target.value = e.target.value.slice(0, numSize);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
type={head.type}
|
||||
onChange={(e) => {
|
||||
handleChange(rowIndex, head.id, e.target.value);
|
||||
}}
|
||||
value={value || ""}
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
maxLength={numSize}
|
||||
onInput={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (head.type === 'number' && e.target.value.length > numSize) {
|
||||
e.target.value = e.target.value.slice(0, numSize);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
(["totalSplyUswtrUtztnQnt", "totalRuseFcltUtztnQnt", "splyUswtrUtztnQnt", "ruseFcltUtztnQnt", "levyAmt"].includes(head.id)) ? (
|
||||
<span className={["totalSplyUswtrUtztnQnt", "totalRuseFcltUtztnQnt", "splyUswtrUtztnQnt", "ruseFcltUtztnQnt"].includes(head.id) ? "underline text-blue-600 cursor-pointer" : ""}>
|
||||
@@ -188,7 +206,6 @@ export const chRowspanTable = (
|
||||
)}
|
||||
</TableCell>
|
||||
);
|
||||
|
||||
})}
|
||||
</TableRow>
|
||||
))) : (
|
||||
|
||||
Reference in New Issue
Block a user