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;
|
||||
year: number|null;
|
||||
status: string|null;
|
||||
revisionId: string|null;
|
||||
}
|
||||
|
||||
interface Row {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
|
|||
isClose: i.isClose !== null ? i.isClose : null,
|
||||
effectiveDate: i.effectiveDate !== null ? i.effectiveDate : null,
|
||||
status: i.status !== null ? i.status : null,
|
||||
revisionId: i.revisionId,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const {
|
|||
date2Thai,
|
||||
dateToISO,
|
||||
dialogConfirm,
|
||||
success
|
||||
success,
|
||||
} = mixin;
|
||||
const dataStore = useSalaryDataStore();
|
||||
const year = ref<number>(0);
|
||||
|
|
@ -52,6 +52,7 @@ const visibleColumns = ref<string[]>([
|
|||
"year",
|
||||
"effectiveDate",
|
||||
"isActive",
|
||||
"isClose",
|
||||
]);
|
||||
|
||||
// หัวตาราง
|
||||
|
|
@ -101,6 +102,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "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() {
|
||||
|
|
@ -152,7 +162,7 @@ function deleteData(id: string) {
|
|||
.delete(config.API.salaryPeriod() + `/${id}`)
|
||||
.then((res) => {
|
||||
getData();
|
||||
success($q,'ลบข้อมูลสำเร็จ')
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -378,6 +388,9 @@ onMounted(async () => {
|
|||
class="text-h5"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isClose'">
|
||||
{{ props.row.isClose == false ? "" : "ปิดรอบแล้ว" }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -397,8 +410,7 @@ onMounted(async () => {
|
|||
clickable
|
||||
v-close-popup
|
||||
@click.stop="
|
||||
dateToISO(new Date()) >=
|
||||
dateToISO(props.row.effectiveDate)
|
||||
props.row.revisionId !== null
|
||||
? editPopup(props.row, 'read')
|
||||
: editPopup(props.row, 'edit')
|
||||
"
|
||||
|
|
@ -417,8 +429,7 @@ onMounted(async () => {
|
|||
/>
|
||||
<div class="q-pl-md">
|
||||
{{
|
||||
dateToISO(new Date()) >=
|
||||
dateToISO(props.row.effectiveDate)
|
||||
props.row.revisionId !== null
|
||||
? "ดูข้อมูล"
|
||||
: "แก้ไขข้อมูล"
|
||||
}}
|
||||
|
|
@ -428,34 +439,32 @@ onMounted(async () => {
|
|||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
props.row.isClose == false
|
||||
? dateToISO(new Date()) >=
|
||||
dateToISO(props.row.effectiveDate)
|
||||
? true
|
||||
: false
|
||||
: false
|
||||
"
|
||||
v-if="props.row.revisionId !== null"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="dialogClose(props.row.id)"
|
||||
>
|
||||
<q-item-section>
|
||||
<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>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
|
||||
? false
|
||||
: true
|
||||
"
|
||||
v-if="props.row.revisionId == null"
|
||||
clickable
|
||||
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>
|
||||
<div class="row items-center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue