From 95713b5df155e04f1c9c4ac54df46f5ae35e6731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Thu, 14 Nov 2024 11:39:39 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=8A=B5=E6=B8=85=E7=A9=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/user_manage/components/addActive.vue | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/views/user_manage/components/addActive.vue b/src/views/user_manage/components/addActive.vue
index 5054eed..0d3a14f 100644
--- a/src/views/user_manage/components/addActive.vue
+++ b/src/views/user_manage/components/addActive.vue
@@ -11,7 +11,8 @@
元
(form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))">
+ v-model="form.giftAmount"
+ @input="(v) => (form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))">
赠
元
@@ -39,7 +40,8 @@
-->
-
+
@@ -177,6 +179,10 @@ export default {
return false;
}
this.form.couponId = this.productIds[0].id
+ } else {
+ this.form.couponId = ''
+ this.form.couponName = ''
+ this.productIds = []
}
// let arr = []
// this.productIds.forEach(ele => {
@@ -207,14 +213,15 @@ export default {
})
},
async show(obj) {
+ this.productIds = []
this.dialogVisible = true
if (obj && obj.id) {
this.form = { ...obj }
+ // 留着以后说不定多个优惠劵
// let res = await activate(obj.id)
// this.productIds = res
- if (obj.couponName) {
+ if (obj.couponId) {
this.productIds = [{ title: obj.couponName }]
-
}
console.log(obj, '调试1')
}