优惠卷

This commit is contained in:
zoujiandong
2024-06-13 14:31:03 +08:00
parent 0030ed0689
commit 628bfbb2f4
2 changed files with 32 additions and 10 deletions
+26 -9
View File
@@ -490,7 +490,7 @@ import {
import { Message } from '@arco-design/web-vue';
const { proxy } = getCurrentInstance();
import dayjs from 'dayjs';
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail']);
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail','changeValue']);
const props = defineProps({
// 是否显示
modalVisible: {
@@ -556,6 +556,14 @@ const record_columns = [
slotName: 'created_at',
},
];
const clearDate = () => {
valid_start_time.value = '';
valid_end_time.value = '';
emits('changeTimeRange', {
valid_start_time: '',
valid_end_time: '',
});
};
//关闭启用弹框
const closeChangeOk = () => {
isVisible.value = false;
@@ -579,7 +587,9 @@ const handleGetProduct = async (name = '', id = '') => {
};
const changeType = (val) => {
showManjian.value = false;
emits('changeValue','with_amount');
showMinNumber.value = false;
emits('changeValue','min_usable_number');
if (val == 2) {
showManjian.value = true;
} else if (val == 3) {
@@ -588,7 +598,9 @@ const changeType = (val) => {
};
const changeValidType = (val) => {
showTimeRange.value = false;
clearDate();
showValidDay.value = false;
emits('changeValue','valid_days');
if (val == 1) {
showTimeRange.value = true;
if (modalForm.value.valid_start_time) {
@@ -603,9 +615,13 @@ const changeValidType = (val) => {
};
const changeScope = (val) => {
showConnectType.value = false;
emits('changeValue','inquiry_type');
showProduct.value = false;
emits('changeValue','product_id');
showManjian.value = false;
emits('changeValue','with_amount');
showMinNumber.value = false;
emits('changeValue','min_usable_number');
if (val == 1) {
modalForm.coupon_type == 2 && (showManjian.value = true);
modalForm.coupon_type == 3 && (showMinNumber.value = true);
@@ -618,6 +634,7 @@ const changeScope = (val) => {
};
const changeObject = (val) => {
showDistributionDay.value = false;
emits('changeValue','distribution_with_day');
if (val == 4) {
showDistributionDay.value = true;
}
@@ -660,23 +677,23 @@ const onOk = (dateString, date) => {
}
});
};
const clearDate = () => {
valid_start_time.value = '';
valid_end_time.value = '';
emits('changeTimeRange', {
valid_start_time: '',
valid_end_time: '',
});
};
const changeStatus = () => {
showConnectType.value = false;
//emits('changeValue','inquiry_type');
showProduct.value = false;
//emits('changeValue','product_id');
showManjian.value = false;
//emits('changeValue','with_amount');
showMinNumber.value = false;
//emits('changeValue','min_usable_number');
showDistributionDay.value = false;
//emits('changeValue','distribution_with_day');
showTimeRange.value = false;
//clearDate();
showValidDay.value = false;
//emits('changeValue','valid_days');
};
const handleClose = () => {
emits('closeChange', (modalVisible.value = false));