This commit is contained in:
setthawutttty 2024-03-07 16:18:28 +07:00
parent 24e0fc57fa
commit 1d4a73fc17
4 changed files with 28 additions and 27 deletions

View file

@ -266,7 +266,6 @@ function checkEndDate() {
outlined outlined
v-model="formData.name" v-model="formData.name"
label="ชื่อผังบัญชีอัตราเงินเดือน" label="ชื่อผังบัญชีอัตราเงินเดือน"
la
:rules="[ :rules="[
(val) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราเงินเดือน', (val) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราเงินเดือน',
]" ]"

View file

@ -44,6 +44,7 @@ interface RowList {
id: string; id: string;
period: string|null; period: string|null;
isActive: boolean|null; isActive: boolean|null;
isClose: boolean|null;
effectiveDate: Date|null|string; effectiveDate: Date|null|string;
year: number|null; year: number|null;
status: string|null; status: string|null;

View file

@ -19,6 +19,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
period: i.period !== null ? i.period : null, period: i.period !== null ? i.period : null,
year: i.year !== null ? i.year : null, year: i.year !== null ? i.year : null,
isActive: i.isActive !== null ? i.isActive : null, isActive: i.isActive !== null ? i.isActive : 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,
})); }));

View file

@ -179,14 +179,15 @@ function dialogClose(id: string) {
dialogConfirm( dialogConfirm(
$q, $q,
() => { () => {
// http http
// .put(config.API) .get(config.API.salaryPeriod() + `/close/${id}`)
// .then((res) => {}) .then((res) => {
// .catch((e) => { getData();
// messageError($q, e); })
// }) .catch((e) => {
// .finally(() => { messageError($q, e);
// }); })
.finally(() => {});
}, },
"ยืนยันการปิดรอบ", "ยืนยันการปิดรอบ",
"หากปิดรอบแล้วจะไม่สามารถแก้ไขรายการเงินเดือนของรอบนี้ได้ ต้องการยืนยันการปิดรอบนี้ใช่หรือไม่?" "หากปิดรอบแล้วจะไม่สามารถแก้ไขรายการเงินเดือนของรอบนี้ได้ ต้องการยืนยันการปิดรอบนี้ใช่หรือไม่?"
@ -408,32 +409,31 @@ onMounted(async () => {
}}</q-tooltip> }}</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
v-if="props.row.isClose == false ? dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) ? true : false:false"
color="red" color="red"
flat flat
dense dense
round round
size="12px" size="12px"
:icon=" icon="mdi-close-box"
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
? 'mdi-close-box'
: 'mdi-delete'
"
clickable clickable
@click.stop=" @click.stop="dialogClose(props.row.id)"
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) >
? dialogClose(props.row.id) <q-tooltip>ดรอบ</q-tooltip>
: dialogRemove( </q-btn>
$q, <q-btn
async () => await deleteData(props.row.id) v-if="dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) ? false : true"
) color="red"
" flat
dense
round
size="12px"
icon="mdi-delete"
clickable
@click.stop="dialogRemove( $q, async () => await deleteData(props.row.id))"
v-close-popup v-close-popup
> >
<q-tooltip>{{ <q-tooltip>ลบขอม</q-tooltip>
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
? "ปิดรอบ"
: "ลบข้อมูล"
}}</q-tooltip>
</q-btn> </q-btn>
</q-td> </q-td>
</q-tr> </q-tr>