isClose
This commit is contained in:
parent
24e0fc57fa
commit
1d4a73fc17
4 changed files with 28 additions and 27 deletions
|
|
@ -179,14 +179,15 @@ function dialogClose(id: string) {
|
|||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
// http
|
||||
// .put(config.API)
|
||||
// .then((res) => {})
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// });
|
||||
http
|
||||
.get(config.API.salaryPeriod() + `/close/${id}`)
|
||||
.then((res) => {
|
||||
getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
},
|
||||
"ยืนยันการปิดรอบ",
|
||||
"หากปิดรอบแล้วจะไม่สามารถแก้ไขรายการเงินเดือนของรอบนี้ได้ ต้องการยืนยันการปิดรอบนี้ใช่หรือไม่?"
|
||||
|
|
@ -408,32 +409,31 @@ onMounted(async () => {
|
|||
}}</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="props.row.isClose == false ? dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) ? true : false:false"
|
||||
color="red"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
size="12px"
|
||||
:icon="
|
||||
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
|
||||
? 'mdi-close-box'
|
||||
: 'mdi-delete'
|
||||
"
|
||||
icon="mdi-close-box"
|
||||
clickable
|
||||
@click.stop="
|
||||
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
|
||||
? dialogClose(props.row.id)
|
||||
: dialogRemove(
|
||||
$q,
|
||||
async () => await deleteData(props.row.id)
|
||||
)
|
||||
"
|
||||
@click.stop="dialogClose(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ปิดรอบ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
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
|
||||
>
|
||||
<q-tooltip>{{
|
||||
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
|
||||
? "ปิดรอบ"
|
||||
: "ลบข้อมูล"
|
||||
}}</q-tooltip>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue