diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 7641bd4..2bdf234 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -74,6 +74,7 @@ const accountList = reactive([
{ username: "19191703856", type: 'warning', label: '喜气洋洋' },
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
{ username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
+ { username: "18821670757", type: 'primary', label: '强盛集团' },
]);
// 快捷模拟登录
diff --git a/src/views/marketing_center/birthdayGift/index.vue b/src/views/marketing_center/birthdayGift/index.vue
index 609887e..32909cc 100644
--- a/src/views/marketing_center/birthdayGift/index.vue
+++ b/src/views/marketing_center/birthdayGift/index.vue
@@ -1,75 +1,77 @@
-
-
-
-
-
-
-
-
添加
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+ {{ returnUserType(scope.row.userType) }}
+
+
+
+
+
+ {{ item.title }}
+ {{ item.num }} 张
+
+
+
+
+
+ {{ returnDeliverDate(scope.row) }}
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+ 开启后,将会在用户生日当天,发送祝福短信
+
+
+
+
+ 亲爱的{用户昵称},[店铺名称]祝您生日快乐!感谢您一直的陪伴。为您准备了{num}张超值优惠券,已经放入账户,愿我们的礼物能为您增添一份喜悦。
+
+
+
+
+
+ 保存
+
+ 取消
-
-
-
-
- {{ returnUserType(scope.row.userType) }}
-
-
-
-
-
- {{ item.title }}
- {{ item.num }} 张
-
-
-
-
-
- {{ returnDeliverDate(scope.row) }}
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
-
-
- 开启后,将会在用户生日当天,发送祝福短信
-
-
-
-
- 亲爱的{用户昵称},[店铺名称]祝您生日快乐!感谢您一直的陪伴。为您准备了{num}张超值优惠券,已经放入账户,愿我们的礼物能为您增添一份喜悦。
-
-
-
-
-
- 保存
-
- 取消
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
门店未参与生日有礼或主店未开启活动,如需开启参与请联系主店
@@ -85,7 +87,7 @@ import { ref, reactive, watch, toRaw, getCurrentInstance, onMounted } from "vue"
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
-const shopInfo = ref("");
+const shopInfo = ref(JSON.parse(localStorage.getItem("userInfo")));
const inputStyle = {
width: "340px",
};
@@ -150,21 +152,40 @@ function basicSubmit() {
});
}
+
+const isUse = ref(false)
async function init() {
birthdayGiftApi.getConfig().then((res) => {
res.configList = res.configList || [];
Object.assign(basicForm, res);
basicForm.isEnable = basicForm.isEnable;
+
+ if (res.isEnable == 1) {
+ isUse.value = true
+ // if (shopInfo.value.shopType == 'only') {
+ // isUse.value = true
+ // }
+ // else {
+ // if (res.useType == 'all') {
+ // isUse.value = true
+ // } else {
+ // let currentShopId = shopInfo.value.shopId;
+ // res.shopIdList.some((item) => {
+ // if (item == currentShopId) {
+ // isUse.value = true;
+ // return true;
+ // }
+ // });
+ // }
+ // }
+ } else {
+ isUse.value = false
+ }
});
}
-// 从本地获取商户信息
-function getLocalShopInfo() {
- shopInfo.value = JSON.parse(localStorage.getItem("userInfo"));
-}
onMounted(() => {
init();
- getLocalShopInfo();
});
//计算总优惠券数量
function totalCount(arr) {
diff --git a/src/views/marketing_center/cashback/index.vue b/src/views/marketing_center/cashback/index.vue
index 6f0aaf0..bd739e9 100644
--- a/src/views/marketing_center/cashback/index.vue
+++ b/src/views/marketing_center/cashback/index.vue
@@ -2,82 +2,85 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ `第${index + 1}组` }}
-
-
-
-
-
-
- 返现门槛
- item.amount = filterNumberInput(e)">
- 元
-
-
-
- {{ form.cashbackType == 'percentage' ? '返现比例' : '返现金额' }}
- item.cashbackAmount = filterNumberInput(e)">
-
- {{ form.cashbackType == 'percentage' ? '%' : '元' }}
-
-
-
-
-
-
- 添加阶梯
-
-
-
-
-
- 保存
- 取消
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ `第${index + 1}组` }}
+
+
+
+
+
+
+ 返现门槛
+ item.amount = filterNumberInput(e)">
+ 元
+
+
+
+ {{ form.cashbackType == 'percentage' ? '返现比例' : '返现金额' }}
+ item.cashbackAmount = filterNumberInput(e)">
+
+ {{ form.cashbackType == 'percentage' ? '%' : '元' }}
+
+
+
+
+
+
+ 添加阶梯
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
+
+ 门店未参与消费返现或主店已关闭活动,如需开启参与请联系主店
@@ -182,6 +185,7 @@ function submitHandle() {
}
// 配置信息获取
+const isUse = ref(false)
async function consumeCashbackAjax() {
try {
const res = await consumeCashback()
@@ -189,6 +193,22 @@ async function consumeCashbackAjax() {
res.cashbackStepList = []
}
form.value = res
+
+ if (res.isEnable == 1) {
+ if (res.useType == 'all' || shopInfo.value.shopType == 'only') {
+ isUse.value = true
+ } else {
+ let currentShopId = shopInfo.value.shopId;
+ res.shopIdList.some((item) => {
+ if (item == currentShopId) {
+ isUse.value = true;
+ return true;
+ }
+ });
+ }
+ } else {
+ isUse.value = false
+ }
} catch (error) {
console.log(error);
}
diff --git a/src/views/marketing_center/components/couponDialog.vue b/src/views/marketing_center/components/couponDialog.vue
index e59a8a4..a817e53 100644
--- a/src/views/marketing_center/components/couponDialog.vue
+++ b/src/views/marketing_center/components/couponDialog.vue
@@ -808,43 +808,43 @@ function convertTimeToDate(timeStr, options = {}) {
// input过滤
const time = 500;
const discountNumInput = _.debounce(function (value) {
- form.value.discountNum = filterNumberInput(value, true);
+ form.value.discountNum = filterNumberInput(value, 1);
if (form.value.discountNum == "") {
form.value.discountNum = 1;
}
}, time);
const discountRateInput = _.debounce(function (value) {
- form.value.discountRate = filterNumberInput(value, true);
+ form.value.discountRate = filterNumberInput(value, 1);
if (form.value.discountRate >= 100) {
form.value.discountRate = 100;
}
}, time);
const validDaysInput = _.debounce(function (value) {
- form.value.validDays = filterNumberInput(value, true);
+ form.value.validDays = filterNumberInput(value, 1);
}, time);
const daysToTakeEffectInput = _.debounce(function (value) {
- form.value.daysToTakeEffect = filterNumberInput(value, true);
+ form.value.daysToTakeEffect = filterNumberInput(value, 1);
if (form.value.daysToTakeEffect === "") {
form.value.daysToTakeEffect = 0;
}
}, time);
const giveNumInput = _.debounce(function (value) {
- form.value.giveNum = filterNumberInput(value, true);
+ form.value.giveNum = filterNumberInput(value, 1);
}, time);
const getLimitInput = _.debounce(function (value) {
- form.value.getLimit = filterNumberInput(value, true);
+ form.value.getLimit = filterNumberInput(value, 1);
if (form.value.getLimit == "") {
form.value.getLimit = 1;
}
}, time);
const useLimitInput = _.debounce(function (value) {
- form.value.useLimit = filterNumberInput(value, true);
+ form.value.useLimit = filterNumberInput(value, 1);
if (form.value.useLimit >= form.value.getLimit) {
form.value.useLimit = form.value.getLimit;
}
diff --git a/src/views/marketing_center/consume_ticket/components/dialogForm.vue b/src/views/marketing_center/consume_ticket/components/dialogForm.vue
index d6e4dfb..5de6c8c 100644
--- a/src/views/marketing_center/consume_ticket/components/dialogForm.vue
+++ b/src/views/marketing_center/consume_ticket/components/dialogForm.vue
@@ -1,36 +1,15 @@
-
-
+
+
-
(form.fullAmount = filterNumberInput(e))"
- >
+ (form.fullAmount = filterNumberInput(e))">
满
元
-
+
@@ -39,17 +18,8 @@
-
-
+
+
@@ -70,46 +40,28 @@
关闭则为无限制
-
+
张
-
+
张
-
+
关闭则为无限制
-
+
张
@@ -315,7 +267,7 @@ function resetHandle() {
// 显示弹窗
function show(t, obj = null) {
console.log(obj);
-
+
let m = titleOptions.couponTypeList.find((item) => item.value == t);
if (obj && obj.id) {
titleOptions.title = `编辑${m.label}`;
@@ -369,18 +321,18 @@ onMounted(() => {
// input过滤
const time = 500;
const couponGiveNumInput = _.debounce(function (value) {
- couponGiveNum.value = filterNumberInput(value, true);
+ couponGiveNum.value = filterNumberInput(value, 1);
if (couponGiveNum.value == "") {
couponGiveNum.value = 1;
}
}, time);
const giveNumInput = _.debounce(function (value) {
- form.value.giveNum = filterNumberInput(value, true);
+ form.value.giveNum = filterNumberInput(value, 1);
}, time);
const getLimitInput = _.debounce(function (value) {
- form.value.getLimit = filterNumberInput(value, true);
+ form.value.getLimit = filterNumberInput(value, 1);
}, time);
defineExpose({
diff --git a/src/views/marketing_center/coupon_exchange_code/index.vue b/src/views/marketing_center/coupon_exchange_code/index.vue
index 1f0ce30..4eedd38 100644
--- a/src/views/marketing_center/coupon_exchange_code/index.vue
+++ b/src/views/marketing_center/coupon_exchange_code/index.vue
@@ -62,7 +62,7 @@
- 门店未参券兑换码活动,如需开启参与请联系主店
+ 门店未参与券兑换码活动或主店未开启活动,如需开启参与请联系主店
@@ -168,20 +168,25 @@ async function rechargeRedemptionEnableStatusAjax() {
const res = await couponRedemptionEnableStatus();
queryForm.value.isEnable = res.isEnable;
- if (shopInfo.value.shopType == 'only') {
- isUse.value = true
- } else {
- if (res.useType == 'all') {
+
+ if (res.isEnable == 1) {
+ if (shopInfo.value.shopType == 'only') {
isUse.value = true
} else {
- let currentShopId = shopInfo.value.shopId;
- res.shopIdList.some((item) => {
- if (item == currentShopId) {
- isUse.value = true;
- return true;
- }
- });
+ if (res.useType == 'all') {
+ isUse.value = true
+ } else {
+ let currentShopId = shopInfo.value.shopId;
+ res.shopIdList.some((item) => {
+ if (item == currentShopId) {
+ isUse.value = true;
+ return true;
+ }
+ });
+ }
}
+ } else {
+ isUse.value = false;
}
} catch (error) {
console.log(error);
diff --git a/src/views/marketing_center/discount_activity/components/addDialog.vue b/src/views/marketing_center/discount_activity/components/addDialog.vue
index 604ea51..d242b1e 100644
--- a/src/views/marketing_center/discount_activity/components/addDialog.vue
+++ b/src/views/marketing_center/discount_activity/components/addDialog.vue
@@ -419,7 +419,7 @@ function convertTimeToDate(timeStr, options = {}) {
// input过滤
const time = 500;
const discountNumInput = _.debounce(function (value) {
- form.value.discountNum = filterNumberInput(value, true);
+ form.value.discountNum = filterNumberInput(value, 1);
if (form.value.discountNum == "") {
form.value.discountNum = 1;
}
diff --git a/src/views/marketing_center/discount_limit/components/add.vue b/src/views/marketing_center/discount_limit/components/add.vue
index e8bc09c..f246de2 100644
--- a/src/views/marketing_center/discount_limit/components/add.vue
+++ b/src/views/marketing_center/discount_limit/components/add.vue
@@ -187,7 +187,7 @@ const form = ref({
// 折扣输入处理
const discountRateInput = _.debounce(function (value) {
- form.value.discountRate = filterNumberInput(value, true);
+ form.value.discountRate = filterNumberInput(value, 1);
if (form.value.discountRate > 99) {
form.value.discountRate = 99;
}
diff --git a/src/views/marketing_center/discount_limit/index.vue b/src/views/marketing_center/discount_limit/index.vue
index cc91ef4..05d277c 100644
--- a/src/views/marketing_center/discount_limit/index.vue
+++ b/src/views/marketing_center/discount_limit/index.vue
@@ -1,6 +1,5 @@
-
diff --git a/src/views/marketing_center/distribution_page/components/setting.vue b/src/views/marketing_center/distribution_page/components/setting.vue
index 9007995..b3fe1d4 100644
--- a/src/views/marketing_center/distribution_page/components/setting.vue
+++ b/src/views/marketing_center/distribution_page/components/setting.vue
@@ -347,6 +347,7 @@ async function distributionGetAjax() {
const res = await distributionGet()
nextTick(() => {
form.value = { ...res }
+ delete form.value.isEnable
if (form.value.rewardCount == -1) {
isLimitCount.value = 1
}
diff --git a/src/views/marketing_center/distribution_page/index.vue b/src/views/marketing_center/distribution_page/index.vue
index 3b6b6ec..78f28f2 100644
--- a/src/views/marketing_center/distribution_page/index.vue
+++ b/src/views/marketing_center/distribution_page/index.vue
@@ -1,8 +1,7 @@
-
+
diff --git a/src/views/marketing_center/king_dine/index.vue b/src/views/marketing_center/king_dine/index.vue
index 130aaa3..ef3cf7b 100644
--- a/src/views/marketing_center/king_dine/index.vue
+++ b/src/views/marketing_center/king_dine/index.vue
@@ -64,7 +64,7 @@
- 门店未参与霸王餐活动,如需开启参与请联系主店
+ 门店未参与霸王餐活动或主店未开启活动,如需开启参与请联系主店
@@ -138,20 +138,24 @@ async function freeDingGetAjax() {
form.value = { ...res }
form.value.enable = res.enable ? 1 : 0
- if (shopInfo.value.shopType == 'only') {
- isUse.value = true
- } else {
- if (res.useType == 'all') {
+ if (res.enable == true) {
+ if (shopInfo.value.shopType == 'only') {
isUse.value = true
} else {
- let currentShopId = shopInfo.value.shopId;
- res.shopIdList.some((item) => {
- if (item == currentShopId) {
- isUse.value = true;
- return true;
- }
- });
+ if (res.useType == 'all') {
+ isUse.value = true
+ } else {
+ let currentShopId = shopInfo.value.shopId;
+ res.shopIdList.some((item) => {
+ if (item == currentShopId) {
+ isUse.value = true;
+ return true;
+ }
+ });
+ }
}
+ } else {
+ isUse.value = false
}
} catch (err) {
console.log(err);
diff --git a/src/views/marketing_center/new_user_discount/components/dialog-plans.vue b/src/views/marketing_center/new_user_discount/components/dialog-plans.vue
index a091e02..4d58f10 100644
--- a/src/views/marketing_center/new_user_discount/components/dialog-plans.vue
+++ b/src/views/marketing_center/new_user_discount/components/dialog-plans.vue
@@ -3,25 +3,15 @@
-
+
元
-
+
%
@@ -63,7 +53,7 @@ const amountInput = _.debounce(function (value) {
form.value.amount = filterNumberInput(value);
}, time);
const probabilityInput = _.debounce(function (value) {
- form.value.probability = filterNumberInput(value, true);
+ form.value.probability = filterNumberInput(value, 1);
if (form.value.probability >= 100) {
form.value.probability = 100;
}
@@ -162,6 +152,7 @@ function filterNumberInput(value, isIntegerOnly = false) {
.column {
display: flex;
flex-direction: column;
+
.item {
flex: 1;
}
diff --git a/src/views/marketing_center/recharge_exchange/index.vue b/src/views/marketing_center/recharge_exchange/index.vue
index 2be9bb7..7ce5fb4 100644
--- a/src/views/marketing_center/recharge_exchange/index.vue
+++ b/src/views/marketing_center/recharge_exchange/index.vue
@@ -52,7 +52,7 @@
- 门店未参与充值兑换码活动,如需开启参与请联系主店
+ 门店未参与充值兑换码活动或主店未开启活动,如需开启参与请联系主店
@@ -150,20 +150,24 @@ async function rechargeRedemptionEnableStatusAjax() {
const res = await rechargeRedemptionEnableStatus();
queryForm.value.isEnable = res.isEnable;
- if (shopInfo.value.shopType == 'only') {
- isUse.value = true
- } else {
- if (res.useType == 'all') {
+ if (res.isEnable == 1) {
+ if (shopInfo.value.shopType == 'only') {
isUse.value = true
} else {
- let currentShopId = shopInfo.value.shopId;
- res.shopIdList.some((item) => {
- if (item == currentShopId) {
- isUse.value = true;
- return true;
- }
- });
+ if (res.useType == 'all') {
+ isUse.value = true
+ } else {
+ let currentShopId = shopInfo.value.shopId;
+ res.shopIdList.some((item) => {
+ if (item == currentShopId) {
+ isUse.value = true;
+ return true;
+ }
+ });
+ }
}
+ } else {
+ isUse.value = false
}
} catch (error) {
console.log(error);
diff --git a/src/views/marketing_center/super_vip/index.vue b/src/views/marketing_center/super_vip/index.vue
index 110d92d..8d5d691 100644
--- a/src/views/marketing_center/super_vip/index.vue
+++ b/src/views/marketing_center/super_vip/index.vue
@@ -247,7 +247,7 @@
- 门店未参券兑换码活动,如需开启参与请联系主店
+ 门店未参与超级会员活动或主店未开启活动,如需开启参与请联系主店
@@ -528,16 +528,20 @@ async function init() {
});
console.log(conditionLists.value);
- if (res.useType == 'all' || shopInfo.value.shopType == 'only') {
- isUse.value = true
+ if (res.isOpen == 1) {
+ if (res.memberPriceShopType == 'ALL' || shopInfo.value.shopType == 'only') {
+ isUse.value = true
+ } else {
+ let currentShopId = shopInfo.value.shopId;
+ res.memberPriceShopIdList.some((item) => {
+ if (item == currentShopId) {
+ isUse.value = true;
+ return true;
+ }
+ });
+ }
} else {
- let currentShopId = shopInfo.value.shopId;
- res.memberPriceShopIdList.some((item) => {
- if (item == currentShopId) {
- isUse.value = true;
- return true;
- }
- });
+ isUse.value = false;
}
});
memberApi.levelList().then((res) => {
diff --git a/src/views/marketing_center/wisdom_recharge/index.vue b/src/views/marketing_center/wisdom_recharge/index.vue
index 1959fb4..614b2fc 100644
--- a/src/views/marketing_center/wisdom_recharge/index.vue
+++ b/src/views/marketing_center/wisdom_recharge/index.vue
@@ -94,7 +94,7 @@
-
门店未参与充值活动,如需开启参与请联系主店
+ 门店未参与智慧充值活动,如需开启参与请联系主店