แก้ออกคำสั่งเงินเดือน step 1 & 4
This commit is contained in:
parent
f7d8256682
commit
adfbe1b047
2 changed files with 41 additions and 9 deletions
|
|
@ -66,7 +66,7 @@ const byOrder = ref<string>("");
|
||||||
const nameCommand = ref<any>();
|
const nameCommand = ref<any>();
|
||||||
const positionCommand = ref<string>("");
|
const positionCommand = ref<string>("");
|
||||||
const year = ref<number>(0);
|
const year = ref<number>(0);
|
||||||
const SalaryRound = ref<string>("");
|
const SalaryRound = ref<any>(null);
|
||||||
|
|
||||||
// 33-34-35
|
// 33-34-35
|
||||||
const input33 = ref<string>("");
|
const input33 = ref<string>("");
|
||||||
|
|
@ -83,9 +83,6 @@ onMounted(async () => {
|
||||||
} else {
|
} else {
|
||||||
await fecthTypeOption("noData");
|
await fecthTypeOption("noData");
|
||||||
}
|
}
|
||||||
if (year.value !== 0) {
|
|
||||||
fetchSalaryRound();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// เลือกคำสั่งโดย
|
// เลือกคำสั่งโดย
|
||||||
watch(byOrder, async () => {
|
watch(byOrder, async () => {
|
||||||
|
|
@ -176,6 +173,9 @@ const fetchdetailOrder = async () => {
|
||||||
nameCommand.value = data.signatoryBy;
|
nameCommand.value = data.signatoryBy;
|
||||||
positionCommand.value = data.signatoryPosition;
|
positionCommand.value = data.signatoryPosition;
|
||||||
SalaryRound.value = data.salaryPeriodId;
|
SalaryRound.value = data.salaryPeriodId;
|
||||||
|
year.value = Number(data.year);
|
||||||
|
|
||||||
|
fetchSalaryRound();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -256,7 +256,8 @@ const submit = async () => {
|
||||||
signatoryBy: signBy === "" ? nameCommand.value : signBy,
|
signatoryBy: signBy === "" ? nameCommand.value : signBy,
|
||||||
signatoryPosition: positionCommand.value,
|
signatoryPosition: positionCommand.value,
|
||||||
year: year.value,
|
year: year.value,
|
||||||
salaryPeriodId: SalaryRound.value,
|
salaryPeriodId: SalaryRound.value.id,
|
||||||
|
salaryPeriod: SalaryRound.value.code,
|
||||||
};
|
};
|
||||||
// if (
|
// if (
|
||||||
// typeOrder.value.commandCode == "C-PM-33" ||
|
// typeOrder.value.commandCode == "C-PM-33" ||
|
||||||
|
|
@ -387,8 +388,13 @@ function fetchSalaryRound() {
|
||||||
: e.period === "OCT"
|
: e.period === "OCT"
|
||||||
? "รอบตุลาคม"
|
? "รอบตุลาคม"
|
||||||
: "-",
|
: "-",
|
||||||
|
code: e.period,
|
||||||
}));
|
}));
|
||||||
salaryRoundOptionMain.value = list;
|
salaryRoundOptionMain.value = list;
|
||||||
|
|
||||||
|
if (SalaryRound.value) {
|
||||||
|
SalaryRound.value = list.find((x: any) => x.id == SalaryRound.value);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -398,6 +404,7 @@ function fetchSalaryRound() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-form greedy @submit.prevent @validation-success="submit" class="q-pa-md">
|
<q-form greedy @submit.prevent @validation-success="submit" class="q-pa-md">
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
|
|
@ -665,13 +672,11 @@ function fetchSalaryRound() {
|
||||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกรอบการขึ้นเงินเดือน'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณาเลือกรอบการขึ้นเงินเดือน'}`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'รอบการขึ้นเงินเดือน'}`"
|
:label="`${'รอบการขึ้นเงินเดือน'}`"
|
||||||
map-options
|
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="salaryRoundOption"
|
:options="salaryRoundOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
emit-value
|
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@filter="(inputValue:any,
|
@filter="(inputValue:any,
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'SalaryRound'
|
doneFn:Function) => filterSelector(inputValue, doneFn,'SalaryRound'
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,33 @@ const orderId = ref<string>(orderId_params.toString());
|
||||||
|
|
||||||
// เช็คว่าต้องมีแนบท้ายไหม code ที่เพิ่มคืออันที่ไม่มีแนบท้าย
|
// เช็คว่าต้องมีแนบท้ายไหม code ที่เพิ่มคืออันที่ไม่มีแนบท้าย
|
||||||
const attachmentStatus = computed(() => {
|
const attachmentStatus = computed(() => {
|
||||||
|
return code.value != "c-pm-10" &&
|
||||||
|
code.value != "c-pm-11" &&
|
||||||
|
code.value != "c-pm-12" &&
|
||||||
|
code.value != "c-pm-16" &&
|
||||||
|
code.value != "c-pm-18" &&
|
||||||
|
code.value != "c-pm-19" &&
|
||||||
|
code.value != "c-pm-20" &&
|
||||||
|
code.value != "c-pm-21" &&
|
||||||
|
code.value != "c-pm-23" &&
|
||||||
|
code.value != "c-pm-25" &&
|
||||||
|
code.value != "c-pm-26" &&
|
||||||
|
code.value != "c-pm-27" &&
|
||||||
|
code.value != "c-pm-28" &&
|
||||||
|
code.value != "c-pm-29" &&
|
||||||
|
code.value != "c-pm-30" &&
|
||||||
|
code.value != "c-pm-31" &&
|
||||||
|
code.value != "c-pm-32" &&
|
||||||
|
code.value != "c-pm-33" &&
|
||||||
|
code.value != "c-pm-34" &&
|
||||||
|
code.value != "c-pm-35" &&
|
||||||
|
code.value != "c-pm-36" &&
|
||||||
|
code.value != "c-pm-37"
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
});
|
||||||
|
|
||||||
|
const attachmentUploadStatus = computed(() => {
|
||||||
return code.value != "c-pm-10" &&
|
return code.value != "c-pm-10" &&
|
||||||
code.value != "c-pm-11" &&
|
code.value != "c-pm-11" &&
|
||||||
code.value != "c-pm-12" &&
|
code.value != "c-pm-12" &&
|
||||||
|
|
@ -430,7 +457,7 @@ const clickExecute = async (id: string) => {
|
||||||
};
|
};
|
||||||
const validateFormUpload = () => {
|
const validateFormUpload = () => {
|
||||||
if (
|
if (
|
||||||
attachmentStatus.value &&
|
attachmentUploadStatus.value &&
|
||||||
fileOrder.value !== null &&
|
fileOrder.value !== null &&
|
||||||
fileTailer.value !== null
|
fileTailer.value !== null
|
||||||
) {
|
) {
|
||||||
|
|
@ -645,7 +672,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</q-file>
|
</q-file>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="attachmentStatus">
|
<div v-if="attachmentUploadStatus">
|
||||||
<label class="text-file">เอกสารแนบท้าย</label>
|
<label class="text-file">เอกสารแนบท้าย</label>
|
||||||
<div v-if="TailerPDFUpload != ''" class="text-right">
|
<div v-if="TailerPDFUpload != ''" class="text-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue