신규 등록 , 건축물 조회 수정
This commit is contained in:
@@ -142,15 +142,14 @@ export function RainRegForm({
|
||||
};
|
||||
|
||||
if (isModal) {
|
||||
// regRainForm.bdstInfoPk = null;
|
||||
rainReg(regRainForm);
|
||||
} else {
|
||||
console.log(" regRainForm ", regRainForm)
|
||||
rainUpdate(regRainForm);
|
||||
}
|
||||
};
|
||||
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
console.log(values);
|
||||
objToForm(values);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const formSchema = z.object({
|
||||
});
|
||||
|
||||
export function RswtrRegForm() {
|
||||
const { rswt } = useWrStore((state) => state);
|
||||
const { rswt,code } = useWrStore((state) => state);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
@@ -165,7 +165,7 @@ export function RswtrRegForm() {
|
||||
<FormUi label="필수 종류">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
selectArray={rswt.selectYN}
|
||||
selectArray={code.orgwtKndCd}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
@@ -189,23 +189,7 @@ export function RswtrRegForm() {
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="utztmUsgCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용용도">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className=" my-2">
|
||||
@@ -226,7 +210,7 @@ export function RswtrRegForm() {
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
selectArray={code.yn}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
@@ -265,7 +249,7 @@ export function RswtrRegForm() {
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
selectArray={code.yn}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
|
||||
@@ -11,6 +11,8 @@ import { useEffect, useState } from "react";
|
||||
import { RainRegForm } from "../../form/fcltReg/rainReg/component";
|
||||
import { getCityCd, type selectArray } from "@/app/store/common/code";
|
||||
import { getCity } from "@/components/lib/func/commom";
|
||||
import { RswtrRegForm } from "../../form/fcltReg/rswtrReg/component";
|
||||
import { HtdflRegForm } from "../../form/fcltReg/htdflReg/component";
|
||||
|
||||
export type objSearchType = {
|
||||
sgg: string|number;
|
||||
@@ -18,7 +20,7 @@ export type objSearchType = {
|
||||
};
|
||||
|
||||
|
||||
export function BdstReg() {
|
||||
export function BdstReg({moType}:{moType:string} ) {
|
||||
const { rain, code, bdst,findBdst } = useWrStore((state) => {
|
||||
return state;
|
||||
});
|
||||
@@ -52,7 +54,7 @@ export function BdstReg() {
|
||||
data = objSearch.sgg
|
||||
}
|
||||
|
||||
findBdst(String(data), searchTxt || "")
|
||||
findBdst(String(data), searchTxt || "","RNB" )
|
||||
|
||||
}
|
||||
|
||||
@@ -133,7 +135,12 @@ export function BdstReg() {
|
||||
<div className="border-t border-gray-300 my-4"></div>
|
||||
<ScrollArea className="h-[60vh]">
|
||||
<div>
|
||||
<RainRegForm rainForm={rainBdstForm } isModal={true}/>
|
||||
{moType === 'rain'?
|
||||
<RainRegForm rainForm={rainBdstForm} isModal={true} />
|
||||
:moType==='rswt'?<RswtrRegForm></RswtrRegForm>
|
||||
:<HtdflRegForm></HtdflRegForm>
|
||||
}
|
||||
|
||||
</div>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user