From 6af033cedb5d85539e8fd3d825604bb4c73e718b Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 04 十二月 2024 10:17:37 +0800
Subject: [PATCH] 1.常规配置:基本配置 2.登录页:图片、公司名称、备案号、公司logo 3.主体页:图片、公司名称、备案号、公司logo

---
 pages/marketing/point-mall/goods.vue |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/pages/marketing/point-mall/goods.vue b/pages/marketing/point-mall/goods.vue
index e854756..3fc5758 100644
--- a/pages/marketing/point-mall/goods.vue
+++ b/pages/marketing/point-mall/goods.vue
@@ -86,7 +86,15 @@
               max: 99999999,
               controls: false,
             },
-            rules: { required: true, message: '请输入库存', trigger: 'blur' },
+            rules: [
+              { required: true, message: '请输入库存', trigger: 'blur' },
+              {
+                type: 'number',
+                min: 1,
+                message: '库存必须大于0',
+                trigger: 'blur',
+              },
+            ],
           },
           {
             label: '商品图片:',
@@ -126,7 +134,7 @@
         extraButtons: [
           {
             text: '上架',
-            show: (row) => row.status === 'I',
+            show: (row) => row.status === 'I' && row.stock > 0,
             atClick: async (row) => {
               try {
                 await this.$elBusUtil.confirm('确定要上架吗?')

--
Gitblit v1.9.3