Compare commits
No commits in common. "18868747697036e73da5bc15b687ea1f3c1fde9c" and "6483f30d07094de2b6d0cc6bd122ffcf8a8b517e" have entirely different histories.
1886874769
...
6483f30d07
2 changed files with 61 additions and 40 deletions
|
|
@ -194,7 +194,6 @@ export default {
|
||||||
`${orgProfile}${type}/profileid/position`,
|
`${orgProfile}${type}/profileid/position`,
|
||||||
uploadProfile: (type: string, id: string) =>
|
uploadProfile: (type: string, id: string) =>
|
||||||
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
||||||
sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`,
|
|
||||||
|
|
||||||
workflowCommanderOperate: `${workflow}/commander/operate`,
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,66 @@ function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
||||||
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
/** ฟังก์ชันดาวน์โหลดไฟล Excel */
|
||||||
function exportToExcel() {
|
function exportToExcel() {
|
||||||
exportToExcelPosition(rows.value);
|
exportToExcelPosition(rows.value);
|
||||||
|
// const newData = rows.value.map((e: DataPosition) => {
|
||||||
|
// return {
|
||||||
|
// commandDateAffect: date2Thai(e.commandDateAffect),
|
||||||
|
// positionName: e.positionName,
|
||||||
|
// positionType: e.positionType,
|
||||||
|
// positionLevel: e.positionLevel
|
||||||
|
// ? e.positionLevel
|
||||||
|
// : e.positionCee
|
||||||
|
// ? e.positionCee
|
||||||
|
// : "",
|
||||||
|
// positionExecutive: e.positionExecutive,
|
||||||
|
// amount: e.amount,
|
||||||
|
// mouthSalaryAmount: e.mouthSalaryAmount,
|
||||||
|
// positionSalaryAmount: e.positionSalaryAmount,
|
||||||
|
// organization: findOrgName({
|
||||||
|
// root: e.orgRoot,
|
||||||
|
// child1: e.orgChild1,
|
||||||
|
// child2: e.orgChild2,
|
||||||
|
// child3: e.orgChild3,
|
||||||
|
// child4: e.orgChild4,
|
||||||
|
// }),
|
||||||
|
// posNo:
|
||||||
|
// e.posNoAbb && e.posNo
|
||||||
|
// ? `${e.posNoAbb} ${e.posNo}`
|
||||||
|
// : e.posNo
|
||||||
|
// ? e.posNo
|
||||||
|
// : "",
|
||||||
|
// posNumCodeSit:
|
||||||
|
// e.posNumCodeSitAbb && e.posNumCodeSit
|
||||||
|
// ? `${e.posNumCodeSit} (${e.posNumCodeSitAbb})`
|
||||||
|
// : e.posNumCodeSit
|
||||||
|
// ? e.posNumCodeSit
|
||||||
|
// : "",
|
||||||
|
// commandNo:
|
||||||
|
// e.commandNo && e.commandYear
|
||||||
|
// ? `${e.commandNo}/${Number(e.commandYear) + 543}`
|
||||||
|
// : "",
|
||||||
|
// commandDateSign: date2Thai(e.commandDateSign),
|
||||||
|
// commandCode: store.convertCommandCodeName(e.commandCode),
|
||||||
|
// remark: e.remark,
|
||||||
|
// };
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const headers = columns.value.map((item: any) => item.label) || []; // หัวคอลัมน์ภาษาไทย
|
||||||
|
// const worksheet = XLSX.utils.json_to_sheet(newData, {
|
||||||
|
// header: visibleColumns.value,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// //แทรกหัวคอลัมน์ภาษาไทย (ใช้ A1, B1, C1 แทน)
|
||||||
|
// XLSX.utils.sheet_add_aoa(worksheet, [headers], { origin: "A1" });
|
||||||
|
|
||||||
|
// // Create a new workbook and append the worksheet
|
||||||
|
// const workbook = XLSX.utils.book_new();
|
||||||
|
|
||||||
|
// XLSX.utils.book_append_sheet(
|
||||||
|
// workbook,
|
||||||
|
// worksheet,
|
||||||
|
// `รายการประวัติตำแหน่งเงินเดือน`
|
||||||
|
// );
|
||||||
|
// XLSX.writeFile(workbook, "รายการประวัติตำแหน่งเงินเดือน.xlsx");
|
||||||
}
|
}
|
||||||
|
|
||||||
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
||||||
|
|
@ -871,29 +931,6 @@ function onCancelUpload() {
|
||||||
excelPreviewModal.value = false;
|
excelPreviewModal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันจัดเรียงข้อมูลตามวันที่*/
|
|
||||||
function handleSortByDate() {
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
async () => {
|
|
||||||
try {
|
|
||||||
showLoader();
|
|
||||||
await http.put(config.API.sortOrderByDate, {
|
|
||||||
type: empType.value.toLocaleUpperCase(),
|
|
||||||
profileId: profileId.value,
|
|
||||||
});
|
|
||||||
await fetchData();
|
|
||||||
} catch (error) {
|
|
||||||
messageError($q, error);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ยืนยันการเรียงลำดับข้อมูล",
|
|
||||||
"ต้องการยืนยันการเรียงลำดับข้อมูลนี้ใช่หรือไม่?"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await Promise.all([fetchData(), fetchType()]);
|
await Promise.all([fetchData(), fetchType()]);
|
||||||
});
|
});
|
||||||
|
|
@ -929,23 +966,8 @@ onMounted(async () => {
|
||||||
icon="mdi-sort"
|
icon="mdi-sort"
|
||||||
@click="modalSort = true"
|
@click="modalSort = true"
|
||||||
>
|
>
|
||||||
<q-tooltip>จัดลำดับข้อมูล</q-tooltip>
|
<q-tooltip>จัดลำดับข้อมูล</q-tooltip></q-btn
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
tabs === 'PENDING' && statusCheckEdit == 'PENDING' && isConfirmEdit
|
|
||||||
"
|
|
||||||
class="q-ml-sm"
|
|
||||||
round
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
color="indigo-5"
|
|
||||||
icon="mdi-sort-alphabetical-descending"
|
|
||||||
@click="handleSortByDate()"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>เรียงลำดับข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue