优惠卷
This commit is contained in:
parent
0030ed0689
commit
628bfbb2f4
@ -490,7 +490,7 @@ import {
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail']);
|
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail','changeValue']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 是否显示
|
||||||
modalVisible: {
|
modalVisible: {
|
||||||
@ -556,6 +556,14 @@ const record_columns = [
|
|||||||
slotName: 'created_at',
|
slotName: 'created_at',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
const clearDate = () => {
|
||||||
|
valid_start_time.value = '';
|
||||||
|
valid_end_time.value = '';
|
||||||
|
emits('changeTimeRange', {
|
||||||
|
valid_start_time: '',
|
||||||
|
valid_end_time: '',
|
||||||
|
});
|
||||||
|
};
|
||||||
//关闭启用弹框
|
//关闭启用弹框
|
||||||
const closeChangeOk = () => {
|
const closeChangeOk = () => {
|
||||||
isVisible.value = false;
|
isVisible.value = false;
|
||||||
@ -579,7 +587,9 @@ const handleGetProduct = async (name = '', id = '') => {
|
|||||||
};
|
};
|
||||||
const changeType = (val) => {
|
const changeType = (val) => {
|
||||||
showManjian.value = false;
|
showManjian.value = false;
|
||||||
|
emits('changeValue','with_amount');
|
||||||
showMinNumber.value = false;
|
showMinNumber.value = false;
|
||||||
|
emits('changeValue','min_usable_number');
|
||||||
if (val == 2) {
|
if (val == 2) {
|
||||||
showManjian.value = true;
|
showManjian.value = true;
|
||||||
} else if (val == 3) {
|
} else if (val == 3) {
|
||||||
@ -588,7 +598,9 @@ const changeType = (val) => {
|
|||||||
};
|
};
|
||||||
const changeValidType = (val) => {
|
const changeValidType = (val) => {
|
||||||
showTimeRange.value = false;
|
showTimeRange.value = false;
|
||||||
|
clearDate();
|
||||||
showValidDay.value = false;
|
showValidDay.value = false;
|
||||||
|
emits('changeValue','valid_days');
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
showTimeRange.value = true;
|
showTimeRange.value = true;
|
||||||
if (modalForm.value.valid_start_time) {
|
if (modalForm.value.valid_start_time) {
|
||||||
@ -603,9 +615,13 @@ const changeValidType = (val) => {
|
|||||||
};
|
};
|
||||||
const changeScope = (val) => {
|
const changeScope = (val) => {
|
||||||
showConnectType.value = false;
|
showConnectType.value = false;
|
||||||
|
emits('changeValue','inquiry_type');
|
||||||
showProduct.value = false;
|
showProduct.value = false;
|
||||||
|
emits('changeValue','product_id');
|
||||||
showManjian.value = false;
|
showManjian.value = false;
|
||||||
|
emits('changeValue','with_amount');
|
||||||
showMinNumber.value = false;
|
showMinNumber.value = false;
|
||||||
|
emits('changeValue','min_usable_number');
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
modalForm.coupon_type == 2 && (showManjian.value = true);
|
modalForm.coupon_type == 2 && (showManjian.value = true);
|
||||||
modalForm.coupon_type == 3 && (showMinNumber.value = true);
|
modalForm.coupon_type == 3 && (showMinNumber.value = true);
|
||||||
@ -618,6 +634,7 @@ const changeScope = (val) => {
|
|||||||
};
|
};
|
||||||
const changeObject = (val) => {
|
const changeObject = (val) => {
|
||||||
showDistributionDay.value = false;
|
showDistributionDay.value = false;
|
||||||
|
emits('changeValue','distribution_with_day');
|
||||||
if (val == 4) {
|
if (val == 4) {
|
||||||
showDistributionDay.value = true;
|
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 = () => {
|
const changeStatus = () => {
|
||||||
showConnectType.value = false;
|
showConnectType.value = false;
|
||||||
|
//emits('changeValue','inquiry_type');
|
||||||
showProduct.value = false;
|
showProduct.value = false;
|
||||||
|
//emits('changeValue','product_id');
|
||||||
showManjian.value = false;
|
showManjian.value = false;
|
||||||
|
//emits('changeValue','with_amount');
|
||||||
showMinNumber.value = false;
|
showMinNumber.value = false;
|
||||||
|
//emits('changeValue','min_usable_number');
|
||||||
showDistributionDay.value = false;
|
showDistributionDay.value = false;
|
||||||
|
//emits('changeValue','distribution_with_day');
|
||||||
showTimeRange.value = false;
|
showTimeRange.value = false;
|
||||||
|
//clearDate();
|
||||||
showValidDay.value = false;
|
showValidDay.value = false;
|
||||||
|
//emits('changeValue','valid_days');
|
||||||
};
|
};
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emits('closeChange', (modalVisible.value = false));
|
emits('closeChange', (modalVisible.value = false));
|
||||||
|
|||||||
@ -122,7 +122,7 @@
|
|||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<couponDetail ref="couponChild" :modalVisible="modalVisible" :modalForm="modalForm" @closeChange="closeCouponDetail" @changeTimeRange="changeTimeRange" @freshDetail="handleDetail"></couponDetail>
|
<couponDetail ref="couponChild" :modalVisible="modalVisible" :modalForm="modalForm" @closeChange="closeCouponDetail" @changeTimeRange="changeTimeRange" @freshDetail="handleDetail" @changeValue="changeValue"></couponDetail>
|
||||||
|
|
||||||
<!-- 发放弹窗giveVisible-->
|
<!-- 发放弹窗giveVisible-->
|
||||||
<giveCouponModal ref="giveCouponChild" :giveVisible="giveVisible" @closeGiVe="closeGiVe" :id="give_coupon_id"> </giveCouponModal>
|
<giveCouponModal ref="giveCouponChild" :giveVisible="giveVisible" @closeGiVe="closeGiVe" :id="give_coupon_id"> </giveCouponModal>
|
||||||
@ -322,7 +322,9 @@ const isVisible=ref(false);
|
|||||||
modalForm.valid_end_time='';
|
modalForm.valid_end_time='';
|
||||||
modalForm.valid_type='';
|
modalForm.valid_type='';
|
||||||
modalForm.coupon_count=null;
|
modalForm.coupon_count=null;
|
||||||
|
modalForm.with_amount=null;
|
||||||
modalForm.desc='';
|
modalForm.desc='';
|
||||||
|
modalForm.coupon_price=null;
|
||||||
modalForm.is_reissuable_after_expire=0;
|
modalForm.is_reissuable_after_expire=0;
|
||||||
if(couponChild.value){
|
if(couponChild.value){
|
||||||
couponChild.value.changeStatus();
|
couponChild.value.changeStatus();
|
||||||
@ -332,6 +334,9 @@ const isVisible=ref(false);
|
|||||||
modalForm.valid_start_time=data.valid_start_time;
|
modalForm.valid_start_time=data.valid_start_time;
|
||||||
modalForm.valid_end_time=data.valid_end_time;
|
modalForm.valid_end_time=data.valid_end_time;
|
||||||
};
|
};
|
||||||
|
const changeValue=(type)=>{
|
||||||
|
modalForm[type]=null;
|
||||||
|
}
|
||||||
const cancelOk=()=>{
|
const cancelOk=()=>{
|
||||||
okVisible.value=false;
|
okVisible.value=false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user