Merge branch 'develop' into working
This commit is contained in:
commit
417f9b5825
4 changed files with 101 additions and 89 deletions
|
|
@ -4,6 +4,9 @@ const prefix = `${env.API_URI}/prefix/`
|
|||
const religion = `${env.API_URI}/religion/`
|
||||
const relationship = `${env.API_URI}/relationship/`
|
||||
const educationLevel = `${env.API_URI}/education-level/`
|
||||
const province = `${env.API_URI}/province/`;
|
||||
const district = `${env.API_URI}/district/`;
|
||||
const subDistrict = `${env.API_URI}/sub-district/`;
|
||||
|
||||
export default {
|
||||
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
||||
|
|
@ -11,5 +14,8 @@ export default {
|
|||
prefix,
|
||||
religion,
|
||||
relationship,
|
||||
educationLevel
|
||||
educationLevel,
|
||||
province,
|
||||
listDistrict: (id: string) => `${district}${id}`,
|
||||
listSubDistrict: (id: string) => `${subDistrict}${id}`,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<q-btn color="primary" @click="setStatus('processing')" label="ส่งหลักฐานการชำระเงิน" />
|
||||
</div>
|
||||
<div class="text-black text-center q-pb-lg col-12">
|
||||
***ถ้าต้องการเเก้ไขหลักฐานการโอนเงินกรุณาอัพโหลดซ้ำ***
|
||||
***ถ้าต้องการเเก้ไขหลักฐานการโอนเงินกรุณาอัปโหลดซ้ำ***
|
||||
</div>
|
||||
</div>
|
||||
<q-btn color="negative" @click="setStatus('rejected')">Re</q-btn>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="addressData.code"
|
||||
v-model="codep"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="addressData.codeC"
|
||||
v-model="codec"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
|
|
@ -273,9 +273,9 @@ const props = defineProps({
|
|||
const emit = defineEmits(['update:statusEdit'])
|
||||
|
||||
onMounted(() => {
|
||||
// fetchProvince()
|
||||
// fetchDistrict(addressData.value.provinceId, '1')
|
||||
// fetchDistrict(addressData.value.provinceIdC, '2')
|
||||
fetchProvince()
|
||||
fetchDistrict(addressData.value.provinceId, '1')
|
||||
fetchDistrict(addressData.value.provinceIdC, '2')
|
||||
})
|
||||
|
||||
const saveData = async () => {
|
||||
|
|
@ -349,72 +349,72 @@ const selectSubDistrict = (e: string, name: string) => {
|
|||
}
|
||||
|
||||
const fetchProvince = async () => {
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.province)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// provinceOptions.value = option
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
provinceOptions.value = option
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchDistrict = async (id: string, position: string) => {
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.listDistrict(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// if (position == '1') {
|
||||
// districtOptions.value = option
|
||||
// } else {
|
||||
// districtCOptions.value = option
|
||||
// }
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
if (position == '1') {
|
||||
districtOptions.value = option
|
||||
} else {
|
||||
districtCOptions.value = option
|
||||
}
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchSubDistrict = async (id: string, position: string) => {
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.listSubDistrict(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: zipCodeOption[] = []
|
||||
// // console.log(res);
|
||||
// data.map((r: any) => {
|
||||
// option.push({
|
||||
// id: r.id.toString(),
|
||||
// name: r.name.toString(),
|
||||
// zipCode: r.zipCode.toString()
|
||||
// })
|
||||
// })
|
||||
// if (position == '1') {
|
||||
// subdistrictOptions.value = option
|
||||
// } else {
|
||||
// subdistrictCOptions.value = option
|
||||
// }
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.listSubDistrict(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: zipCodeOption[] = []
|
||||
// console.log(res);
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
zipCode: r.zipCode.toString()
|
||||
})
|
||||
})
|
||||
if (position == '1') {
|
||||
subdistrictOptions.value = option
|
||||
} else {
|
||||
subdistrictCOptions.value = option
|
||||
}
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="informaData.provinceId"
|
||||
v-model="province"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
@ -358,8 +358,8 @@ const mixin = useCounterMixin()
|
|||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
const prefix = ref<string>()
|
||||
const province = ref<string>()
|
||||
const relationship = ref<string>()
|
||||
|
||||
const prefixOptions = ref<DataOption[]>([])
|
||||
const relationshipOptions = ref<DataOption[]>([])
|
||||
|
||||
|
|
@ -412,11 +412,17 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits(['update:statusEdit'])
|
||||
|
||||
onMounted(() => {
|
||||
// fetchProvince()
|
||||
fetchprefix()
|
||||
fetchrelationship()
|
||||
onMounted(async () => {
|
||||
await fetchData()
|
||||
await fetchprefix()
|
||||
await fetchrelationship()
|
||||
await fetchProvince()
|
||||
})
|
||||
const fetchData = () => {
|
||||
prefix.value = 'e4e6a4f8-39c6-467f-bd84-7650d105fc4c'
|
||||
relationship.value = '02fbc0e3-1da0-45b5-90da-783d344b5896'
|
||||
province.value = '02fbc0e3-1da0-45b5-90da-783d344b5896'
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
if (store.consend == true) {
|
||||
|
|
@ -446,22 +452,22 @@ const changeBtn = async () => {
|
|||
}
|
||||
|
||||
const fetchProvince = async () => {
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.province)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// provinceOptions.value = option
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
provinceOptions.value = option
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
const fetchprefix = async () => {
|
||||
// loader.value = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue