From 095a2bb268a575bd5091d191a29f2adc1fa8e252 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:07:38 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20type=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/01_branch-management/MainPage.vue | 5 +++-- src/stores/branch/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/01_branch-management/MainPage.vue b/src/pages/01_branch-management/MainPage.vue index 83d7e082..448842fe 100644 --- a/src/pages/01_branch-management/MainPage.vue +++ b/src/pages/01_branch-management/MainPage.vue @@ -153,6 +153,7 @@ const defaultFormData = { }; const formDialogRef = ref(); + const formType = ref<'create' | 'edit' | 'delete' | 'view'>('create'); const formTypeBranch = ref<'headOffice' | 'subBranch'>('headOffice'); const codeHq = ref<{ id: string; code: string }>({ id: '', code: '' }); @@ -168,8 +169,6 @@ async function fetchBranchById(id: string) { const res = await branchStore.fetchById(id); if (res) { - console.log(res); - qrCodeimageUrl.value = res.qrCodeImageUrl; imageUrl.value = res.imageUrl; formData.value = { @@ -190,6 +189,7 @@ async function fetchBranchById(id: string) { districtId: res.districtId, provinceId: res.provinceId, lineId: res.lineId, + status: res.status, }; } } @@ -766,6 +766,7 @@ watch(locale, () => { v-model:taxNo="formData.taxNo" v-model:name="formData.name" v-model:nameEN="formData.nameEN" + v-model:type-branch="formTypeBranch" :separator="true" :dense="true" :outlined="true" diff --git a/src/stores/branch/index.ts b/src/stores/branch/index.ts index 5365f757..4e5b5147 100644 --- a/src/stores/branch/index.ts +++ b/src/stores/branch/index.ts @@ -164,7 +164,7 @@ const useBranchStore = defineStore('api-branch', () => { async function editById( id: string, - data: Partial, + data: Partial, qrCodeImage?: File | undefined, imageHq?: File | undefined, flow?: {