수요정보 등록 후보지조회 제외 완료

This commit is contained in:
jsyang
2026-03-31 16:12:25 +09:00
parent 5372ef9d9c
commit 90eb5f3b04
2 changed files with 78 additions and 4 deletions
@@ -66,7 +66,7 @@ export default function DemandRegisterPage() {
// 유사사례
const similarCaseList = useDmStore((state) => state.Sdm.similarCaseList);
const getSimilarCaseList = useDmStore((state) => state.getSimilarCaseList);
const [farmText, setFarmText] = useState("이하");
const insertSdmInfoData = useDmStore(
(state) => state.insertSdmInfoData
@@ -267,6 +267,81 @@ export default function DemandRegisterPage() {
setOpenSimilar(true);
};
const initQualityForm = () => {
setColiform("");
setNoDetect(false);
setTn("");
setResidualCl("");
setTp("");
setTurbidity("");
setPh({ min: "", max: "" });
setBod("");
setChloride("");
setOdor("불쾌하지 않을 것");
setEc("");
setColor("");
setRemark("");
setFarmText("이하");
}
const fncSetOptionValue = (e: React.ChangeEvent<HTMLSelectElement>) => {
const value = e.target.value;
initQualityForm();
switch (value) {
// 청소화장실용도
case '01':
setTp('0.2');
setTurbidity('2');
setPh({min:'5.8', max:'8.5'});
setBod('5');
setColor('20');
break;
// 세척살수용도
case '02':
setTp('0.2');
setTurbidity('2');
setPh({min:'5.8', max:'8.5'});
setBod('5');
break;
// 조경용도
case '03':
setTp('0.2');
setTurbidity('2');
setPh({min:'5.8', max:'8.5'});
setBod('5');
setChloride('250');
break;
// 지하수
case '05':
break;
// 농업용도
case '06' :
setTurbidity('5');
setPh({min:'5.8', max:'8.5'});
setBod('8');
setEc('2000');
setFarmText("이하 (** 간접:2000,직접:700 )");
break;
// 하천 등 유지보수
case '07' :
setColiform('1000');
setTn('10');
setTp('0.5');
setPh({min:'5.8', max:'8.5'});
setBod('5');
break;
// 공업
case '08':
setPh({min:'5.8', max:'8.5'});
break;
default:
console.log('잘못된 선택입니다.');
}
setUsePurpose(value);
}
return (
<>
@@ -302,7 +377,7 @@ export default function DemandRegisterPage() {
<FormRow label="사용용도" required>
<select
value={usePurpose}
onChange={(e) => setUsePurpose(e.target.value)}
onChange={(e) => fncSetOptionValue(e)}
className="h-11 w-full max-w-[200px] rounded-md border border-neutral-300 bg-white px-3 text-sm outline-none focus:border-neutral-500"
>
<option value="">선택하세요</option>
@@ -446,7 +521,7 @@ export default function DemandRegisterPage() {
</select>
}
rightLabel="전기전도도(µs/cm)"
rightControl={<InlineSuffixInput value={ec} onChange={setEc} suffix="이하" />}
rightControl={<InlineSuffixInput value={ec} onChange={setEc} suffix={farmText} />}
/>
<Divider />
-1
View File
@@ -709,7 +709,6 @@ export const SdmReducer = (set: any): SdmActions => {
ruseBizNm: maskedBizNm,
};
});
console.log(similarCaseList);
if (similarCaseList && similarCaseList.length !== 0) {
set((state: SdmType) => ({