From b16c530306654f3fee9e82d8994e7b93ed85a32c Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Fri, 12 Dec 2025 11:49:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A7=AF=E5=88=86=E9=94=81?=
=?UTF-8?q?=E5=AE=A2=20=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2=E6=A8=A1?=
=?UTF-8?q?=E6=9D=BF=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../role/components/roleTemplateDialog.vue | 7 +-
.../system/role_template_mange/index.vue | 14 ++++
.../application/marketing/points/index.vue | 16 +++-
.../points/pointsconfig/BasicSettings.vue | 83 ++++++++++++++-----
.../points/pointsconfig/ProductSettings.vue | 4 +-
.../points/pointsconfig/addProduceDialog.vue | 13 +--
.../components/consumableList.vue | 2 +-
src/views/marketing_center/data.js | 2 +-
src/views/user/list/config/content.ts | 10 +--
9 files changed, 109 insertions(+), 42 deletions(-)
diff --git a/src/views/admin/system/role/components/roleTemplateDialog.vue b/src/views/admin/system/role/components/roleTemplateDialog.vue
index bbeb884..1f4be55 100644
--- a/src/views/admin/system/role/components/roleTemplateDialog.vue
+++ b/src/views/admin/system/role/components/roleTemplateDialog.vue
@@ -25,8 +25,9 @@
自己创建
- 确
- 定
+
+ 确 定
+
@@ -45,7 +46,7 @@ const list = ref([])
// 获取角色模板列表
async function roleTemplateListAjax() {
try {
- const res = await roleTemplateList()
+ const res = await roleTemplateList({ isEnable: 1 })
res.forEach(el => {
el.cehcked = false
});
diff --git a/src/views/admin/system/role_template_mange/index.vue b/src/views/admin/system/role_template_mange/index.vue
index 3e15bc3..897d499 100644
--- a/src/views/admin/system/role_template_mange/index.vue
+++ b/src/views/admin/system/role_template_mange/index.vue
@@ -160,6 +160,19 @@ function handlePlatformTypeChange(e) {
handleOpenAssignPermDialog(dialog.row);
}
+// 打开分配菜单菜单弹窗
+async function handleOpenAssignPermDialog(row) {
+ const roleId = row.id;
+ dialog.row = row;
+ if (roleId) {
+ assignPermDialogVisible.value = true;
+ loading.value = true;
+ checkedRole.value.id = roleId;
+ checkedRole.value.name = row.name;
+ getMenuIds(roleId);
+ }
+}
+
const permKeywords = ref("");
const isExpanded = ref(true);
const parentChildLinked = ref(false);
@@ -233,6 +246,7 @@ function getMenuIds(roleId) {
if (!roleId) {
return;
}
+
RoleApi.getMenu(roleId, platformType.value)
.then((data) => {
if (platformType.value == 0) {
diff --git a/src/views/application/marketing/points/index.vue b/src/views/application/marketing/points/index.vue
index fa8b08e..7f348b4 100644
--- a/src/views/application/marketing/points/index.vue
+++ b/src/views/application/marketing/points/index.vue
@@ -1,5 +1,8 @@
+
+
+
@@ -21,10 +24,21 @@ import BasicSettings from './pointsconfig/BasicSettings.vue'
import Exchangerecords from './pointsconfig/exchangerecords.vue'
import Memberpoints from './pointsconfig/Memberpoints.vue'
import ProductSettings from './pointsconfig/ProductSettings.vue'
+import headerCard from '@/views/marketing_center/components/headerCard.vue'
+
let datas = reactive({
activeName: "BasicSettings",
})
function handleClick(tab) {
datas.activeName = tab.props.name;
}
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/views/application/marketing/points/pointsconfig/BasicSettings.vue b/src/views/application/marketing/points/pointsconfig/BasicSettings.vue
index d5e6790..f8b0f7a 100644
--- a/src/views/application/marketing/points/pointsconfig/BasicSettings.vue
+++ b/src/views/application/marketing/points/pointsconfig/BasicSettings.vue
@@ -1,7 +1,7 @@
-
+
开启后,所有用户可通过消费获得积分及可用积分抵扣支付
@@ -32,23 +32,21 @@
-->
-
- form.minPaymentAmount = filterNumberInput(e)">
- 元
-
-
+ form.minPaymentAmount = filterNumberInput(e)" style="width: 150px;">
+ 元
+
-
-
+
+
%
-
+
1元等于
-
+
积分
@@ -97,7 +95,8 @@
-->
- 确定
+ 保存
+ 取消
@@ -106,15 +105,20 @@
import { ref } from "vue";
import { pointsConfigGet, pointsConfigPost } from '@/api/points'
import { filterNumberInput } from '@/utils'
+import { useRouter } from 'vue-router'
-const form = ref({
+const router = useRouter()
+
+const formObj = ref({
enableRewards: 0, // 开启消费赠送积分 1-开启 0-关闭 开启后,所有用户可通过消费获得积分及可用积分抵扣支付
consumeAmount: '', // 每消费xx元赠送1积分
minPaymentAmount: '', // 下单实付抵扣门槛
- maxDeductionRatio: '', // 下单最高抵扣比例
- equivalentPoints: '', // 下单抵扣积分比例 1元=?积分
- enablePointsMall: '', // 开启积分商城
-});
+ maxDeductionRatio: 100, // 下单最高抵扣比例
+ equivalentPoints: 1, // 下单抵扣积分比例 1元=?积分
+ enablePointsMall: 0, // 开启积分商城
+})
+
+const form = ref({});
const rules = ref({
consumeAmount: [
@@ -146,19 +150,52 @@ const rules = ref({
maxDeductionRatio: [
{
required: true,
- message: ' ',
+ validator: (rule, value, callback) => {
+ if (form.value.maxDeductionRatio == '') {
+ callback(new Error('请输入'))
+ } else {
+ callback()
+ }
+ },
+ triiger: 'blur'
+ }
+ ],
+ equivalentPoints: [
+ {
+ required: true,
+ validator: (rule, value, callback) => {
+ if (form.value.equivalentPoints == '') {
+ callback(new Error('请输入'))
+ } else {
+ callback()
+ }
+ },
triiger: 'blur'
}
]
})
+function maxDeductionRatioBlur() {
+ if (!form.value.maxDeductionRatio) {
+ form.value.maxDeductionRatio = 1
+ }
+}
+
+function equivalentPointsBlur() {
+ if (!form.value.equivalentPoints) {
+ form.value.equivalentPoints = 1
+ }
+}
+
// 积分:配置:详情
async function pointsConfigGetAjax() {
const res = await pointsConfigGet();
- if (res) {
+ if (res.data !== null) {
form.value = res
- formRef.value.clearValidate('consumeAmount');
- formRef.value.clearValidate('minPaymentAmount');
+ // formRef.value.clearValidate('consumeAmount');
+ // formRef.value.clearValidate('minPaymentAmount');
+ } else {
+ form.value = { ...formObj.value }
}
}
diff --git a/src/views/application/marketing/points/pointsconfig/ProductSettings.vue b/src/views/application/marketing/points/pointsconfig/ProductSettings.vue
index 1b0c58a..8c78a32 100644
--- a/src/views/application/marketing/points/pointsconfig/ProductSettings.vue
+++ b/src/views/application/marketing/points/pointsconfig/ProductSettings.vue
@@ -15,7 +15,7 @@
-
+
@@ -122,10 +122,10 @@ async function deleteHandle(row) {
async function statusChange(e, row) {
try {
await pointsGoodsPost(row)
- pointsGoodsPageAjax()
} catch (error) {
console.log(error);
}
+ pointsGoodsPageAjax()
}
onMounted(() => {
diff --git a/src/views/application/marketing/points/pointsconfig/addProduceDialog.vue b/src/views/application/marketing/points/pointsconfig/addProduceDialog.vue
index 5aecd5c..ce7a543 100644
--- a/src/views/application/marketing/points/pointsconfig/addProduceDialog.vue
+++ b/src/views/application/marketing/points/pointsconfig/addProduceDialog.vue
@@ -14,11 +14,11 @@
+
+
+
-
-
-
@@ -53,7 +53,8 @@
- 系统发放
+ 系统发放
+ 需要用户到店内领取核销
@@ -63,7 +64,7 @@
@input="e => form.limitQuota = filterNumberInput(e, 1)" v-if="limitQuotaSwitch">
-
+
diff --git a/src/views/inventory/operation_in/components/consumableList.vue b/src/views/inventory/operation_in/components/consumableList.vue
index 3634da9..8034e2d 100644
--- a/src/views/inventory/operation_in/components/consumableList.vue
+++ b/src/views/inventory/operation_in/components/consumableList.vue
@@ -33,7 +33,7 @@
-->
-