fixing
This commit is contained in:
parent
e9367dea5c
commit
eedddc19ae
1 changed files with 8 additions and 10 deletions
|
|
@ -140,7 +140,7 @@ const refreshData = async () => {
|
||||||
async () => {
|
async () => {
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
await props.fetch("Address");
|
await props.fetch("Address");
|
||||||
fetchProvince()
|
fetchProvince();
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
onEdit.value = false;
|
onEdit.value = false;
|
||||||
},
|
},
|
||||||
|
|
@ -268,7 +268,7 @@ const fetchProvince = async () => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: optionData[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id, name: r.name });
|
||||||
});
|
});
|
||||||
Ops.value.provinceOps = option;
|
Ops.value.provinceOps = option;
|
||||||
OpsFilter.value.provinceOps = option;
|
OpsFilter.value.provinceOps = option;
|
||||||
|
|
@ -332,8 +332,7 @@ const fetchProvince = async () => {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ดึงข้อมูลอำเภอ
|
// ดึงข้อมูลอำเภอ
|
||||||
|
|
@ -345,7 +344,7 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
const data = res.data.result.districts;
|
const data = res.data.result.districts;
|
||||||
let option: optionData[] = [];
|
let option: optionData[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
option.push({ id: r.id, name: r.name });
|
||||||
});
|
});
|
||||||
if (position == "1") {
|
if (position == "1") {
|
||||||
Ops.value.districtOps = option;
|
Ops.value.districtOps = option;
|
||||||
|
|
@ -375,8 +374,7 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -390,9 +388,9 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
|
||||||
let option: zipCodeOption[] = [];
|
let option: zipCodeOption[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({
|
option.push({
|
||||||
id: r.id.toString(),
|
id: r.id,
|
||||||
name: r.name.toString(),
|
name: r.name,
|
||||||
zipCode: r.zipCode.toString(),
|
zipCode: r.zipCode,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (position == "1") {
|
if (position == "1") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue