1.优惠券
This commit is contained in:
parent
5170ee7572
commit
289f64deff
1
src/assets/icons/svg/claim.svg
Normal file
1
src/assets/icons/svg/claim.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723107210782" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4529" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M520.955522 449.823088H406.836582V387.390305h114.11894c13.305347 0 24.563718-11.258371 24.563718-24.563718 0-13.305347-10.746627-24.563718-24.563718-24.563718H428.329835l100.301849-100.30185c3.070465-3.070465 5.629185-7.164418 6.652674-11.770114 3.582209-13.305347-4.605697-26.610695-17.399301-30.192904h-0.511744c-8.187906-2.046977-17.3993 0.511744-23.028485 6.652674l-107.466267 107.466267-107.466267-107.466267c-4.605697-4.605697-10.746627-6.652674-16.887556-6.652674-6.14093 0-12.281859 2.558721-16.887557 6.652674-9.723138 9.211394-10.234883 25.075462-0.511744 34.7986L345.427286 337.751124H243.590205c-13.305347 0-24.563718 11.258371-24.563718 24.563719 0 13.305347 10.746627 24.563718 24.563718 24.563718h114.11894v62.432783H243.590205c-13.305347 0-24.563718 11.258371-24.563718 24.563718s10.746627 24.563718 24.563718 24.563719h114.11894v86.996501c0 13.305347 10.746627 24.563718 24.563719 24.563718s24.563718-11.258371 24.563718-24.563718v-86.996501h114.11894c13.305347 0 24.563718-11.258371 24.563718-24.563719s-10.746627-24.051974-24.563718-24.051974z" p-id="4530" fill="#bfbfbf"></path><path d="M484.109945 991.248376c0-17.911044-14.328836-32.23988-32.23988-32.23988H151.988006c-48.615692 0-87.508246-39.404298-87.508246-88.01999v-157.617192l2.046977-2.046976c49.127436-47.08046 77.785107-113.607196 77.785107-182.18091 0-68.573713-28.145927-134.588706-77.785107-182.180909l-2.558721-2.558721V152.49975c0-48.615692 39.404298-88.01999 87.508246-88.01999h719.512244c48.615692 0 87.508246 39.404298 87.508246 88.01999v192.415792l-2.558721 2.046977c-35.310345 33.775112-59.362319 76.249875-70.62069 122.306846-5.117441 20.469765 10.234883 39.916042 31.216392 39.916042 14.84058 0 27.634183-9.723138 31.216392-24.051974 9.211394-39.404298 31.216392-74.714643 62.944528-100.813593 7.164418-6.14093 11.770115-15.352324 11.770115-25.075462V152.49975C1023.488256 68.573713 955.426287 0 871.50025 0H151.988006C68.061969 0 0 68.573713 0 152.49975v206.744628c0 9.723138 4.093953 18.422789 11.770115 24.563718 43.498251 35.822089 68.573713 88.531734 68.061969 144.823588 0 56.291854-25.075462 109.001499-68.061969 144.823588-7.164418 6.14093-11.770115 15.352324-11.770115 25.075463v171.946027C0 954.914543 68.061969 1023.488256 151.988006 1023.488256h299.882059c17.911044 0 32.23988-14.328836 32.23988-32.23988zM987.154423 712.85957c9.211394 0 17.911044 3.582209 25.075462 9.723139 14.84058 13.817091 15.352324 36.845577 1.535232 51.686157l-221.585207 236.937531c-4.093953 4.093953-8.69965 7.164418-14.84058 9.211394-5.117441 2.046977-10.234883 3.582209-14.840579 3.582209-9.723138 0-18.934533-3.582209-25.587207-10.746627l-106.954523-106.442778c-6.652674-6.652674-10.746627-15.864068-10.746626-25.587207s3.582209-18.934533 10.746626-25.587206c6.652674-6.652674 15.864068-10.746627 25.587207-10.746627s18.934533 3.582209 25.587206 10.746627l79.32034 78.808596 2.046977 2.046976 2.046976-2.046976 196.509745-209.815093c6.652674-7.676162 15.864068-11.770115 26.098951-11.770115" p-id="4531" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 3.3 KiB |
|
@ -40,7 +40,7 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:claimLog:add']"
|
||||
>新增</el-button>
|
||||
>领取</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -79,9 +79,9 @@
|
|||
|
||||
<el-table v-loading="loading" :data="claimLogList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="领取id" align="center" prop="claimId" />
|
||||
<el-table-column label="区域" align="center" prop="areaId" />
|
||||
<el-table-column label="用户" align="center" prop="userId" />
|
||||
<!-- <el-table-column label="领取id" align="center" prop="claimId" />-->
|
||||
<el-table-column label="区域" align="center" prop="areaName" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
<el-table-column label="优惠券" align="center" prop="couponId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
@ -102,7 +102,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
@ -112,18 +112,59 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改优惠券领取记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="区域" prop="areaId">
|
||||
<el-input v-model="form.areaId" placeholder="请输入区域" />
|
||||
</el-form-item>
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券" prop="couponId">
|
||||
<el-input v-model="form.couponId" placeholder="请输入优惠券" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="couponList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="优惠券id" align="center" prop="couponId" />-->
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_coupon_type" :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="限制次数" align="center" prop="limitNum">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_coupon_time_limit" :value="scope.row.limitNum"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣比例" align="center" prop="discountPercent" :formatter="formatDiscountPercent"/>
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
<el-table-column label="抵扣金额" align="center" prop="discountAmount" :formatter="formatDiscountAmount"/>
|
||||
<el-table-column label="有效时间" align="center" prop="expirationTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.expirationTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_coupon_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:coupon:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:coupon:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
|
@ -134,9 +175,11 @@
|
|||
|
||||
<script>
|
||||
import { listClaimLog, getClaimLog, delClaimLog, addClaimLog, updateClaimLog } from "@/api/system/claimLog";
|
||||
import { listCoupon } from '@/api/system/coupon'
|
||||
|
||||
export default {
|
||||
name: "ClaimLog",
|
||||
dicts: ['et_coupon_type', 'et_coupon_status','et_coupon_time_limit'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -153,6 +196,8 @@ export default {
|
|||
total: 0,
|
||||
// 优惠券领取记录表格数据
|
||||
claimLogList: [],
|
||||
// 优惠券表格数据
|
||||
couponList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
@ -221,7 +266,10 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加优惠券领取记录";
|
||||
this.title = "领取优惠券";
|
||||
listCoupon(this.queryParams).then(response => {
|
||||
this.couponList = response.rows;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="用户" prop="userName">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.userName"-->
|
||||
<!-- placeholder="请输入用户"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
|
@ -104,7 +104,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="折扣比例" align="center" prop="discountPercent" :formatter="formatDiscountPercent"/>
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
<!-- <el-table-column label="用户" align="center" prop="userName" />-->
|
||||
<el-table-column label="抵扣金额" align="center" prop="discountAmount" :formatter="formatDiscountAmount"/>
|
||||
<el-table-column label="有效时间" align="center" prop="expirationTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
|
@ -163,9 +163,9 @@
|
|||
<el-form-item label="运营区" prop="areaId">
|
||||
<el-input v-model="form.areaId" placeholder="请输入运营区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="用户" prop="userId">-->
|
||||
<!-- <el-input v-model="form.userId" placeholder="请输入用户" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="抵扣金额" prop="discountAmount">
|
||||
<el-input v-model="form.discountAmount" placeholder="请输入抵扣金额" />
|
||||
</el-form-item>
|
||||
|
@ -228,9 +228,9 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userId: [
|
||||
{ required: true, message: "用户不能为空", trigger: "blur" }
|
||||
],
|
||||
// userId: [
|
||||
// { required: true, message: "用户不能为空", trigger: "blur" }
|
||||
// ],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user