|
@@ -1,110 +0,0 @@
|
|
|
-<template>
|
|
|
|
|
- <div class="app-container">
|
|
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
|
- <el-form-item label="关键词" prop="keyword">
|
|
|
|
|
- <el-input v-model="queryParams.keyword" placeholder="请输入关键词" clearable size="small"
|
|
|
|
|
- @keyup.enter.native="handleQuery" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
|
- v-hasPermi="['store:storeCouponIssue:add']">新增</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple"
|
|
|
|
|
- @click="handleDelete" v-hasPermi="['store:storeCouponIssue:remove']">删除</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
|
|
- v-hasPermi="['store:storeCouponIssue:export']">导出</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
|
|
|
|
|
- <el-table-column type="selection" width="50" align="center" />
|
|
|
|
|
- <el-table-column label="ID" align="center" prop="id" />
|
|
|
|
|
- <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="['store:storeCouponIssue:edit']">修改</el-button>
|
|
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
|
|
- v-hasPermi="['store:storeCouponIssue:remove']">删除</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
|
|
|
- :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
- </div>
|
|
|
|
|
-</template>
|
|
|
|
|
-
|
|
|
|
|
-<script>
|
|
|
|
|
-import { listHisstoreStoreinstandiscountissue, getHisstoreStoreinstandiscountissue, delHisstoreStoreinstandiscountissue, addHisstoreStoreinstandiscountissue, updateHisstoreStoreinstandiscountissue, exportHisstoreStoreinstandiscountissue } from "@/api/hisStore/storeInstanDiscountIssue";
|
|
|
|
|
-
|
|
|
|
|
-export default {
|
|
|
|
|
- name: "HisstoreStoreinstandiscountissue",
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- loading: true,
|
|
|
|
|
- ids: [],
|
|
|
|
|
- single: true,
|
|
|
|
|
- multiple: true,
|
|
|
|
|
- showSearch: true,
|
|
|
|
|
- total: 0,
|
|
|
|
|
- list: [],
|
|
|
|
|
- queryParams: {
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
- keyword: null
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- created() {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- getList() {
|
|
|
|
|
- this.loading = true;
|
|
|
|
|
- listHisstoreStoreinstandiscountissue(this.queryParams).then(response => {
|
|
|
|
|
- this.list = response.rows;
|
|
|
|
|
- this.total = response.total;
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- handleQuery() {
|
|
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
|
|
- this.getList();
|
|
|
|
|
- },
|
|
|
|
|
- resetQuery() {
|
|
|
|
|
- this.resetForm("queryForm");
|
|
|
|
|
- this.handleQuery();
|
|
|
|
|
- },
|
|
|
|
|
- handleSelectionChange(selection) {
|
|
|
|
|
- this.ids = selection.map(item => item.id);
|
|
|
|
|
- this.single = selection.length !== 1;
|
|
|
|
|
- this.multiple = !selection.length;
|
|
|
|
|
- },
|
|
|
|
|
- handleAdd() {
|
|
|
|
|
- this.$message.info("新增功能开发中");
|
|
|
|
|
- },
|
|
|
|
|
- handleUpdate(row) {
|
|
|
|
|
- this.$message.info("修改功能开发中");
|
|
|
|
|
- },
|
|
|
|
|
- handleDelete(row) {
|
|
|
|
|
- this.$modal.confirm("是否确认删除?").then(() => {
|
|
|
|
|
- return delHisstoreStoreinstandiscountissue(row.id || this.ids);
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
- },
|
|
|
|
|
- handleExport() {
|
|
|
|
|
- this.download("hisStore/storeInstanDiscountIssue/export", { ...this.queryParams }, `已发布立减金券.xlsx`);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-</script>
|
|
|