fix : registry edit

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-03-12 14:59:27 +07:00
parent 42950b3caf
commit db35fe06ef
3 changed files with 33 additions and 32 deletions

View file

@ -295,7 +295,7 @@ async function onDefineData(index: number) {
if (newData) { if (newData) {
const salaryNew = newData.salaryNew; const salaryNew = newData.salaryNew;
const salaryOld = newData.salaryOld; const salaryOld = newData?.salaryOld;
formData.commandCode = salaryNew.commandCode; formData.commandCode = salaryNew.commandCode;
formData.commandNo = salaryNew.commandNo; formData.commandNo = salaryNew.commandNo;
@ -325,6 +325,7 @@ async function onDefineData(index: number) {
formData.posNumCodeSit = salaryNew.posNumCodeSit; formData.posNumCodeSit = salaryNew.posNumCodeSit;
formData.posNumCodeSitAbb = salaryNew.posNumCodeSitAbb; formData.posNumCodeSitAbb = salaryNew.posNumCodeSitAbb;
if (salaryOld) {
formReadonly.commandCode = salaryOld.commandCode; formReadonly.commandCode = salaryOld.commandCode;
formReadonly.commandNo = salaryOld.commandNo; formReadonly.commandNo = salaryOld.commandNo;
formReadonly.commandYear = salaryOld.commandYear; formReadonly.commandYear = salaryOld.commandYear;
@ -353,6 +354,7 @@ async function onDefineData(index: number) {
formReadonly.posNumCodeSitAbb = salaryOld.posNumCodeSitAbb; formReadonly.posNumCodeSitAbb = salaryOld.posNumCodeSitAbb;
} }
} }
}
async function onNavigateRow(action: string) { async function onNavigateRow(action: string) {
action === "next" ? (rowIndex.value += 1) : (rowIndex.value -= 1); action === "next" ? (rowIndex.value += 1) : (rowIndex.value -= 1);

View file

@ -33,9 +33,9 @@ const posExecutiveOptions = defineModel<DataOption[]>("posExecutiveOptions", {
required: true, required: true,
}); });
const props = defineProps({ const props = defineProps<{
updateSelectType: { type: Function, defult: () => {} }, updateSelectType?: (value: any) => void;
}); }>();
/** /**
* ลเตอรอมลจาก input * ลเตอรอมลจาก input
@ -388,6 +388,7 @@ function classInput(val: boolean) {
hide-selected hide-selected
fill-input fill-input
clearable clearable
@clear="formData.positionLevel = ''"
input-debounce="0" input-debounce="0"
@update:model-value="props.updateSelectType" @update:model-value="props.updateSelectType"
@filter="(inputValue: string, @filter="(inputValue: string,

View file

@ -307,8 +307,6 @@ const isAddPosition = ref<boolean>(true); // สถานะการเพิ
/** function fetch ข้อมูลรายการตำแหน่งเงินเดือน*/ /** function fetch ข้อมูลรายการตำแหน่งเงินเดือน*/
async function fetchData() { async function fetchData() {
isLoad.value = true; isLoad.value = true;
rowsMain.value = [];
rows.value = [];
const paht = const paht =
tabs.value === "PENDING" tabs.value === "PENDING"
? `/${empType.value}/${profileId.value}` ? `/${empType.value}/${profileId.value}`