Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m58s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m58s
This commit is contained in:
commit
d296b2e4ac
7 changed files with 301 additions and 76 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"bma-org-chart": "^0.0.8",
|
"bma-org-chart": "^0.0.8",
|
||||||
"esri-loader": "^3.7.0",
|
"esri-loader": "^3.7.0",
|
||||||
|
"exceljs": "^4.4.0",
|
||||||
"html-to-image": "^1.11.13",
|
"html-to-image": "^1.11.13",
|
||||||
"keycloak-js": "^20.0.2",
|
"keycloak-js": "^20.0.2",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,8 @@ export default {
|
||||||
`${orgProfile}/keycloak/permissionProfile/${rootId}`,
|
`${orgProfile}/keycloak/permissionProfile/${rootId}`,
|
||||||
profileidPosition: (type: string) =>
|
profileidPosition: (type: string) =>
|
||||||
`${orgProfile}${type}/profileid/position`,
|
`${orgProfile}${type}/profileid/position`,
|
||||||
|
uploadProfile: (type: string, id: string) =>
|
||||||
|
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
||||||
|
|
||||||
workflowCommanderOperate: `${workflow}/commander/operate`,
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ interface DataPosition {
|
||||||
status: string;
|
status: string;
|
||||||
posNumCodeSitAbb: string;
|
posNumCodeSitAbb: string;
|
||||||
posNumCodeSit: string;
|
posNumCodeSit: string;
|
||||||
|
positionExecutiveField: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { DataSalaryPos, DataPosition };
|
export type { DataSalaryPos, DataPosition };
|
||||||
|
|
|
||||||
157
src/modules/04_registryPerson/utils/exportPosition.ts
Normal file
157
src/modules/04_registryPerson/utils/exportPosition.ts
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
import ExcelJS from "exceljs";
|
||||||
|
import { useEditPosDataStore } from "@/modules/04_registryPerson/stores/Edit";
|
||||||
|
|
||||||
|
import type { DataPosition } from "@/modules/04_registryPerson/interface/response/Edit";
|
||||||
|
|
||||||
|
const store = useEditPosDataStore();
|
||||||
|
|
||||||
|
// ฟังก์ชันแปลงวันที่จาก ISO format เป็นรูปแบบ dd/mm/yyyy (เช่น 18/05/2564)
|
||||||
|
function formatDateToDDMMYYYY(dateString: string | null | Date): string {
|
||||||
|
if (!dateString) return "";
|
||||||
|
|
||||||
|
const date = new Date(dateString);
|
||||||
|
if (isNaN(date.getTime())) return "";
|
||||||
|
|
||||||
|
const day = String(date.getDate()).padStart(2, "0");
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||||
|
const year = date.getFullYear() + 543; // แปลงเป็นปีพุทธศักราช
|
||||||
|
|
||||||
|
return `${day}/${month}/${year}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function exportToExcelPosition(data: DataPosition[]) {
|
||||||
|
const workbook = new ExcelJS.Workbook();
|
||||||
|
const worksheet = workbook.addWorksheet("รายการประวัติตำแหน่งเงินเดือน");
|
||||||
|
|
||||||
|
// --- ส่วนที่ 1: สร้าง Master Data Sheet สำหรับอ้างอิง ID ---
|
||||||
|
// เราจะซ่อนแผ่นงานนี้ไว้ (hidden) เพื่อใช้ทำ Dropdown และ VLOOKUP
|
||||||
|
const masterSheet = workbook.addWorksheet("MasterData", { state: "hidden" });
|
||||||
|
const masterData = store.commandCodeData; // [{id: 1, name: "ย้าย"}, ...]
|
||||||
|
|
||||||
|
masterData.forEach((item, index) => {
|
||||||
|
masterSheet.getCell(`A${index + 1}`).value = item.name;
|
||||||
|
masterSheet.getCell(`B${index + 1}`).value = item.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- ส่วนที่ 2: กำหนด Columns ---
|
||||||
|
worksheet.columns = [
|
||||||
|
{ header: "ลำดับ", key: "no", width: 8 },
|
||||||
|
{ header: "วันที่คำสั่งมีผล", key: "commandDateAffect", width: 18 },
|
||||||
|
{ header: "ตำแหน่งในสายงาน", key: "positionName", width: 25 },
|
||||||
|
{ header: "ตำแหน่งประเภท", key: "positionType", width: 18 },
|
||||||
|
{ header: "ระดับ", key: "positionLevel", width: 12 },
|
||||||
|
{ header: "ระดับซี", key: "positionCee", width: 12 },
|
||||||
|
{ header: "สายงาน", key: "positionLine", width: 20 },
|
||||||
|
{ header: "ด้าน/สาขา", key: "positionPathSide", width: 15 },
|
||||||
|
{ header: "ตำแหน่งทางการบริหาร", key: "positionExecutive", width: 20 },
|
||||||
|
{ header: "ด้านทางการบริหาร", key: "positionExecutiveField", width: 20 },
|
||||||
|
{ header: "เงินเดือน", key: "amount", width: 15 },
|
||||||
|
{ header: "เงินค่าตอบแทนรายเดือน", key: "mouthSalaryAmount", width: 15 },
|
||||||
|
{ header: "เงินประจำตำแหน่ง", key: "positionSalaryAmount", width: 15 },
|
||||||
|
{ header: "เงินค่าตอบแทนพิเศษ", key: "amountSpecial", width: 15 },
|
||||||
|
{ header: "หน่วยงาน", key: "organization", width: 30 },
|
||||||
|
{ header: "ส่วนราชการระดับ 1", key: "orgChild1", width: 20 },
|
||||||
|
{ header: "ส่วนราชการระดับ 2", key: "orgChild2", width: 20 },
|
||||||
|
{ header: "ส่วนราชการระดับ 3", key: "orgChild3", width: 20 },
|
||||||
|
{ header: "ส่วนราชการระดับ 4", key: "orgChild4", width: 20 },
|
||||||
|
{ header: "ตัวย่อเลขที่ตำแหน่ง", key: "posNoAbb", width: 15 },
|
||||||
|
{ header: "เลขที่ตำแหน่ง", key: "posNo", width: 15 },
|
||||||
|
{ header: "หน่วยงานที่ออกคำสั่ง", key: "posNumCodeSit", width: 20 },
|
||||||
|
{
|
||||||
|
header: "ตัวย่อหน่วยงานที่ออกคำสั่ง",
|
||||||
|
key: "posNumCodeSitAbb",
|
||||||
|
width: 15,
|
||||||
|
},
|
||||||
|
{ header: "เลขที่คำสั่ง", key: "commandNo", width: 15 },
|
||||||
|
{ header: "ปีเลขที่คำสั่ง", key: "commandYear", width: 12 },
|
||||||
|
{ header: "วันที่ลงนาม", key: "commandDateSign", width: 18 },
|
||||||
|
{ header: "ประเภทคำสั่ง", key: "commandCodeName", width: 25 }, // AA
|
||||||
|
{ header: "หมายเหตุ", key: "remark", width: 20 },
|
||||||
|
{ header: "commandId", key: "commandId", width: 20 }, // AC (ลำดับที่ 29)
|
||||||
|
{ header: "commandCode", key: "commandCode", width: 20 }, // AD (ลำดับที่ 30)
|
||||||
|
];
|
||||||
|
|
||||||
|
// 3. Map ข้อมูล
|
||||||
|
const newData = data.map((e, index) => ({
|
||||||
|
no: index + 1,
|
||||||
|
commandDateAffect: e.commandDateAffect
|
||||||
|
? formatDateToDDMMYYYY(e.commandDateAffect)
|
||||||
|
: "",
|
||||||
|
positionName: e.positionName,
|
||||||
|
positionType: e.positionType,
|
||||||
|
positionLevel: e.positionLevel,
|
||||||
|
positionCee: e.positionCee,
|
||||||
|
positionLine: e.positionLine || "",
|
||||||
|
positionPathSide: e.positionPathSide || "",
|
||||||
|
positionExecutive: e.positionExecutive,
|
||||||
|
positionExecutiveField: e.positionExecutiveField || "",
|
||||||
|
amount: e.amount || 0,
|
||||||
|
mouthSalaryAmount: e.mouthSalaryAmount || 0,
|
||||||
|
positionSalaryAmount: e.positionSalaryAmount || 0,
|
||||||
|
amountSpecial: e.amountSpecial || 0,
|
||||||
|
organization: e.orgRoot,
|
||||||
|
orgChild1: e.orgChild1,
|
||||||
|
orgChild2: e.orgChild2,
|
||||||
|
orgChild3: e.orgChild3,
|
||||||
|
orgChild4: e.orgChild4,
|
||||||
|
posNoAbb: e.posNoAbb,
|
||||||
|
posNo: e.posNo,
|
||||||
|
posNumCodeSit: e.posNumCodeSit,
|
||||||
|
posNumCodeSitAbb: e.posNumCodeSitAbb,
|
||||||
|
commandNo: e.commandNo,
|
||||||
|
commandYear: e.commandYear ? Number(e.commandYear) + 543 : "",
|
||||||
|
commandDateSign: e.commandDateSign
|
||||||
|
? formatDateToDDMMYYYY(e.commandDateSign)
|
||||||
|
: "",
|
||||||
|
commandCodeName: store.convertCommandCodeName(e.commandCode),
|
||||||
|
remark: e.remark,
|
||||||
|
commandId: e.commandId || "",
|
||||||
|
commandCode: e.commandCode || "", // ใส่ค่าเริ่มต้นไว้
|
||||||
|
}));
|
||||||
|
|
||||||
|
worksheet.addRows(newData);
|
||||||
|
|
||||||
|
// 4. ตกแต่งสี, Dropdown และ สูตร VLOOKUP
|
||||||
|
newData.forEach((_, index) => {
|
||||||
|
const rowIndex = index + 2;
|
||||||
|
|
||||||
|
// --- ตั้งค่า Format สำหรับเซลล์วันที่ ---
|
||||||
|
// เซลล์ B (commandDateAffect) และ Z (commandDateSign)
|
||||||
|
const dateAffectCell = worksheet.getCell(`B${rowIndex}`);
|
||||||
|
const dateSignCell = worksheet.getCell(`Z${rowIndex}`);
|
||||||
|
|
||||||
|
[dateAffectCell, dateSignCell].forEach((cell) => {
|
||||||
|
cell.numFmt = "dd/mm/yyyy";
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- ทำ Dropdown คอลัมน์ AA ---
|
||||||
|
// อ้างอิงรายการจาก MasterData Sheet จะทำให้ Excel ทำงานได้เสถียรกว่า (กรณีรายการเยอะ)
|
||||||
|
worksheet.getCell(`AA${rowIndex}`).dataValidation = {
|
||||||
|
type: "list",
|
||||||
|
allowBlank: true,
|
||||||
|
formulae: [`MasterData!$A$1:$A$${masterData.length}`],
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- ผูกสูตรให้ commandCode (AD) เปลี่ยนตามการเลือกใน AA ---
|
||||||
|
// AA คือประเภทคำสั่ง, AD คือ commandCode
|
||||||
|
worksheet.getCell(`AD${rowIndex}`).value = {
|
||||||
|
formula: `=IFERROR(VLOOKUP(AA${rowIndex}, MasterData!$A$1:$B$${masterData.length}, 2, FALSE), "")`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// 5. สไตล์ Header
|
||||||
|
worksheet.getRow(1).font = { bold: true };
|
||||||
|
worksheet.getRow(1).alignment = { vertical: "middle", horizontal: "center" };
|
||||||
|
|
||||||
|
// 6. เขียนไฟล์
|
||||||
|
const buffer = await workbook.xlsx.writeBuffer();
|
||||||
|
const blob = new Blob([buffer], {
|
||||||
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
});
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = "รายการประวัติตำแหน่งเงินเดือน.xlsx";
|
||||||
|
a.click();
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,7 @@ import config from "@/app.config";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEditPosDataStore } from "@/modules/04_registryPerson/stores/Edit";
|
import { useEditPosDataStore } from "@/modules/04_registryPerson/stores/Edit";
|
||||||
|
import { exportToExcelPosition } from "@/modules/04_registryPerson/utils/exportPosition";
|
||||||
|
|
||||||
import type { QTableColumn } from "quasar";
|
import type { QTableColumn } from "quasar";
|
||||||
import type { FormDataSalary } from "@/modules/04_registryPerson/interface/index/Edit";
|
import type { FormDataSalary } from "@/modules/04_registryPerson/interface/index/Edit";
|
||||||
|
|
@ -430,66 +431,67 @@ function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
||||||
|
|
||||||
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
||||||
function exportToExcel() {
|
function exportToExcel() {
|
||||||
const newData = rows.value.map((e: DataPosition) => {
|
exportToExcelPosition(rows.value);
|
||||||
return {
|
// const newData = rows.value.map((e: DataPosition) => {
|
||||||
commandDateAffect: date2Thai(e.commandDateAffect),
|
// return {
|
||||||
positionName: e.positionName,
|
// commandDateAffect: date2Thai(e.commandDateAffect),
|
||||||
positionType: e.positionType,
|
// positionName: e.positionName,
|
||||||
positionLevel: e.positionLevel
|
// positionType: e.positionType,
|
||||||
? e.positionLevel
|
// positionLevel: e.positionLevel
|
||||||
: e.positionCee
|
// ? e.positionLevel
|
||||||
? e.positionCee
|
// : e.positionCee
|
||||||
: "",
|
// ? e.positionCee
|
||||||
positionExecutive: e.positionExecutive,
|
// : "",
|
||||||
amount: e.amount,
|
// positionExecutive: e.positionExecutive,
|
||||||
mouthSalaryAmount: e.mouthSalaryAmount,
|
// amount: e.amount,
|
||||||
positionSalaryAmount: e.positionSalaryAmount,
|
// mouthSalaryAmount: e.mouthSalaryAmount,
|
||||||
organization: findOrgName({
|
// positionSalaryAmount: e.positionSalaryAmount,
|
||||||
root: e.orgRoot,
|
// organization: findOrgName({
|
||||||
child1: e.orgChild1,
|
// root: e.orgRoot,
|
||||||
child2: e.orgChild2,
|
// child1: e.orgChild1,
|
||||||
child3: e.orgChild3,
|
// child2: e.orgChild2,
|
||||||
child4: e.orgChild4,
|
// child3: e.orgChild3,
|
||||||
}),
|
// child4: e.orgChild4,
|
||||||
posNo:
|
// }),
|
||||||
e.posNoAbb && e.posNo
|
// posNo:
|
||||||
? `${e.posNoAbb} ${e.posNo}`
|
// e.posNoAbb && e.posNo
|
||||||
: e.posNo
|
// ? `${e.posNoAbb} ${e.posNo}`
|
||||||
? e.posNo
|
// : e.posNo
|
||||||
: "",
|
// ? e.posNo
|
||||||
posNumCodeSit:
|
// : "",
|
||||||
e.posNumCodeSitAbb && e.posNumCodeSit
|
// posNumCodeSit:
|
||||||
? `${e.posNumCodeSit} (${e.posNumCodeSitAbb})`
|
// e.posNumCodeSitAbb && e.posNumCodeSit
|
||||||
: e.posNumCodeSit
|
// ? `${e.posNumCodeSit} (${e.posNumCodeSitAbb})`
|
||||||
? e.posNumCodeSit
|
// : e.posNumCodeSit
|
||||||
: "",
|
// ? e.posNumCodeSit
|
||||||
commandNo:
|
// : "",
|
||||||
e.commandNo && e.commandYear
|
// commandNo:
|
||||||
? `${e.commandNo}/${Number(e.commandYear) + 543}`
|
// e.commandNo && e.commandYear
|
||||||
: "",
|
// ? `${e.commandNo}/${Number(e.commandYear) + 543}`
|
||||||
commandDateSign: date2Thai(e.commandDateSign),
|
// : "",
|
||||||
commandCode: store.convertCommandCodeName(e.commandCode),
|
// commandDateSign: date2Thai(e.commandDateSign),
|
||||||
remark: e.remark,
|
// commandCode: store.convertCommandCodeName(e.commandCode),
|
||||||
};
|
// remark: e.remark,
|
||||||
});
|
// };
|
||||||
|
// });
|
||||||
|
|
||||||
const headers = columns.value.map((item: any) => item.label) || []; // หัวคอลัมน์ภาษาไทย
|
// const headers = columns.value.map((item: any) => item.label) || []; // หัวคอลัมน์ภาษาไทย
|
||||||
const worksheet = XLSX.utils.json_to_sheet(newData, {
|
// const worksheet = XLSX.utils.json_to_sheet(newData, {
|
||||||
header: visibleColumns.value,
|
// header: visibleColumns.value,
|
||||||
});
|
// });
|
||||||
|
|
||||||
//แทรกหัวคอลัมน์ภาษาไทย (ใช้ A1, B1, C1 แทน)
|
// //แทรกหัวคอลัมน์ภาษาไทย (ใช้ A1, B1, C1 แทน)
|
||||||
XLSX.utils.sheet_add_aoa(worksheet, [headers], { origin: "A1" });
|
// XLSX.utils.sheet_add_aoa(worksheet, [headers], { origin: "A1" });
|
||||||
|
|
||||||
// Create a new workbook and append the worksheet
|
// // Create a new workbook and append the worksheet
|
||||||
const workbook = XLSX.utils.book_new();
|
// const workbook = XLSX.utils.book_new();
|
||||||
|
|
||||||
XLSX.utils.book_append_sheet(
|
// XLSX.utils.book_append_sheet(
|
||||||
workbook,
|
// workbook,
|
||||||
worksheet,
|
// worksheet,
|
||||||
`รายการประวัติตำแหน่งเงินเดือน`
|
// `รายการประวัติตำแหน่งเงินเดือน`
|
||||||
);
|
// );
|
||||||
XLSX.writeFile(workbook, "รายการประวัติตำแหน่งเงินเดือน.xlsx");
|
// XLSX.writeFile(workbook, "รายการประวัติตำแหน่งเงินเดือน.xlsx");
|
||||||
}
|
}
|
||||||
|
|
||||||
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
||||||
|
|
@ -847,6 +849,58 @@ async function validateAndSave(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชันอัปโหลดไฟล์ Excel
|
||||||
|
* ส่งไฟล์ Excel ไปยัง API โดยตรง
|
||||||
|
*/
|
||||||
|
function handUploadFile() {
|
||||||
|
const input = document.createElement("input");
|
||||||
|
input.type = "file";
|
||||||
|
input.accept = ".xlsx,.xls";
|
||||||
|
|
||||||
|
input.onchange = async (e: Event) => {
|
||||||
|
try {
|
||||||
|
const file = (e.target as HTMLInputElement).files?.[0];
|
||||||
|
if (!file) return;
|
||||||
|
|
||||||
|
// ตรวจสอบชนิดไฟล์โดยตรวจสอบนามสกุล
|
||||||
|
const validExtensions = [".xlsx", ".xls"];
|
||||||
|
const fileExtension = file.name
|
||||||
|
.substring(file.name.lastIndexOf("."))
|
||||||
|
.toLowerCase();
|
||||||
|
|
||||||
|
if (!validExtensions.includes(fileExtension)) {
|
||||||
|
messageError("กรุณาเลือกไฟล์ Excel เท่านั้น (.xlsx, .xls)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
showLoader();
|
||||||
|
const type = empType.value === "officer" ? "office" : "employee";
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("file", file);
|
||||||
|
|
||||||
|
await http.post(
|
||||||
|
config.API.uploadProfile(type, profileId.value),
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
await fetchData();
|
||||||
|
} catch (error) {
|
||||||
|
messageError($q, error);
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
input.click();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await Promise.all([fetchData(), fetchType()]);
|
await Promise.all([fetchData(), fetchType()]);
|
||||||
});
|
});
|
||||||
|
|
@ -886,6 +940,15 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div>
|
<div>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="blue"
|
||||||
|
icon="upload"
|
||||||
|
@click="handUploadFile()"
|
||||||
|
>
|
||||||
|
<q-tooltip>อัปโหลดไฟล์แก้ไข</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -893,7 +956,9 @@ onMounted(async () => {
|
||||||
icon="download"
|
icon="download"
|
||||||
:disable="rows.length == 0"
|
:disable="rows.length == 0"
|
||||||
@click="exportToExcel()"
|
@click="exportToExcel()"
|
||||||
/>
|
>
|
||||||
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
|
||||||
|
|
@ -453,7 +453,7 @@ watch(modal, async (val) => {
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div v-show="leaveTypeCode === 'LV-005'" class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
:class="classInput(leaveTypeCode == 'LV-005')"
|
:class="classInput(leaveTypeCode == 'LV-005')"
|
||||||
:readonly="leaveTypeCode !== 'LV-005'"
|
:readonly="leaveTypeCode !== 'LV-005'"
|
||||||
|
|
@ -461,8 +461,8 @@ watch(modal, async (val) => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="จำนวนสิทธิ์การลา"
|
label="จำนวนสิทธิ์การลา"
|
||||||
hide-bottom-space
|
:rules="[(val: string) => !val || /^\d+$/.test(val) || 'กรุณากรอกเฉพาะตัวเลขที่เป็นจำนวนเต็ม']"
|
||||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
hint="* สำหรับลาพักผ่อนเท่านั้น คือสิทธิ์ลาประจำปี + สิทธิ์สะสม"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -471,10 +471,11 @@ watch(modal, async (val) => {
|
||||||
v-model="formData.leaveDaysUsed"
|
v-model="formData.leaveDaysUsed"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ที่ใช้ไป (วัน)"
|
label="ที่ใช้ไปทั้งหมด (วัน)"
|
||||||
hide-bottom-space
|
|
||||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
||||||
|
hint="* จำนวนวันรวม การลาที่บันทึกในระบบและการลาย้อนหลังในปีงบประมาณนี้"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -482,10 +483,9 @@ watch(modal, async (val) => {
|
||||||
v-model="formData.leaveCount"
|
v-model="formData.leaveCount"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ที่ใช้ไป (ครั้ง)"
|
label="ที่ใช้ไปทั้งหมด (ครั้ง)"
|
||||||
hide-bottom-space
|
:rules="[(val: string) => !val || /^\d+$/.test(val) || 'กรุณากรอกเฉพาะตัวเลขที่เป็นจำนวนเต็ม']"
|
||||||
mask="#"
|
hint="* จำนวนครั้งรวม การลาที่บันทึกในระบบและการลาย้อนหลังในปีงบประมาณนี้"
|
||||||
reverse-fill-mask
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -495,9 +495,9 @@ watch(modal, async (val) => {
|
||||||
v-model="formData.beginningLeaveDays"
|
v-model="formData.beginningLeaveDays"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ยกมา (วัน)"
|
label="จำนวนวันลาก่อนใช้งานระบบ"
|
||||||
hide-bottom-space
|
|
||||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
||||||
|
hint="* จำนวนวันรวมการลาในปีงบประมาณนี้ที่เกิดขึ้นก่อนเริ่มใช้ระบบ"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -507,10 +507,9 @@ watch(modal, async (val) => {
|
||||||
v-model="formData.beginningLeaveCount"
|
v-model="formData.beginningLeaveCount"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ยกมา (ครั้ง)"
|
label="จำนวนครั้งที่ลาก่อนใช้งานระบบ"
|
||||||
hide-bottom-space
|
:rules="[(val: string) => !val || /^\d+$/.test(val) || 'กรุณากรอกเฉพาะตัวเลขที่เป็นจำนวนเต็ม']"
|
||||||
mask="#"
|
hint="* จำนวนครั้งของการลาในปีงบประมาณนี้ที่เกิดขึ้นก่อนเริ่มใช้ระบบ"
|
||||||
reverse-fill-mask
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ const columns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "leaveDaysUsed",
|
name: "leaveDaysUsed",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ที่ใช้ไป (วัน)",
|
label: "ที่ใช้ไปทั้งหมด (วัน)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "leaveDaysUsed",
|
field: "leaveDaysUsed",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -92,7 +92,7 @@ const columns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "leaveCount",
|
name: "leaveCount",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ที่ใช้ไป (ครั้ง)",
|
label: "ที่ใช้ไปทั้งหมด (ครั้ง)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "leaveCount",
|
field: "leaveCount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -101,7 +101,7 @@ const columns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "beginningLeaveDays",
|
name: "beginningLeaveDays",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ยกมา (วัน)",
|
label: "จำนวนวันลาก่อนใช้งานระบบ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "beginningLeaveDays",
|
field: "beginningLeaveDays",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -110,7 +110,7 @@ const columns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "beginningLeaveCount",
|
name: "beginningLeaveCount",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ยกมา (ครั้ง)",
|
label: "จำนวนครั้งที่ลาก่อนใช้งานระบบ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "beginningLeaveCount",
|
field: "beginningLeaveCount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue