From 9c9c405bd85f3d59f8554ff3b9438fa1dae1ecff Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 3 Apr 2025 20:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E8=90=A5=E5=95=86?= =?UTF-8?q?=E5=AE=B6=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mch/mch-manage/form.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/mch/mch-manage/form.vue b/src/views/mch/mch-manage/form.vue index 13b50cb..769ead5 100644 --- a/src/views/mch/mch-manage/form.vue +++ b/src/views/mch/mch-manage/form.vue @@ -158,7 +158,7 @@ const form = reactive({ businessTime: "", addressDes: "", sort: 0, - supType: "10", + supType: "", cooperationStatus: "1", parentId: "", discountsPrice: "", @@ -222,7 +222,7 @@ watch( () => form.types, (newVal) => { if (newVal != "2") { - form.supType = "10" + form.supType = "" form.cooperationStatus = "1" form.parentId = "" form.discountsPrice = "" @@ -241,6 +241,11 @@ const onSubmit = async () => { cooperationStatus: form.types == "2" && form.supType == "10" ? null : form.cooperationStatus, parentId: form.types == "2" && form.supType == "10" ? -1 : form.parentId, } + + if (_pa.parentId == "") { + _pa.parentId = -1 + } + try { loading.value = true form.id ? await putObj(_pa) : await addObj(_pa)