From a98fde3130a0b5e480e4662827f25d16d79012d2 Mon Sep 17 00:00:00 2001
From: mayf <m13160102112@163.com>
Date: 星期六, 07 九月 2024 19:11:42 +0800
Subject: [PATCH] 修复营销管理数字范围问题 修复积分变动记录不刷新问题

---
 components/coupon/member-rule.vue                 |    1 +
 pages/marketing/point-mall/coupon/index.vue       |    3 +++
 pages/marketing/coupon/activity/index.vue         |    3 +++
 pages/marketing/coupon/user/index.vue             |    1 +
 pages/marketing/member-level.vue                  |   14 ++++++++++----
 pages/marketing/point-mall/point-distribution.vue |    7 ++++++-
 utils/coupon-form.js                              |    2 ++
 pages/marketing/point-mall/goods.vue              |    2 ++
 8 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/components/coupon/member-rule.vue b/components/coupon/member-rule.vue
index 948e2d6..d09b960 100644
--- a/components/coupon/member-rule.vue
+++ b/components/coupon/member-rule.vue
@@ -86,6 +86,7 @@
       inputAttrs: {
         precision: 0,
         min: 0,
+        max: 99999999,
         controls: false,
       },
     }
diff --git a/pages/marketing/coupon/activity/index.vue b/pages/marketing/coupon/activity/index.vue
index 1dd3278..5826244 100644
--- a/pages/marketing/coupon/activity/index.vue
+++ b/pages/marketing/coupon/activity/index.vue
@@ -165,6 +165,7 @@
             el: {
               inputAttrs: {
                 min: 1,
+                max: 99999999,
                 precision: 0,
                 controls: false,
               },
@@ -182,6 +183,7 @@
             el: {
               precision: 0,
               min: 1,
+              max: 99999999,
               controls: false,
             },
             unit: '张',
@@ -198,6 +200,7 @@
             el: {
               precision: 0,
               min: 1,
+              max: 99999999,
               controls: false,
             },
             unit: '张',
diff --git a/pages/marketing/coupon/user/index.vue b/pages/marketing/coupon/user/index.vue
index 8c983d2..1c546d1 100644
--- a/pages/marketing/coupon/user/index.vue
+++ b/pages/marketing/coupon/user/index.vue
@@ -63,6 +63,7 @@
             el: {
               inputAttrs: {
                 min: 1,
+                max: 99999999,
                 precision: 0,
                 controls: false,
               },
diff --git a/pages/marketing/member-level.vue b/pages/marketing/member-level.vue
index d4e40df..21b63cb 100644
--- a/pages/marketing/member-level.vue
+++ b/pages/marketing/member-level.vue
@@ -15,7 +15,11 @@
         columns: [
           { label: '序号', type: 'index' },
           { label: '等级名称', prop: 'name' },
-          { label: '成长值', prop: 'startPoint' },
+          {
+            label: '成长值',
+            formatter: (row) =>
+              `${row.startPoint ?? ''} ~ ${row.endPoint ?? ''}`,
+          },
           { label: '等级折扣', prop: 'discountTypeStr' },
           { label: '操作人', prop: 'createName' },
         ],
@@ -49,9 +53,9 @@
             el: {
               unit: '',
               separator: '<= 成长值范围 <',
-              inputAttrs: {
-                controls: false,
-              },
+              controls: false,
+              min: 0,
+              max: 99999999,
             },
             commonFormat: true,
             commonFormatProps: ['startPoint', 'endPoint'],
@@ -103,6 +107,7 @@
             el: {
               precision: 2,
               min: 0,
+              max: 99999999,
               controls: false,
             },
             unit: '元/扎',
@@ -129,6 +134,7 @@
             el: {
               precision: 0,
               min: 0,
+              max: 99999999,
               controls: false,
             },
             unit: '成长值',
diff --git a/pages/marketing/point-mall/coupon/index.vue b/pages/marketing/point-mall/coupon/index.vue
index 0d6fcc3..0962726 100644
--- a/pages/marketing/point-mall/coupon/index.vue
+++ b/pages/marketing/point-mall/coupon/index.vue
@@ -59,6 +59,7 @@
             el: {
               inputAttrs: {
                 min: 1,
+                max: 99999999,
                 precision: 0,
                 controls: false,
               },
@@ -74,6 +75,7 @@
             el: {
               precision: 0,
               min: 0,
+              max: 99999999,
               controls: false,
             },
             rules: { required: true, message: '请输入库存', trigger: 'blur' },
@@ -85,6 +87,7 @@
             el: {
               precision: 0,
               min: 1,
+              max: 99999999,
               controls: false,
             },
             rules: {
diff --git a/pages/marketing/point-mall/goods.vue b/pages/marketing/point-mall/goods.vue
index dbc71cf..e854756 100644
--- a/pages/marketing/point-mall/goods.vue
+++ b/pages/marketing/point-mall/goods.vue
@@ -83,6 +83,7 @@
             el: {
               precision: 0,
               min: 0,
+              max: 99999999,
               controls: false,
             },
             rules: { required: true, message: '请输入库存', trigger: 'blur' },
@@ -112,6 +113,7 @@
             el: {
               precision: 0,
               min: 1,
+              max: 99999999,
               controls: false,
             },
             rules: {
diff --git a/pages/marketing/point-mall/point-distribution.vue b/pages/marketing/point-mall/point-distribution.vue
index 640f3d9..1137570 100644
--- a/pages/marketing/point-mall/point-distribution.vue
+++ b/pages/marketing/point-mall/point-distribution.vue
@@ -4,7 +4,7 @@
     <el-dialog title="积分变动记录" :visible.sync="dialogVisible" width="80%">
       <el-bus-crud
         v-if="customerId"
-        :key="customerId"
+        :key="dialogId"
         :extra-query="{ customerId }"
         v-bind="recordTableConfig"
       />
@@ -13,11 +13,13 @@
 </template>
 
 <script>
+import { v4 as uuidv4 } from 'uuid'
 export default {
   data() {
     return {
       dialogVisible: false,
       customerId: null,
+      dialogId: null,
       tableConfig: {
         url: 'flower/api/customer/point/page',
         hasNew: false,
@@ -59,6 +61,7 @@
                 el: {
                   precision: 0,
                   min: 1,
+                  max: 99999999,
                   controls: false,
                 },
                 rules: {
@@ -110,6 +113,7 @@
                 el: {
                   precision: 0,
                   min: 1,
+                  max: 99999999,
                   controls: false,
                 },
                 rules: {
@@ -151,6 +155,7 @@
           {
             text: '积分变动记录',
             atClick: (row) => {
+              this.dialogId = uuidv4()
               this.customerId = row.customerId
               this.dialogVisible = true
             },
diff --git a/utils/coupon-form.js b/utils/coupon-form.js
index e0aeb55..49fa43e 100644
--- a/utils/coupon-form.js
+++ b/utils/coupon-form.js
@@ -55,6 +55,7 @@
       type: 'input-number',
       el: {
         min: 0,
+        max: 99999999,
         precision: 2,
         controls: false,
       },
@@ -73,6 +74,7 @@
       type: 'input-number',
       el: {
         min: 0.01,
+        max: 99999999,
         precision: 2,
         controls: false,
       },

--
Gitblit v1.9.3