From 08a0dd22e9669c356aacf0951126a753620dc85a Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 19 九月 2024 16:48:50 +0800
Subject: [PATCH] fix:限购数量空值处理
---
pages/marketing/point-mall/goods.vue | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/pages/marketing/point-mall/goods.vue b/pages/marketing/point-mall/goods.vue
index 0821523..3c7e751 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: {
@@ -124,7 +126,7 @@
extraButtons: [
{
text: '上架',
- show: (row) => row.status === 'I',
+ show: (row) => row.status === 'I' && row.stock>0,
atClick: async (row) => {
try {
await this.$elBusUtil.confirm('确定要上架吗?')
@@ -177,6 +179,7 @@
)
if (code === 0) {
this.$message.success('上架成功')
+ this.$refs.crud.clearSelection()
}
} catch (e) {
return false
@@ -200,6 +203,7 @@
)
if (code === 0) {
this.$message.success('下架成功')
+ this.$refs.crud.clearSelection()
}
} catch (e) {
return false
--
Gitblit v1.9.3