fix(leave-history):add field beginningLeaveDays beginningLeaveCount
This commit is contained in:
parent
5fb13c8cd4
commit
b083bcb0ca
4 changed files with 76 additions and 7 deletions
|
|
@ -92,12 +92,12 @@ const listAdd = ref<ListMenu[]>([
|
|||
type: "DETAIL",
|
||||
color: "blue-9",
|
||||
},
|
||||
// {
|
||||
// label: "เผยแพร่",
|
||||
// icon: "mdi-publish",
|
||||
// type: "PUBLISH",
|
||||
// color: "indigo-9",
|
||||
// },
|
||||
{
|
||||
label: "เผยแพร่",
|
||||
icon: "mdi-publish",
|
||||
type: "PUBLISH",
|
||||
color: "indigo-9",
|
||||
},
|
||||
]);
|
||||
|
||||
const getMenuItems = computed(() => {
|
||||
|
|
@ -416,7 +416,6 @@ function onPublicOrganization(data: OrgTree) {
|
|||
showLoader();
|
||||
try {
|
||||
await http.post(config.API.moveDraftToCurrent(orgDnaId));
|
||||
await props.fetchDataTree?.();
|
||||
await success($q, "เผยแพร่โครงสร้างสำเร็จ");
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ const formData = reactive({
|
|||
leaveDays: "", //วันลาที่ยกมา
|
||||
leaveDaysUsed: "", //วันลาที่ใช้ไป
|
||||
leaveCount: "", //ครั้งที่ใช้ไป
|
||||
beginningLeaveDays: "", //ยักมา (วัน)
|
||||
beginningLeaveCount: "", // ยกมา (ครั่ง)
|
||||
});
|
||||
const leaveTypeOptions = ref<DataLeaveType[]>([]);
|
||||
const leaveTypeOptionsMain = ref<DataLeaveType[]>([]);
|
||||
|
|
@ -106,6 +108,12 @@ async function onSubmit() {
|
|||
? Number(formData.leaveDaysUsed)
|
||||
: 0,
|
||||
leaveCount: formData.leaveCount ? Number(formData.leaveCount) : 0,
|
||||
beginningLeaveDays: formData.beginningLeaveDays
|
||||
? Number(formData.beginningLeaveDays)
|
||||
: 0,
|
||||
beginningLeaveCount: formData.beginningLeaveCount
|
||||
? Number(formData.beginningLeaveCount)
|
||||
: 0,
|
||||
})
|
||||
|
||||
.then(async () => {
|
||||
|
|
@ -159,6 +167,12 @@ async function defineDataLeaveBeginning(data: DataLeaveBeginning) {
|
|||
? data.leaveDaysUsed.toString()
|
||||
: "0";
|
||||
formData.leaveCount = data.leaveCount ? data.leaveCount.toString() : "0";
|
||||
formData.beginningLeaveDays = data.beginningLeaveDays
|
||||
? data.beginningLeaveDays.toString()
|
||||
: "0";
|
||||
formData.beginningLeaveCount = data.beginningLeaveCount
|
||||
? data.beginningLeaveCount.toString()
|
||||
: "0";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -187,6 +201,9 @@ function onClose() {
|
|||
formData.leaveYear = calculateFiscalYear(new Date());
|
||||
formData.leaveDays = "";
|
||||
formData.leaveDaysUsed = "";
|
||||
formData.leaveCount = "";
|
||||
formData.beginningLeaveDays = "";
|
||||
formData.beginningLeaveCount = "";
|
||||
rows.value = [];
|
||||
selected.value = [];
|
||||
pagination.value = {
|
||||
|
|
@ -248,6 +265,7 @@ watch(modal, async (val) => {
|
|||
await Promise.all([
|
||||
filterLeaveTypeData(),
|
||||
isStatusEdit.value && defineDataLeaveBeginning(rowData.value),
|
||||
console.log(rowData.value),
|
||||
]);
|
||||
} finally {
|
||||
hideLoader();
|
||||
|
|
@ -455,6 +473,8 @@ watch(modal, async (val) => {
|
|||
outlined
|
||||
label="ที่ใช้ไป (วัน)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
|
@ -465,6 +485,34 @@ watch(modal, async (val) => {
|
|||
outlined
|
||||
label="ที่ใช้ไป (ครั้ง)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
v-model="formData.beginningLeaveDays"
|
||||
dense
|
||||
outlined
|
||||
label="ยกมา (วัน)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
v-model="formData.beginningLeaveCount"
|
||||
dense
|
||||
outlined
|
||||
label="ยกมา (ครั้ง)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ interface DataLeaveBeginning {
|
|||
prefix: string;
|
||||
profileId: string;
|
||||
leaveCount: number;
|
||||
beginningLeaveDays: number;
|
||||
beginningLeaveCount: number;
|
||||
}
|
||||
|
||||
export type { DataLeaveType, DataLeaveBeginning };
|
||||
|
|
|
|||
|
|
@ -98,6 +98,24 @@ const columns = ref<QTableColumn[]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "beginningLeaveDays",
|
||||
align: "left",
|
||||
label: "ยกมา (วัน)",
|
||||
sortable: true,
|
||||
field: "beginningLeaveDays",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "beginningLeaveCount",
|
||||
align: "left",
|
||||
label: "ยกมา (ครั้ง)",
|
||||
sortable: true,
|
||||
field: "beginningLeaveCount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"fullName",
|
||||
|
|
@ -106,6 +124,8 @@ const visibleColumns = ref<string[]>([
|
|||
"leaveDays",
|
||||
"leaveDaysUsed",
|
||||
"leaveCount",
|
||||
"beginningLeaveDays",
|
||||
"beginningLeaveCount",
|
||||
]);
|
||||
|
||||
const modalDialogForm = ref<boolean>(false); //modal Dialog บันทึกข้อมูลการลาย้อนหลัง
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue