Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: แก้ รอบการขึ้นเงินเดือน
This commit is contained in:
commit
32136fd932
3 changed files with 32 additions and 21 deletions
|
|
@ -48,6 +48,7 @@ interface RowList {
|
||||||
effectiveDate: Date|null|string;
|
effectiveDate: Date|null|string;
|
||||||
year: number|null;
|
year: number|null;
|
||||||
status: string|null;
|
status: string|null;
|
||||||
|
revisionId: string|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Row {
|
interface Row {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
|
||||||
isClose: i.isClose !== null ? i.isClose : null,
|
isClose: i.isClose !== null ? i.isClose : null,
|
||||||
effectiveDate: i.effectiveDate !== null ? i.effectiveDate : null,
|
effectiveDate: i.effectiveDate !== null ? i.effectiveDate : null,
|
||||||
status: i.status !== null ? i.status : null,
|
status: i.status !== null ? i.status : null,
|
||||||
|
revisionId: i.revisionId,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dateToISO,
|
dateToISO,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
success
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const dataStore = useSalaryDataStore();
|
const dataStore = useSalaryDataStore();
|
||||||
const year = ref<number>(0);
|
const year = ref<number>(0);
|
||||||
|
|
@ -52,6 +52,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"year",
|
"year",
|
||||||
"effectiveDate",
|
"effectiveDate",
|
||||||
"isActive",
|
"isActive",
|
||||||
|
"isClose",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// หัวตาราง
|
// หัวตาราง
|
||||||
|
|
@ -101,6 +102,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "isClose",
|
||||||
|
align: "left",
|
||||||
|
label: "สถานะการปิดรอบ",
|
||||||
|
sortable: true,
|
||||||
|
field: "isClose",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function clickAdd() {
|
function clickAdd() {
|
||||||
|
|
@ -152,7 +162,7 @@ function deleteData(id: string) {
|
||||||
.delete(config.API.salaryPeriod() + `/${id}`)
|
.delete(config.API.salaryPeriod() + `/${id}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
getData();
|
getData();
|
||||||
success($q,'ลบข้อมูลสำเร็จ')
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -378,6 +388,9 @@ onMounted(async () => {
|
||||||
class="text-h5"
|
class="text-h5"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'isClose'">
|
||||||
|
{{ props.row.isClose == false ? "" : "ปิดรอบแล้ว" }}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -397,8 +410,7 @@ onMounted(async () => {
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click.stop="
|
@click.stop="
|
||||||
dateToISO(new Date()) >=
|
props.row.revisionId !== null
|
||||||
dateToISO(props.row.effectiveDate)
|
|
||||||
? editPopup(props.row, 'read')
|
? editPopup(props.row, 'read')
|
||||||
: editPopup(props.row, 'edit')
|
: editPopup(props.row, 'edit')
|
||||||
"
|
"
|
||||||
|
|
@ -417,8 +429,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<div class="q-pl-md">
|
<div class="q-pl-md">
|
||||||
{{
|
{{
|
||||||
dateToISO(new Date()) >=
|
props.row.revisionId !== null
|
||||||
dateToISO(props.row.effectiveDate)
|
|
||||||
? "ดูข้อมูล"
|
? "ดูข้อมูล"
|
||||||
: "แก้ไขข้อมูล"
|
: "แก้ไขข้อมูล"
|
||||||
}}
|
}}
|
||||||
|
|
@ -428,34 +439,32 @@ onMounted(async () => {
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="props.row.revisionId !== null"
|
||||||
props.row.isClose == false
|
|
||||||
? dateToISO(new Date()) >=
|
|
||||||
dateToISO(props.row.effectiveDate)
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
: false
|
|
||||||
"
|
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click.stop="dialogClose(props.row.id)"
|
@click.stop="dialogClose(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<q-icon color="red" size="17px" name="mdi-close-box" />
|
<q-icon
|
||||||
|
color="red"
|
||||||
|
size="17px"
|
||||||
|
name="mdi-close-box"
|
||||||
|
/>
|
||||||
<div class="q-pl-md">ปิดรอบ</div>
|
<div class="q-pl-md">ปิดรอบ</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="props.row.revisionId == null"
|
||||||
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
|
|
||||||
? false
|
|
||||||
: true
|
|
||||||
"
|
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click.stop=" dialogRemove($q, async () => await deleteData(props.row.id))"
|
@click.stop="
|
||||||
|
dialogRemove(
|
||||||
|
$q,
|
||||||
|
async () => await deleteData(props.row.id)
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue