fixing submit receive module change send name
This commit is contained in:
parent
a50177bf5c
commit
4c01e5aa0d
2 changed files with 38 additions and 52 deletions
|
|
@ -41,8 +41,8 @@ const {
|
|||
dialogConfirm,
|
||||
} = mixin;
|
||||
|
||||
const profileStore = useProfileDataStore();
|
||||
const { changeRetireText } = profileStore;
|
||||
// const profileStore = useProfileDataStore();
|
||||
// const { changeRetireText } = profileStore;
|
||||
|
||||
const title = ref<ResponseTitle>({
|
||||
fullname: "",
|
||||
|
|
@ -132,10 +132,11 @@ const OpsFilter = ref<InformationOps>({
|
|||
],
|
||||
});
|
||||
|
||||
/*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */
|
||||
const fetchPerson = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.person)
|
||||
.get(config.API.profileNewMetaMain)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let optionbloodGroups: DataOption[] = [];
|
||||
|
|
@ -159,12 +160,11 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.genderOps = optiongenders;
|
||||
|
||||
let optionprefixs: DataOption[] = [];
|
||||
data.prefixs.map((r: DataOptioninfo) => {
|
||||
optionprefixs.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
});
|
||||
});
|
||||
optionprefixs = data.prefixs.map((v: any) => ({
|
||||
id: v.id,
|
||||
name: v.name,
|
||||
}));
|
||||
|
||||
Ops.value.prefixOps = optionprefixs;
|
||||
OpsFilter.value.prefixOps = optionprefixs;
|
||||
|
||||
|
|
@ -189,7 +189,9 @@ const fetchPerson = async () => {
|
|||
OpsFilter.value.religionOps = optionreligions;
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
|
|
@ -391,14 +393,14 @@ const calRetire = async (birth: Date) => {
|
|||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
informaData.value.age = data.age;
|
||||
changeRetireText(data.retireDate);
|
||||
// changeRetireText(data.retireDate);
|
||||
dateBefore.value = birth;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
const retire = new Date(`${birth.getFullYear() + 60}-09-30`);
|
||||
informaData.value.birthDate = dateBefore.value;
|
||||
changeRetireText(date2Thai(retire));
|
||||
// changeRetireText(date2Thai(retire));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -419,12 +421,12 @@ function saveData() {
|
|||
informaData.value.birthDate !== null
|
||||
? dateToISO(informaData.value.birthDate)
|
||||
: null,
|
||||
genderId: informaData.value.genderId,
|
||||
gender: informaData.value.genderId,
|
||||
nationality: informaData.value.nationality,
|
||||
race: informaData.value.ethnicity,
|
||||
religionId: informaData.value.religionId,
|
||||
bloodGroupId: informaData.value.bloodId,
|
||||
relationshipId: informaData.value.statusId,
|
||||
religion: informaData.value.religionId,
|
||||
bloodGroup: informaData.value.bloodId,
|
||||
relationship: informaData.value.statusId,
|
||||
telephoneNumber: informaData.value.tel,
|
||||
reason: reason.value,
|
||||
educationOld: educationOld.value,
|
||||
|
|
@ -564,7 +566,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.prefixOps"
|
||||
option-value="id"
|
||||
option-value="name"
|
||||
:label="`${'คำนำหน้าชื่อ'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
|
@ -673,7 +675,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.genderOps"
|
||||
option-value="id"
|
||||
option-value="name"
|
||||
:label="`${'เพศ'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
|
@ -695,7 +697,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.statusOps"
|
||||
option-value="id"
|
||||
option-value="name"
|
||||
:label="`${'สถานภาพ'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
|
@ -743,7 +745,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.religionOps"
|
||||
option-value="id"
|
||||
option-value="name"
|
||||
:label="`${'ศาสนา'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
|
@ -767,7 +769,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.bloodOps"
|
||||
option-value="id"
|
||||
option-value="name"
|
||||
:label="`${'หมู่เลือด'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue