From 74d644c46b6b652583be35268e3f768832ae3154 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 3 Dec 2024 10:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A5=97=E9=A4=90=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageProduct/add-Product/add-Product.vue | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue index 46c32ef..636d879 100644 --- a/pageProduct/add-Product/add-Product.vue +++ b/pageProduct/add-Product/add-Product.vue @@ -90,6 +90,7 @@ --> + @@ -1928,7 +1929,23 @@ }) watch(() => FormData.type, (newval) => { - initDefaultProGroupVo() + if (option.type == 'edit') { + if (newval == $goodsData.type) { + if($goodsData.proGroupVo){ + FormData.proGroupVo = $goodsData.proGroupVo||[] + }else{ + initDefaultProGroupVo() + } + } + if(FormData.groupType==null){ + FormData.groupType=0 + } + } else { + if (newval == 'package') { + initDefaultProGroupVo() + } + } + }) function initDefaultProGroupVo() { @@ -1941,6 +1958,17 @@ console.log(FormData.proGroupVo); } watch(() => FormData.groupType, (newval) => { + if (newval == 0) { + return initDefaultProGroupVo() + } + if (option.type == 'edit') { + if (newval == $goodsData.groupType) { + FormData.proGroupVo = $goodsData.proGroupVo + } else { + + } + return + } initDefaultProGroupVo() })