ออกคำสั่ง => fix bug

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-12 10:32:24 +07:00
parent fb731a9610
commit 6e78a643e6
4 changed files with 49 additions and 9 deletions

View file

@ -148,6 +148,7 @@ async function fetchOrderlist() {
.get(config.API.listOrder())
.then((res) => {
const data = res.data.result;
const typeid = OrderTypeOption.value.map((e: DataOption1) => e.id);
const filterListOrder = data.filter((e: ResListOrder) =>
typeid.includes(e.orderTypeValue)
@ -238,9 +239,7 @@ async function OrderTypeFilter() {
/** ฟังชั่นฟิลเตอร์ตามค่า ประเภท สถานะ ปี */
async function searchFilterTable() {
if (OrderType.value) {
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
}
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
}
/** fucnction หาสถานะทั่งหมด*/
@ -373,7 +372,9 @@ onMounted(async () => {
<q-icon
name="cancel"
@click.stop.prevent="
(fiscalyearOP = fiscalyearFilter1), (fiscalyear = 0)
(fiscalyearOP = fiscalyearFilter1),
(fiscalyear = 0),
searchFilterTable()
"
class="cursor-pointer"
/>
@ -467,7 +468,9 @@ onMounted(async () => {
<q-icon
name="cancel"
@click.stop.prevent="
(OrderTypeOption = OrderTypeFilter1), (OrderType = '')
(OrderTypeOption = OrderTypeFilter1),
(OrderType = ''),
searchFilterTable()
"
class="cursor-pointer"
/>
@ -508,7 +511,8 @@ onMounted(async () => {
name="cancel"
@click.stop.prevent="
(OrderStatusOption = OrderStatusFilter1),
(OrderStatus = 'ทั้งหมด')
(OrderStatus = 'ทั้งหมด'),
searchFilterTable()
"
class="cursor-pointer"
/>