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