เพิ่ม เช็คสถานะของคำสั่ง
This commit is contained in:
parent
0c3e5a4a8c
commit
3dd67d1a7d
3 changed files with 441 additions and 103 deletions
|
|
@ -192,33 +192,33 @@ const redirectToPage = (id?: string, status?: string) => {
|
|||
router.push(`/order/detail/${id}?step=${step}`);
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
dialogRemove(
|
||||
$q,
|
||||
() => deleteData(id),
|
||||
);
|
||||
// const clickDelete = (id: string) => {
|
||||
// dialogRemove(
|
||||
// $q,
|
||||
// () => deleteData(id),
|
||||
// );
|
||||
|
||||
};
|
||||
// };
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.deleteOrder(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await OriginalDataFetch();
|
||||
fiscalYearFilter();
|
||||
searchFilterTable();
|
||||
OrderStatusFilter();
|
||||
OrderTypeFilter();
|
||||
});
|
||||
};
|
||||
// const deleteData = async (id: string) => {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .delete(config.API.deleteOrder(id))
|
||||
// .then((res) => {
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// await OriginalDataFetch();
|
||||
// fiscalYearFilter();
|
||||
// searchFilterTable();
|
||||
// OrderStatusFilter();
|
||||
// OrderTypeFilter();
|
||||
// });
|
||||
// };
|
||||
|
||||
const clickAdd = () => {
|
||||
router.push({ name: "OrderAdd" });
|
||||
|
|
@ -382,7 +382,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
<!-- <q-th auto-width /> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -409,12 +409,12 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-td key="OrderStatus" :props="props">
|
||||
{{ props.row.OrderStatus }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<!-- <q-td auto-width>
|
||||
<q-btn dense size="12px" flat round color="red" @click.stop="clickDelete(props.row.orderId)"
|
||||
icon="mdi-delete">
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
</q-td> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue