优化修复问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="优惠券" v-model="visible" width="1200px">
|
||||
<el-dialog title="优惠券" v-model="visible" width="1200px" @closed="resetHandle">
|
||||
<el-form :inline="true" :model="form">
|
||||
<el-form-item label="券名称">
|
||||
<el-input v-model="form.name" placeholder="请输入券名称"></el-input>
|
||||
@@ -54,28 +54,32 @@
|
||||
|
||||
<script setup>
|
||||
import couponApi from "@/api/market/coupon";
|
||||
|
||||
import { ref, reactive } from "vue";
|
||||
|
||||
const status = reactive([
|
||||
{ label: "全部", value: "", type: 'info' },
|
||||
{ label: "未使用", value: 0, type: 'warning' },
|
||||
{ label: "已使用", value: 1, type: 'info' },
|
||||
{ label: "已过期", value: 2, type: 'info' },
|
||||
]);
|
||||
|
||||
const visible = ref(false);
|
||||
const form = reactive({
|
||||
status: 0,
|
||||
status: '',
|
||||
name: "",
|
||||
date: "",
|
||||
shopUserId: "",
|
||||
page: 1,
|
||||
});
|
||||
|
||||
const tableData = ref([]);
|
||||
|
||||
const pagination = reactive({
|
||||
total: 0,
|
||||
size: 10,
|
||||
page: 1,
|
||||
});
|
||||
|
||||
function open(data) {
|
||||
console.log(data);
|
||||
form.shopUserId = data.id;
|
||||
@@ -83,6 +87,16 @@ function open(data) {
|
||||
visible.value = true;
|
||||
getList();
|
||||
}
|
||||
|
||||
function resetHandle() {
|
||||
form.status = '';
|
||||
form.name = "";
|
||||
form.date = "";
|
||||
form.shopUserId = "";
|
||||
pagination.page = 1;
|
||||
tableData.value = [];
|
||||
}
|
||||
|
||||
function close() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user