diff --git a/src/router/modules/biz.ts b/src/router/modules/biz.ts
index ecfd26c..665d7c3 100644
--- a/src/router/modules/biz.ts
+++ b/src/router/modules/biz.ts
@@ -48,6 +48,15 @@ export default {
title: "积分消费记录"
}
},
+ {
+ path: "/biz/propCount",
+ name: "propCount",
+ component: () => import("@/views/biz/propCount/index.vue"),
+ meta: {
+ icon: "ri:bank-card-line",
+ title: "道具统计"
+ }
+ },
{
path: "/biz/purchase",
name: "purchase",
diff --git a/src/views/biz/membershipPoint/index.vue b/src/views/biz/membershipPoint/index.vue
index edc08bf..90410d1 100644
--- a/src/views/biz/membershipPoint/index.vue
+++ b/src/views/biz/membershipPoint/index.vue
@@ -276,8 +276,15 @@ const handleRaise = row => {
raisePointDialog.value = true;
};
-// 添加提交方法
+// 添加提交状态控制
+const submitting = ref(false);
+
+// 修改提交方法
const handleRaiseSubmit = async () => {
+ console.log(submitting.value);
+
+ if (submitting.value) return; // 如果正在提交,直接返回
+
try {
if (raisePointForm.value.pointNum <= 0) {
ElMessage.warning("请输入正确的积分数量");
@@ -288,6 +295,8 @@ const handleRaiseSubmit = async () => {
return;
}
+ submitting.value = true; // 开始提交,设置状态
+
const params = {
userId: currentRow.value.userId,
companyId: currentRow.value.companyId,
@@ -296,15 +305,11 @@ const handleRaiseSubmit = async () => {
description: raisePointForm.value.description
};
- console.log("params", params);
-
const res = await request(bizApi("raisePoint"), {
method: "POST",
body: JSON.stringify(params)
});
- console.info(res);
-
if (res.status === 200) {
ElMessage.success("涨分成功");
raisePointDialog.value = false;
@@ -313,9 +318,10 @@ const handleRaiseSubmit = async () => {
ElMessage.error(res.msg || "涨分失败");
}
} catch (error) {
- console.info(error);
console.error("涨分失败:", error);
ElMessage.error(error.message || "涨分失败");
+ } finally {
+ submitting.value = false; // 无论成功失败,都重置状态
}
};
@@ -394,7 +400,7 @@ const detailColumns = [
{
label: "变动原因",
prop: "reasonId",
- width: "80",
+ width: "95",
formatter: row => {
const reason = reasonOptions.find(item => item.value === row.reasonId);
return reason ? reason.label : "-";
@@ -417,6 +423,21 @@ const detailColumns = [
}
];
+// 添加抽屉关闭处理函数
+const handleDrawerClose = () => {
+ detailDrawer.value = false;
+ // 重置查询参数
+ detailQueryParams.value = {
+ pageNum: 1,
+ pageSize: 20,
+ userId: "",
+ companyId: ""
+ };
+ // 清空数据
+ detailData.value = [];
+ detailTotal.value = 0;
+};
+
// 页面加载时获取数据
onMounted(() => {
getPointList();
@@ -596,8 +617,16 @@ onMounted(() => {
diff --git a/src/views/biz/propCount/index.vue b/src/views/biz/propCount/index.vue
new file mode 100644
index 0000000..1a98144
--- /dev/null
+++ b/src/views/biz/propCount/index.vue
@@ -0,0 +1,9 @@
+
+
+
+ 道具管理
+