diff --git a/activitylink/src/views/zhongchou/gift/importFixedList/index.vue b/activitylink/src/views/zhongchou/gift/importFixedList/index.vue
index 07263c4..76b90f7 100644
--- a/activitylink/src/views/zhongchou/gift/importFixedList/index.vue
+++ b/activitylink/src/views/zhongchou/gift/importFixedList/index.vue
@@ -183,7 +183,7 @@ const submitAdd = async () => {
// 删单个
const delUser = (row) => {
- ElMessageBox.confirm('此操作确定要删除该内定用户吗?', '提示', {
+ ElMessageBox.confirm('确定要删除该内定用户吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
diff --git a/activitylink/src/views/zhongchou/gift/importuser/index.vue b/activitylink/src/views/zhongchou/gift/importuser/index.vue
index cda8040..1b84a53 100644
--- a/activitylink/src/views/zhongchou/gift/importuser/index.vue
+++ b/activitylink/src/views/zhongchou/gift/importuser/index.vue
@@ -192,7 +192,7 @@ const batchDelete = async () => {
ElMessage.warning('请先选择需要删除的用户')
return
}
- ElMessageBox.confirm(`确定要删除选中的${selectedIds.value.length}条数据吗?`, '删除确认', {
+ ElMessageBox.confirm(`此操作会删除对应用户内定信息和中奖记录信息,确定要删除选中的${selectedIds.value.length}条数据吗?`, '删除确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
diff --git a/activitylink/src/views/zhongchou/level/index.vue b/activitylink/src/views/zhongchou/level/index.vue
index b84faea..55fe83e 100644
--- a/activitylink/src/views/zhongchou/level/index.vue
+++ b/activitylink/src/views/zhongchou/level/index.vue
@@ -43,16 +43,28 @@
-
+ handleNumberInput('amount', val, addForm, 99999)"
+ placeholder="请输入数量"
+ style="width: 100%;"
+ >
-
+ handleNumberInput('perWin', val, addForm, 500)"
+ placeholder="请输入抽取人数"
+ style="width: 100%;"
+ >
-
+ handleNumberInput('sort', val, addForm, 100000000)"
+ placeholder="请输入排序等级"
+ style="width: 100%;"
+ >
@@ -69,16 +81,28 @@
-
+ handleNumberInput('amount', val, editForm, 99999)"
+ placeholder="请输入数量"
+ style="width: 100%;"
+ >
-
+ handleNumberInput('perWin', val, editForm, 500)"
+ placeholder="请输入抽取人数"
+ style="width: 100%;"
+ >
-
+ handleNumberInput('sort', val, editForm, 100000000)"
+ placeholder="请输入排序等级"
+ style="width: 100%;"
+ >
@@ -125,9 +149,9 @@ const editLevel = (row) => {
editForm.value = {
id: row.id,
gradeName: row.gradeName,
- amount: row.amount,
- perWin: row.perWin,
- sort: row.sort
+ amount: String(row.amount),
+ perWin: String(row.perWin),
+ sort: String(row.sort)
}
editVisible.value = true
}
@@ -225,7 +249,7 @@ const submitEdit = async () => {
}
// 删除等级
const deleteLevel = (row) => {
- ElMessageBox.confirm('此操作会删对应奖品信息、内定用户信息和中奖记录信息,确定要删除该等级吗?', '提示', {
+ ElMessageBox.confirm('确定要删除该等级吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -249,6 +273,29 @@ const deleteLevel = (row) => {
})
}
+// 处理数字输入并限制最大值
+const handleNumberInput = (field, value, form, maxValue) => {
+ // 1. 过滤非数字字符
+ let filteredValue = value.replace(/[^\d]/g, '');
+
+ // 2. 处理空值情况
+ if (filteredValue === '') {
+ form[field] = '';
+ return;
+ }
+
+ // 3. 转换为数字并限制最大值
+ let numValue = Number(filteredValue);
+
+ // 4. 应用最大值限制
+ if (numValue > maxValue) {
+ form[field] = String(maxValue);
+ } else {
+ // 5. 保留原始输入(但去除前导零)
+ form[field] = numValue === 0 ? '0' : filteredValue.replace(/^0+/, '') || '0';
+ }
+};
+
//清空表单(关闭对话框时调用)
const resetForm = () => {
addForm.value = {