Explorar o código

增加核销数统计页

asd123a20 %!s(int64=2) %!d(string=hai) anos
pai
achega
02edb7c5e7
Modificáronse 2 ficheiros con 84 adicións e 1 borrados
  1. 10 1
      src/api/stat/index.js
  2. 74 0
      src/views/stat/writeOff/index.vue

+ 10 - 1
src/api/stat/index.js

@@ -88,4 +88,13 @@ export function redeemCountTyType(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 核销数统计查询
+export function writeOffQuery(query) {
+  return request({
+    url: '/discount/stat/write-off-count',
+    method: 'get',
+    params: query
+  })
+}

+ 74 - 0
src/views/stat/writeOff/index.vue

@@ -0,0 +1,74 @@
+<template>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
+        <el-form-item label="商户名称" prop="sellers">
+          <el-input v-model="queryParams.discountSeller" placeholder="请输入商户名称" clearable @keyup.enter.native="handleQuery"/>
+        </el-form-item>
+        <el-form-item label="发行社区" prop="community">
+          <el-select v-model="queryParams.community" placeholder="请选择">
+            <el-option v-for="dict in dict.type.community" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" 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-table v-loading="loading" :data="writeOffList" show-summary>
+        <el-table-column label="代金劵名称" align="center" prop="name" />
+        <el-table-column label="兑换数" align="center" prop="collectCount" />
+        <el-table-column label="核销数" align="center" prop="writeOffCount" />
+        <el-table-column label="核销金额" align="center" prop="writeOffAmount" />
+      </el-table>
+  
+      <pagination  v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+    </div>
+  </template>
+  
+  <script>
+  import { writeOffQuery } from "@/api/stat/index";
+  export default {
+    name: "writeOff",
+    dicts: ['community'],
+    data() {
+      return {
+        // 遮罩层
+        loading: false,
+        // 总条数
+        total: 0,
+        // 活动管理表格数据
+        writeOffList: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+        }
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询活动管理列表 */
+      async getList() {
+        this.loading = true;
+        const res = await writeOffQuery(this.queryParams);
+        this.writeOffList = res.data;
+        this.total = res.total;
+        this.loading = false;
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+    }
+  };
+  </script>
+