รวมไฟล์แก้งานงวด2

This commit is contained in:
Kittapath 2023-07-10 10:10:46 +07:00
parent 79889c9464
commit 2249097b07
89 changed files with 11287 additions and 7048 deletions

View file

@ -149,9 +149,9 @@
:rules="[
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี รับตำแหน่ง'}`,
`${'กรุณาเลือกวัน เดือน ปี'}`,
]"
:label="`${'วัน เดือน ปี รับตำแหน่ง'}`"
:label="`${'วัน เดือน ปี'}`"
hide-bottom-space
>
<template v-slot:prepend>
@ -257,9 +257,9 @@
:borderless="!edit"
v-model="positionTypeId"
:rules="[
(val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
(val:string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`,
]"
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
@ -373,9 +373,6 @@
:readonly="!edit"
:borderless="!edit"
v-model="positionSalaryAmount"
:rules="[
(val:string) => !!val || `${'กรุณากรอกเงินประจำตำแหน่ง'}`,
]"
:label="`${'เงินประจำตำแหน่ง'}`"
@update:modelValue="clickEditRow"
type="number"
@ -391,17 +388,36 @@
:readonly="!edit"
:borderless="!edit"
v-model="mouthSalaryAmount"
:rules="[
(val) =>
!!val || `${'กรุณากรอกเงินค่าตอบแทนรายเดือน'}`,
]"
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
@update:modelValue="clickEditRow"
type="number"
hide-bottom-space
/>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="refCommandNo"
hide-bottom-space
:label="`${'เลขที่คำสั่ง'}`"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
@update:modelValue="clickEditRow"
>
<template v-slot:append>
<q-icon
name="mdi-file"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
</div>
<!-- <div class="col-xs-12 col-sm-12 col-md-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
@ -432,7 +448,7 @@
/>
</template>
</q-input>
</div>
</div> -->
<div class="row col-xs-12 col-sm-12 col-md-12">
<selector
@ -443,7 +459,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="refSelected"
:label="`${'ต้นแบบเอกสารอ้างอิง'}`"
:label="`${'ต้นแบบ (template) เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRowRef"
option-label="name"
:options="refOptions"
@ -465,9 +481,6 @@
:readonly="!edit"
:borderless="!edit"
v-model="salaryRef"
:rules="[
(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`,
]"
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
type="textarea"
@ -587,6 +600,8 @@ const positionLevelId = ref<string>();
const positionExecutiveId = ref<string>();
const positionExecutiveSideId = ref<string>();
const posNoId = ref<string>();
const refCommandNo = ref<string>();
const refCommandDate = ref<Date>(new Date());
const ocOptions = ref<DataOption[]>([]);
const positionOptions = ref<DataOption[]>([]);
const positionLineOptions = ref<DataOption[]>([]);
@ -626,7 +641,11 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
name: "เลื่อนระดับ {ประเภทตำแหน่ง} จาก ตำแหน่งเลขที่ {ตำแหน่งเลขที่เดิม} ตำแหน่ง {ตำแหน่งเดิม} ระดับ {ระดับเดิม} {สำนักเดิม} เงินเดือน {เงินเดือนเดิม} เป็น ตำแหน่งเลขที่ {ตำแหน่งเลขที่ใหม่} ตำแหน่ง {ตำแหน่งใหม่} ระดับ {ระดับใหม่} {สำนักใหม่} เงินเดือน {เงินเดือนใหม่} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -758,7 +777,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -911,13 +930,14 @@ profileData.salary.columns.length == 0
"positionExecutiveSide",
"salaryClass",
"salaryRef",
"refCommandNo",
])
: (visibleColumns.value = profileData.salary.columns);
const columns = ref<QTableProps["columns"]>([
{
name: "date",
align: "left",
label: "วัน เดือน ปี รับตำแหน่ง",
label: "วัน เดือน ปี",
sortable: true,
field: "date",
headerStyle: "font-size: 14px",
@ -1016,7 +1036,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1079,12 +1099,23 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "refCommandNo",
align: "left",
label: "เลขที่คำสั่ง",
sortable: true,
field: "refCommandNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const columnsHistory = ref<QTableProps["columns"]>([
{
name: "date",
align: "left",
label: "วัน เดือน ปี รับตำแหน่ง",
label: "วัน เดือน ปี",
sortable: true,
field: "date",
headerStyle: "font-size: 14px",
@ -1183,7 +1214,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1246,6 +1277,17 @@ const columnsHistory = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "refCommandNo",
align: "left",
label: "เลขที่คำสั่ง",
sortable: true,
field: "refCommandNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "createdFullName",
align: "left",
@ -1285,6 +1327,7 @@ const visibleColumnsHistory = ref<String[]>([
"positionExecutiveSide",
"salaryClass",
"salaryRef",
"refCommandNo",
"createdFullName",
"createdAt",
]);
@ -1502,6 +1545,7 @@ const fetchData = async () => {
positionExecutiveSideId: e.positionExecutiveSideId,
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});
@ -1599,6 +1643,7 @@ const getData = async () => {
positionExecutiveSideId.value = row.positionExecutiveSideId;
salaryClass.value = row.salaryClass;
salaryRef.value = row.salaryRef;
refCommandNo.value = row.refCommandNo;
id.value = row.id;
await fetchPositionNumber(row.ocId);
};
@ -1679,7 +1724,7 @@ const templateDetail = async () => {
);
if (positionTypeF.length > 0) {
salaryClass.value =
salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `;
salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `;
}
const positionLevelF = positionLevelOptions.value.filter(
@ -1735,6 +1780,7 @@ const saveData = async () => {
positionExecutiveSideId: positionExecutiveSideId.value,
salaryClass: salaryClass.value,
salaryRef: salaryRef.value,
refCommandNo: refCommandNo.value,
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1770,6 +1816,7 @@ const editData = async () => {
positionExecutiveSideId: positionExecutiveSideId.value,
salaryClass: salaryClass.value,
salaryRef: salaryRef.value,
refCommandNo: refCommandNo.value,
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
@ -1863,6 +1910,7 @@ const selectData = async (props: DataProps) => {
positionExecutiveSideId.value = props.row.positionExecutiveSideId;
salaryClass.value = props.row.salaryClass;
salaryRef.value = props.row.salaryRef;
refCommandNo.value = props.row.refCommandNo;
id.value = props.row.id;
await checkRowPage();
};
@ -1892,6 +1940,7 @@ const addData = () => {
salaryClass.value = "";
refSelected.value = null;
salaryRef.value = "";
refCommandNo.value = "";
};
/**
@ -1970,6 +2019,7 @@ const clickHistory = async (row: RequestItemsObject) => {
positionExecutiveSideId: e.positionExecutiveSideId,
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});
@ -2005,6 +2055,7 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val,
};
};
const resetFilter = () => {};
</script>
<style lang="scss">
.modalfix {