新增添加优惠券页面

This commit is contained in:
gyq
2025-11-20 18:47:52 +08:00
parent 61447986c5
commit 05b9551126
10 changed files with 1062 additions and 14 deletions

View File

@@ -10,7 +10,10 @@
</view>
<view class="total-info">
<view class="item">
<text class="info">{{ item.giveNum }}</text>
<text class="info">
<template v-if="item.giveNum == -10086">无限</template>
<template v-else>{{ item.giveNum }}</template>
</text>
<text class="title">总发放</text>
</view>
<view class="item">
@@ -31,10 +34,10 @@
</view>
<view class="footer-wrap">
<view class="btn">
<u-button shape="circle">删除</u-button>
<u-button shape="circle" @click="emits('delete', item)">删除</u-button>
</view>
<view class="btn">
<u-button shape="circle" type="primary">编辑</u-button>
<u-button shape="circle" type="primary" @click="emits('editor', item)">编辑</u-button>
</view>
</view>
</view>
@@ -47,6 +50,8 @@ const props = defineProps({
default: {}
}
});
const emits = defineEmits(['delete', 'editor']);
</script>
<style scoped lang="scss">

View File

@@ -0,0 +1,52 @@
<template>
<view class="conetnt">
<div class="row">
<u-radio-group v-model="getType">
<u-radio :label="item.label" :name="item.value" v-for="item in emunList.getType" :key="item.value" :customStyle="style"></u-radio>
</u-radio-group>
</div>
<template v-if="getType == 'yes'">
<view class="row mt">
<text class="title">用户领取方式</text>
</view>
<div class="row">
<u-checkbox-group v-model="getMode">
<u-checkbox :label="item.label" :name="item.value" v-for="item in emunList.getMode" :key="item.value" :customStyle="style"></u-checkbox>
</u-checkbox-group>
</div>
</template>
</view>
</template>
<script setup>
import { emunList } from '@/utils/couponUtils.js';
const style = {
marginRight: '20px'
};
const getType = defineModel('getType', {
type: String,
default: 'no'
});
const getMode = defineModel('getMode', {
type: Array,
default: ['eat']
});
</script>
<style scoped lang="scss">
.conetnt {
.row {
&.mt {
margin-top: 28upx;
padding-bottom: 10upx;
}
.title {
color: #303133;
font-size: 30upx;
}
}
}
</style>