diff --git a/src/modules/04_registry/components/Salary.vue b/src/modules/04_registry/components/Salary.vue index c0ac7fec7..36c830603 100644 --- a/src/modules/04_registry/components/Salary.vue +++ b/src/modules/04_registry/components/Salary.vue @@ -335,6 +335,15 @@ option-value="id" hide-bottom-space use-input + :display-value=" + positionTypeOptions.find( + (x) => x.id == positionTypeId + ) + ? positionTypeOptions.find( + (x) => x.id == positionTypeId + )?.name + : null + " input-debounce="0" @filter="(inputValue: any, doneFn: Function) => filterSelector(inputValue, doneFn, '4' @@ -361,6 +370,15 @@ hide-bottom-space use-input input-debounce="0" + :display-value=" + positionLevelOptions.find( + (x) => x.id == positionLevelId + ) + ? positionLevelOptions.find( + (x) => x.id == positionLevelId + )?.name + : null + " @filter="(inputValue: any, doneFn: Function) => filterSelector(inputValue, doneFn, '6' )" @@ -1715,8 +1733,8 @@ const fetchData = async () => { positionPathSideName: e.positionPathSideName, positionType: e.positionType, positionTypeId: e.positionTypeId, - positionLevel: e.positionLevel, positionLevelId: e.positionLevelId, + positionLevel: e.positionLevel, positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId, positionExecutiveName: e.positionExecutiveName, @@ -1743,48 +1761,48 @@ const fetchData = async () => { } }; -const onSelected = async (id: string) => { - await fetchPositionNumber(id); -}; +// const onSelected = async (id: string) => { +// await fetchPositionNumber(id); +// }; -const fetchOrganization = async (id: string) => { - if (selected.value != "") { - showLoader(); - await http - .get(config.API.organizationName(id)) - .then((res) => { - let data = res.data.result; - ocId.value = data; - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); - } -}; +// const fetchOrganization = async (id: string) => { +// if (selected.value != "") { +// showLoader(); +// await http +// .get(config.API.organizationName(id)) +// .then((res) => { +// let data = res.data.result; +// ocId.value = data; +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// hideLoader(); +// }); +// } +// }; -const fetchPositionNumber = async (id: string) => { - showLoader(); - await http - .get(config.API.getPositionNumberIdByOcId(id)) - .then((res) => { - const data = res.data.result; - let option: DataOption[] = []; - data.map((r: DataOption) => { - option.push({ id: r.id.toString(), name: r.name.toString() }); - }); - posNoOptions.value = option; - posNoOptionsFilter.value = option; - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); -}; +// const fetchPositionNumber = async (id: string) => { +// showLoader(); +// await http +// .get(config.API.getPositionNumberIdByOcId(id)) +// .then((res) => { +// const data = res.data.result; +// let option: DataOption[] = []; +// data.map((r: DataOption) => { +// option.push({ id: r.id.toString(), name: r.name.toString() }); +// }); +// posNoOptions.value = option; +// posNoOptionsFilter.value = option; +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// hideLoader(); +// }); +// }; /** * กดดูข้อมูลก่อนหน้า @@ -1815,7 +1833,7 @@ const getData = async () => { amount.value = row.amount; positionSalaryAmount.value = row.positionSalaryAmount; mouthSalaryAmount.value = row.mouthSalaryAmount; - await onSelected(row.ocId); + // await onSelected(row.ocId); selected.value = row.ocId; positionName.value = row.positionName; posNoId.value = row.posNoId; @@ -1830,7 +1848,7 @@ const getData = async () => { salaryRef.value = row.salaryRef; refCommandNo.value = row.refCommandNo; id.value = row.id; - await fetchPositionNumber(row.ocId); + // await fetchPositionNumber(row.ocId); }; /** @@ -2389,8 +2407,6 @@ async function fetchType() { }); positionTypeOptions.value = optionPositionTypes; positionTypeOptionsFilter.value = optionPositionTypes; - - }) .catch((err) => { messageError($q, err);