From 96107502ac35897e5c16842b96445067f1846d66 Mon Sep 17 00:00:00 2001 From: oat_dev Date: Wed, 10 Jul 2024 11:54:22 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20count=20=E0=B8=9A=E0=B8=A3=E0=B8=B4?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=84=E0=B8=A1=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=B1=E0=B8=9E=E0=B9=80=E0=B8=94=E0=B8=97=20+=20=E0=B8=A5?= =?UTF-8?q?=E0=B8=9A=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=9A=E0=B8=A3=E0=B8=B4=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=95=E0=B8=AD=E0=B8=99=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/04_product-service/MainPage.vue | 957 +++++++++++----------- 1 file changed, 478 insertions(+), 479 deletions(-) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 4ae31925..9c22ef78 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -932,7 +932,10 @@ async function submitService() { formDataProductService.value.registeredBranchId = null; } - await createService(formDataProductService.value); + const res = await createService(formDataProductService.value); + if (res) { + stat.value[2].count = stat.value[2].count + 1; + } totalService.value = totalService.value + 1; productAndServiceTab.value = 'service'; } @@ -949,6 +952,7 @@ async function submitService() { if (productAndServiceTab.value === 'service') { await fetchListOfService(); } + flowStore.rotate(); clearFormService(); } @@ -1445,7 +1449,6 @@ watch(inputSearchProductAndService, async () => { -
+ + + + - -
{ + - -
- {{ $t('service') }} -
-
- +
-
- {{ $t('product') }} -
- - + {{ $t('product') }} +
+
+
{ v-if=" { product: tbControl.product.fieldSelected, - + service: tbControl.service.fieldSelected, }[productAndServiceTab].includes( { product: 'productName', service: 'serviceName' }[ @@ -2466,7 +2467,6 @@ watch(inputSearchProductAndService, async () => { { { { + if (props.row.type === 'product') { + deleteTypeOfProduct(props.row.id); + } + if (props.row.type === 'service') { + deleteServiceById(props.row.id); + } } - } - " - + " > { :edit="!(formDataProductService.status === 'INACTIVE')" height="95vh" :isEdit="infoServiceEdit" - :title="$t('service', { msg: formDataProductService.name })" + :title="$t('service')" :tabs-list="serviceTab" v-model:modal="dialogServiceEdit" v-model:current-tab="currentServiceTab"