diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 6e9a7d87..df0d1422 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -101,7 +101,7 @@ const profileUrl = ref(''); const groupName = ref('งาน MOU'); const dialogProductServiceType = ref(false); -const dialogTotalProduct = ref(true); +const dialogTotalProduct = ref(false); const productMode = ref<'group' | 'type' | 'service' | 'product'>('group'); const productGroup = ref(); @@ -418,6 +418,8 @@ async function assignFormDataProductService(id: string) { } function assignFormDataProduct(data: ProductList) { + console.log(data.detail); + formDataProduct.value = { productTypeId: data.productTypeId, remark: data.remark, @@ -425,7 +427,7 @@ function assignFormDataProduct(data: ProductList) { agentPrice: data.agentPrice, price: data.price, process: data.process, - detail: data.detail, + detail: data.detail === '' ? '-' : data.detail, name: data.name, code: data.code, image: undefined, @@ -588,6 +590,7 @@ watch(currentStatus, async () => { icon="mdi-folder-multiple-plus" @click=" () => { + clearFormProduct(); dialogProduct = true; } " @@ -1048,6 +1051,7 @@ watch(currentStatus, async () => { @viewDetail=" () => { currentIdProduct = i.id; + infoProductEdit = false; assignFormDataProduct(i); dialogProductEdit = true; }