commit แก้ไข step4

This commit is contained in:
Thanit Konmek 2023-07-13 09:43:09 +07:00
parent 3230b5e8c4
commit e00ed7a224
2 changed files with 36 additions and 6 deletions

View file

@ -17,8 +17,15 @@ import type { RequestItemsHistoryObject } from "@/modules//05_placement/interfac
import type { ResponseObject } from "@/modules//05_placement/interface/response/Address"; import type { ResponseObject } from "@/modules//05_placement/interface/response/Address";
import HistoryTable from "@/components/TableHistory.vue"; import HistoryTable from "@/components/TableHistory.vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import type { AddressOps } from "@/modules//05_placement/interface/index/Main";
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
import type {
AddressOps,
Address as AddressType,
} from "@/modules//05_placement/interface/index/Main";
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { PropType } from "vue";
const props = defineProps({ const props = defineProps({
statusEdit: { statusEdit: {
@ -33,6 +40,10 @@ const props = defineProps({
type: Function, type: Function,
default: () => console.log("not function"), default: () => console.log("not function"),
}, },
data: {
type: Object as PropType<AddressType>,
default: AddressDataDefualt,
},
}); });
const emit = defineEmits(["update:statusEdit"]); const emit = defineEmits(["update:statusEdit"]);
@ -835,4 +846,4 @@ const getClass = (val: boolean) => {
</q-tr> </q-tr>
</template> </template>
</HistoryTable> </HistoryTable>
</template> </template>

View file

@ -1,12 +1,12 @@
import type { zipCodeOption } from "../../components/PersonalDetail/profileType"; import type { zipCodeOption } from "../../components/PersonalDetail/profileType";
interface DataOption { interface DataOption {
id: number|null; id: number | null;
name:string|null; name: string | null;
disable?: boolean; disable?: boolean;
} }
interface DataOption1 { interface DataOption1 {
id: string|null; id: string | null;
name:string|null; name: string | null;
disable?: boolean; disable?: boolean;
} }
interface DataOptionInsignia { interface DataOptionInsignia {
@ -133,6 +133,24 @@ interface Address {
registSame: boolean; registSame: boolean;
} }
const AddressDataDefualt: Address = {
registSubDistrict: "",
registSubDistrictId: "",
registZipCode: "",
registDistrict: "",
registDistrictId: "",
registProvince: "",
registProvinceId: "",
currentSubDistrict: "",
currentSubDistrictId: "",
currentZipCode: "",
currentDistrict: "",
currentDistrictId: "",
currentProvince: "",
currentProvinceId: "",
registSame: false,
};
export type { export type {
DataOption, DataOption,
DataOptionInsignia, DataOptionInsignia,
@ -149,4 +167,5 @@ export type {
Education, Education,
Family, Family,
Address, Address,
AddressDataDefualt,
}; };