更新优化
This commit is contained in:
parent
1a4a8515c3
commit
2432c53a73
|
|
@ -74,6 +74,7 @@ const accountList = reactive([
|
||||||
{ username: "19191703856", type: 'warning', label: '喜气洋洋' },
|
{ username: "19191703856", type: 'warning', label: '喜气洋洋' },
|
||||||
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
||||||
{ username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
{ username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
||||||
|
{ username: "18821670757", type: 'primary', label: '强盛集团' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 快捷模拟登录
|
// 快捷模拟登录
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="m-4 bg-white p-4">
|
<div class="m-4 bg-white p-4">
|
||||||
|
<div v-if="shopInfo.isHeadShop == 1 || isUse">
|
||||||
<HeaderCard name="生日有礼" intro="用户生日管理设置" icon="birthdayGift"
|
<HeaderCard name="生日有礼" intro="用户生日管理设置" icon="birthdayGift"
|
||||||
:showSwitch="shopInfo.isHeadShop == 1 || shopInfo.shopType == 'only'" v-model:isOpen="basicForm.isEnable">
|
:showSwitch="shopInfo.isHeadShop == 1 || shopInfo.shopType == 'only'" v-model:isOpen="basicForm.isEnable">
|
||||||
</HeaderCard>
|
</HeaderCard>
|
||||||
|
|
@ -68,9 +69,10 @@
|
||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<DialogPlans ref="refDialogPlans" @submitSuccess="submitSuccess"></DialogPlans>
|
<DialogPlans ref="refDialogPlans" @submitSuccess="submitSuccess"></DialogPlans>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="padding-top: 14px;" v-else>门店未参与生日有礼或主店未开启活动,如需开启参与请联系主店</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -85,7 +87,7 @@ import { ref, reactive, watch, toRaw, getCurrentInstance, onMounted } from "vue"
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
const shopInfo = ref("");
|
const shopInfo = ref(JSON.parse(localStorage.getItem("userInfo")));
|
||||||
const inputStyle = {
|
const inputStyle = {
|
||||||
width: "340px",
|
width: "340px",
|
||||||
};
|
};
|
||||||
|
|
@ -150,21 +152,40 @@ function basicSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const isUse = ref(false)
|
||||||
async function init() {
|
async function init() {
|
||||||
birthdayGiftApi.getConfig().then((res) => {
|
birthdayGiftApi.getConfig().then((res) => {
|
||||||
res.configList = res.configList || [];
|
res.configList = res.configList || [];
|
||||||
Object.assign(basicForm, res);
|
Object.assign(basicForm, res);
|
||||||
basicForm.isEnable = basicForm.isEnable;
|
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(() => {
|
onMounted(() => {
|
||||||
init();
|
init();
|
||||||
getLocalShopInfo();
|
|
||||||
});
|
});
|
||||||
//计算总优惠券数量
|
//计算总优惠券数量
|
||||||
function totalCount(arr) {
|
function totalCount(arr) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="gyq_container">
|
<div class="gyq_container">
|
||||||
<div class="gyq_content">
|
<div class="gyq_content">
|
||||||
|
<div v-if="shopInfo.isHeadShop == 1 || isUse">
|
||||||
<HeaderCard name="消费返现" intro="允许客户充值并使用余额支付" icon="xffx"
|
<HeaderCard name="消费返现" intro="允许客户充值并使用余额支付" icon="xffx"
|
||||||
:showSwitch="shopInfo.isHeadShop == 1 || shopInfo.shopType == 'only'" v-model:isOpen="form.isEnable">
|
:showSwitch="shopInfo.isHeadShop == 1 || shopInfo.shopType == 'only'" v-model:isOpen="form.isEnable">
|
||||||
</HeaderCard>
|
</HeaderCard>
|
||||||
|
|
@ -79,6 +80,8 @@
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>门店未参与消费返现或主店已关闭活动,如需开启参与请联系主店</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -182,6 +185,7 @@ function submitHandle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置信息获取
|
// 配置信息获取
|
||||||
|
const isUse = ref(false)
|
||||||
async function consumeCashbackAjax() {
|
async function consumeCashbackAjax() {
|
||||||
try {
|
try {
|
||||||
const res = await consumeCashback()
|
const res = await consumeCashback()
|
||||||
|
|
@ -189,6 +193,22 @@ async function consumeCashbackAjax() {
|
||||||
res.cashbackStepList = []
|
res.cashbackStepList = []
|
||||||
}
|
}
|
||||||
form.value = res
|
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) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -808,43 +808,43 @@ function convertTimeToDate(timeStr, options = {}) {
|
||||||
// input过滤
|
// input过滤
|
||||||
const time = 500;
|
const time = 500;
|
||||||
const discountNumInput = _.debounce(function (value) {
|
const discountNumInput = _.debounce(function (value) {
|
||||||
form.value.discountNum = filterNumberInput(value, true);
|
form.value.discountNum = filterNumberInput(value, 1);
|
||||||
if (form.value.discountNum == "") {
|
if (form.value.discountNum == "") {
|
||||||
form.value.discountNum = 1;
|
form.value.discountNum = 1;
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const discountRateInput = _.debounce(function (value) {
|
const discountRateInput = _.debounce(function (value) {
|
||||||
form.value.discountRate = filterNumberInput(value, true);
|
form.value.discountRate = filterNumberInput(value, 1);
|
||||||
if (form.value.discountRate >= 100) {
|
if (form.value.discountRate >= 100) {
|
||||||
form.value.discountRate = 100;
|
form.value.discountRate = 100;
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const validDaysInput = _.debounce(function (value) {
|
const validDaysInput = _.debounce(function (value) {
|
||||||
form.value.validDays = filterNumberInput(value, true);
|
form.value.validDays = filterNumberInput(value, 1);
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const daysToTakeEffectInput = _.debounce(function (value) {
|
const daysToTakeEffectInput = _.debounce(function (value) {
|
||||||
form.value.daysToTakeEffect = filterNumberInput(value, true);
|
form.value.daysToTakeEffect = filterNumberInput(value, 1);
|
||||||
if (form.value.daysToTakeEffect === "") {
|
if (form.value.daysToTakeEffect === "") {
|
||||||
form.value.daysToTakeEffect = 0;
|
form.value.daysToTakeEffect = 0;
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const giveNumInput = _.debounce(function (value) {
|
const giveNumInput = _.debounce(function (value) {
|
||||||
form.value.giveNum = filterNumberInput(value, true);
|
form.value.giveNum = filterNumberInput(value, 1);
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const getLimitInput = _.debounce(function (value) {
|
const getLimitInput = _.debounce(function (value) {
|
||||||
form.value.getLimit = filterNumberInput(value, true);
|
form.value.getLimit = filterNumberInput(value, 1);
|
||||||
if (form.value.getLimit == "") {
|
if (form.value.getLimit == "") {
|
||||||
form.value.getLimit = 1;
|
form.value.getLimit = 1;
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const useLimitInput = _.debounce(function (value) {
|
const useLimitInput = _.debounce(function (value) {
|
||||||
form.value.useLimit = filterNumberInput(value, true);
|
form.value.useLimit = filterNumberInput(value, 1);
|
||||||
if (form.value.useLimit >= form.value.getLimit) {
|
if (form.value.useLimit >= form.value.getLimit) {
|
||||||
form.value.useLimit = form.value.getLimit;
|
form.value.useLimit = form.value.getLimit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog v-model="dialogVisible" :title="titleOptions.title" width="80%" @closed="closedReset">
|
||||||
v-model="dialogVisible"
|
<el-form ref="formRef" :model="form" :rules="formRules" label-width="100px" class="dialog-form">
|
||||||
:title="titleOptions.title"
|
|
||||||
width="80%"
|
|
||||||
@closed="closedReset"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
ref="formRef"
|
|
||||||
:model="form"
|
|
||||||
:rules="formRules"
|
|
||||||
label-width="100px"
|
|
||||||
class="dialog-form"
|
|
||||||
>
|
|
||||||
<el-form-item label="赠券门槛" prop="fullAmount">
|
<el-form-item label="赠券门槛" prop="fullAmount">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<el-input
|
<el-input v-model="form.fullAmount" placeholder="请输入赠券门槛" style="width: 240px"
|
||||||
v-model="form.fullAmount"
|
input-style="text-align: center;" @input="(e) => (form.fullAmount = filterNumberInput(e))">
|
||||||
placeholder="请输入赠券门槛"
|
|
||||||
style="width: 240px"
|
|
||||||
input-style="text-align: center;"
|
|
||||||
@input="(e) => (form.fullAmount = filterNumberInput(e))"
|
|
||||||
>
|
|
||||||
<template #prepend>满</template>
|
<template #prepend>满</template>
|
||||||
<template #append>元</template>
|
<template #append>元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-tooltip
|
<el-tooltip class="box-item" effect="dark" content="每单消费满此金额后赠送券 " placement="top-start">
|
||||||
class="box-item"
|
|
||||||
effect="dark"
|
|
||||||
content="每单消费满此金额后赠送券 "
|
|
||||||
placement="top-start"
|
|
||||||
>
|
|
||||||
<el-icon size="18">
|
<el-icon size="18">
|
||||||
<QuestionFilled />
|
<QuestionFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -39,17 +18,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="优惠券" prop="coupon">
|
<el-form-item label="优惠券" prop="coupon">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<el-select
|
<el-select v-model="couponGiftList" placeholder="请选择优惠券" style="width: 300px">
|
||||||
v-model="couponGiftList"
|
<el-option :label="item.title" :value="item.id" v-for="item in couponList" :key="item.id" />
|
||||||
placeholder="请选择优惠券"
|
|
||||||
style="width: 300px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
:label="item.title"
|
|
||||||
:value="item.id"
|
|
||||||
v-for="item in couponList"
|
|
||||||
:key="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -70,46 +40,28 @@
|
||||||
<span>关闭则为无限制</span>
|
<span>关闭则为无限制</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="infiniteGiveNum" style="margin-top: 10px">
|
<div v-if="infiniteGiveNum" style="margin-top: 10px">
|
||||||
<el-input
|
<el-input v-model="form.giveNum" placeholder="请输入总发放数量" style="width: 200px"
|
||||||
v-model="form.giveNum"
|
input-style="text-align: center;" @input="giveNumInput">
|
||||||
placeholder="请输入总发放数量"
|
|
||||||
style="width: 200px"
|
|
||||||
input-style="text-align: center;"
|
|
||||||
@input="giveNumInput"
|
|
||||||
>
|
|
||||||
<template #append>张</template>
|
<template #append>张</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="每次赠送">
|
<el-form-item label="每次赠送">
|
||||||
<el-input
|
<el-input v-model="couponGiveNum" placeholder="请输入" style="width: 200px" input-style="text-align: center;"
|
||||||
v-model="couponGiveNum"
|
@input="couponGiveNumInput">
|
||||||
placeholder="请输入"
|
|
||||||
style="width: 200px"
|
|
||||||
input-style="text-align: center;"
|
|
||||||
@input="couponGiveNumInput"
|
|
||||||
>
|
|
||||||
<template #append>张</template>
|
<template #append>张</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="每人限量" prop="getLimit">
|
<el-form-item label="每人限量" prop="getLimit">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<el-switch
|
<el-switch v-model="infiniteUseLimit" @change="infiniteUseLimitChange" />
|
||||||
v-model="infiniteUseLimit"
|
|
||||||
@change="infiniteUseLimitChange"
|
|
||||||
/>
|
|
||||||
<span>关闭则为无限制</span>
|
<span>关闭则为无限制</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="infiniteUseLimit" style="margin-top: 10px">
|
<div v-if="infiniteUseLimit" style="margin-top: 10px">
|
||||||
<el-input
|
<el-input v-model="form.getLimit" placeholder="请输入每人限量" style="width: 200px"
|
||||||
v-model="form.getLimit"
|
input-style="text-align: center;" @input="getLimitInput">
|
||||||
placeholder="请输入每人限量"
|
|
||||||
style="width: 200px"
|
|
||||||
input-style="text-align: center;"
|
|
||||||
@input="getLimitInput"
|
|
||||||
>
|
|
||||||
<template #append>张</template>
|
<template #append>张</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -369,18 +321,18 @@ onMounted(() => {
|
||||||
// input过滤
|
// input过滤
|
||||||
const time = 500;
|
const time = 500;
|
||||||
const couponGiveNumInput = _.debounce(function (value) {
|
const couponGiveNumInput = _.debounce(function (value) {
|
||||||
couponGiveNum.value = filterNumberInput(value, true);
|
couponGiveNum.value = filterNumberInput(value, 1);
|
||||||
if (couponGiveNum.value == "") {
|
if (couponGiveNum.value == "") {
|
||||||
couponGiveNum.value = 1;
|
couponGiveNum.value = 1;
|
||||||
}
|
}
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const giveNumInput = _.debounce(function (value) {
|
const giveNumInput = _.debounce(function (value) {
|
||||||
form.value.giveNum = filterNumberInput(value, true);
|
form.value.giveNum = filterNumberInput(value, 1);
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
const getLimitInput = _.debounce(function (value) {
|
const getLimitInput = _.debounce(function (value) {
|
||||||
form.value.getLimit = filterNumberInput(value, true);
|
form.value.getLimit = filterNumberInput(value, 1);
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gyq_content" v-else>
|
<div class="gyq_content" v-else>
|
||||||
门店未参券兑换码活动,如需开启参与请联系主店
|
门店未参与券兑换码活动或主店未开启活动,如需开启参与请联系主店
|
||||||
</div>
|
</div>
|
||||||
<useShops ref="useShopsRef" />
|
<useShops ref="useShopsRef" />
|
||||||
<add ref="addRef" @success="getTableData" />
|
<add ref="addRef" @success="getTableData" />
|
||||||
|
|
@ -168,6 +168,8 @@ async function rechargeRedemptionEnableStatusAjax() {
|
||||||
const res = await couponRedemptionEnableStatus();
|
const res = await couponRedemptionEnableStatus();
|
||||||
queryForm.value.isEnable = res.isEnable;
|
queryForm.value.isEnable = res.isEnable;
|
||||||
|
|
||||||
|
|
||||||
|
if (res.isEnable == 1) {
|
||||||
if (shopInfo.value.shopType == 'only') {
|
if (shopInfo.value.shopType == 'only') {
|
||||||
isUse.value = true
|
isUse.value = true
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -183,6 +185,9 @@ async function rechargeRedemptionEnableStatusAjax() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
isUse.value = false;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ function convertTimeToDate(timeStr, options = {}) {
|
||||||
// input过滤
|
// input过滤
|
||||||
const time = 500;
|
const time = 500;
|
||||||
const discountNumInput = _.debounce(function (value) {
|
const discountNumInput = _.debounce(function (value) {
|
||||||
form.value.discountNum = filterNumberInput(value, true);
|
form.value.discountNum = filterNumberInput(value, 1);
|
||||||
if (form.value.discountNum == "") {
|
if (form.value.discountNum == "") {
|
||||||
form.value.discountNum = 1;
|
form.value.discountNum = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ const form = ref({
|
||||||
|
|
||||||
// 折扣输入处理
|
// 折扣输入处理
|
||||||
const discountRateInput = _.debounce(function (value) {
|
const discountRateInput = _.debounce(function (value) {
|
||||||
form.value.discountRate = filterNumberInput(value, true);
|
form.value.discountRate = filterNumberInput(value, 1);
|
||||||
if (form.value.discountRate > 99) {
|
if (form.value.discountRate > 99) {
|
||||||
form.value.discountRate = 99;
|
form.value.discountRate = 99;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<!-- 限时折扣 -->
|
<!-- 限时折扣 -->
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="gyq_container">
|
<div class="gyq_container">
|
||||||
<div class="gyq_content">
|
<div class="gyq_content">
|
||||||
<HeaderCard name="限时折扣" intro="批量设置商品折扣" icon="xszk"></HeaderCard>
|
<HeaderCard name="限时折扣" intro="批量设置商品折扣" icon="xszk"></HeaderCard>
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,7 @@ async function distributionGetAjax() {
|
||||||
const res = await distributionGet()
|
const res = await distributionGet()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
form.value = { ...res }
|
form.value = { ...res }
|
||||||
|
delete form.value.isEnable
|
||||||
if (form.value.rewardCount == -1) {
|
if (form.value.rewardCount == -1) {
|
||||||
isLimitCount.value = 1
|
isLimitCount.value = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="gyq_container">
|
<div class="gyq_container">
|
||||||
<div class="gyq_content">
|
<div class="gyq_content">
|
||||||
<HeaderCard name="分销" intro="用户成为业务员,可促进消费" icon="xffx"
|
<HeaderCard name="分销" intro="用户成为业务员,可促进消费" icon="xffx" showSwitch v-model:isOpen="form.isEnable">
|
||||||
:showSwitch="shopInfo.isHeadShop == 1 || shopInfo.shopType == 'only'" v-model:isOpen="form.isEnable">
|
|
||||||
</HeaderCard>
|
</HeaderCard>
|
||||||
<div class="row mt14">
|
<div class="row mt14">
|
||||||
<tabHeader v-model="tabActiveIndex" :list="tabList" />
|
<tabHeader v-model="tabActiveIndex" :list="tabList" />
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gyq_content" v-else>
|
<div class="gyq_content" v-else>
|
||||||
门店未参与霸王餐活动,如需开启参与请联系主店
|
门店未参与霸王餐活动或主店未开启活动,如需开启参与请联系主店
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -138,6 +138,7 @@ async function freeDingGetAjax() {
|
||||||
form.value = { ...res }
|
form.value = { ...res }
|
||||||
form.value.enable = res.enable ? 1 : 0
|
form.value.enable = res.enable ? 1 : 0
|
||||||
|
|
||||||
|
if (res.enable == true) {
|
||||||
if (shopInfo.value.shopType == 'only') {
|
if (shopInfo.value.shopType == 'only') {
|
||||||
isUse.value = true
|
isUse.value = true
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -153,6 +154,9 @@ async function freeDingGetAjax() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
isUse.value = false
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,15 @@
|
||||||
<el-dialog title="添加方案" v-model="show" @closed="reset" width="730px">
|
<el-dialog title="添加方案" v-model="show" @closed="reset" width="730px">
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="减免金额" prop="amount">
|
<el-form-item label="减免金额" prop="amount">
|
||||||
<el-input
|
<el-input v-model="form.amount" placeholder="请输入减免金额" style="width: 270px" :maxlength="8"
|
||||||
v-model="form.amount"
|
@input="amountInput">
|
||||||
placeholder="请输入减免金额"
|
|
||||||
style="width: 270px"
|
|
||||||
:maxlength="8"
|
|
||||||
@input="amountInput"
|
|
||||||
>
|
|
||||||
<template #append>元</template>
|
<template #append>元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="概率" prop="probability">
|
<el-form-item label="概率" prop="probability">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<el-input
|
<el-input v-model="form.probability" placeholder="请输入概率" style="width: 270px" @input="probabilityInput">
|
||||||
v-model="form.probability"
|
|
||||||
placeholder="请输入概率"
|
|
||||||
style="width: 270px"
|
|
||||||
@input="probabilityInput"
|
|
||||||
>
|
|
||||||
<template #append>%</template>
|
<template #append>%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -63,7 +53,7 @@ const amountInput = _.debounce(function (value) {
|
||||||
form.value.amount = filterNumberInput(value);
|
form.value.amount = filterNumberInput(value);
|
||||||
}, time);
|
}, time);
|
||||||
const probabilityInput = _.debounce(function (value) {
|
const probabilityInput = _.debounce(function (value) {
|
||||||
form.value.probability = filterNumberInput(value, true);
|
form.value.probability = filterNumberInput(value, 1);
|
||||||
if (form.value.probability >= 100) {
|
if (form.value.probability >= 100) {
|
||||||
form.value.probability = 100;
|
form.value.probability = 100;
|
||||||
}
|
}
|
||||||
|
|
@ -162,6 +152,7 @@ function filterNumberInput(value, isIntegerOnly = false) {
|
||||||
.column {
|
.column {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gyq_content" v-else>
|
<div class="gyq_content" v-else>
|
||||||
门店未参与充值兑换码活动,如需开启参与请联系主店
|
门店未参与充值兑换码活动或主店未开启活动,如需开启参与请联系主店
|
||||||
</div>
|
</div>
|
||||||
<useShops ref="useShopsRef" />
|
<useShops ref="useShopsRef" />
|
||||||
<add ref="addRef" @success="getTableData" />
|
<add ref="addRef" @success="getTableData" />
|
||||||
|
|
@ -150,6 +150,7 @@ async function rechargeRedemptionEnableStatusAjax() {
|
||||||
const res = await rechargeRedemptionEnableStatus();
|
const res = await rechargeRedemptionEnableStatus();
|
||||||
queryForm.value.isEnable = res.isEnable;
|
queryForm.value.isEnable = res.isEnable;
|
||||||
|
|
||||||
|
if (res.isEnable == 1) {
|
||||||
if (shopInfo.value.shopType == 'only') {
|
if (shopInfo.value.shopType == 'only') {
|
||||||
isUse.value = true
|
isUse.value = true
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -165,6 +166,9 @@ async function rechargeRedemptionEnableStatusAjax() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
isUse.value = false
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 14px;" v-else>门店未参券兑换码活动,如需开启参与请联系主店</div>
|
<div style="padding-top: 14px;" v-else>门店未参与超级会员活动或主店未开启活动,如需开启参与请联系主店</div>
|
||||||
<DialogPlans ref="refDialogPlans" @submitSuccess="submitSuccess"></DialogPlans>
|
<DialogPlans ref="refDialogPlans" @submitSuccess="submitSuccess"></DialogPlans>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -528,7 +528,8 @@ async function init() {
|
||||||
});
|
});
|
||||||
console.log(conditionLists.value);
|
console.log(conditionLists.value);
|
||||||
|
|
||||||
if (res.useType == 'all' || shopInfo.value.shopType == 'only') {
|
if (res.isOpen == 1) {
|
||||||
|
if (res.memberPriceShopType == 'ALL' || shopInfo.value.shopType == 'only') {
|
||||||
isUse.value = true
|
isUse.value = true
|
||||||
} else {
|
} else {
|
||||||
let currentShopId = shopInfo.value.shopId;
|
let currentShopId = shopInfo.value.shopId;
|
||||||
|
|
@ -539,6 +540,9 @@ async function init() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
isUse.value = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
memberApi.levelList().then((res) => {
|
memberApi.levelList().then((res) => {
|
||||||
if (res && res.length) {
|
if (res && res.length) {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gyq_content err" v-else>门店未参与充值活动,如需开启参与请联系主店</div>
|
<div class="gyq_content err" v-else>门店未参与智慧充值活动,如需开启参与请联系主店</div>
|
||||||
<AddDialog ref="AddDialogRef" :couponList="couponList" @success="addSuccess" />
|
<AddDialog ref="AddDialogRef" :couponList="couponList" @success="addSuccess" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue