From d66d833556ef54b06f6df33b6a29a1252590a39a Mon Sep 17 00:00:00 2001 From: mayf <m13160102112@163.com> Date: 星期六, 21 九月 2024 20:24:29 +0800 Subject: [PATCH] 库存必须大于0 --- pages/marketing/point-mall/coupon/index.vue | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pages/marketing/point-mall/coupon/index.vue b/pages/marketing/point-mall/coupon/index.vue index 0962726..28008a5 100644 --- a/pages/marketing/point-mall/coupon/index.vue +++ b/pages/marketing/point-mall/coupon/index.vue @@ -78,7 +78,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: '积分数量:', @@ -101,7 +109,8 @@ { text: '上架', show: (row) => - row.status === 'inactive' || row.status === 'expired', + (row.status === 'inactive' || row.status === 'expired') && + row.couponAmount > 0, atClick: async (row) => { try { await this.$elBusUtil.confirm('确定要上架吗?') -- Gitblit v1.9.3