Browse Source

设置全局组织机构管理

MS-QJVSRANLTYEO\Administrator 4 years ago
parent
commit
ae4f4301a7

+ 53 - 0
Yijia-SaaS/yijia-ui/src/api/coupon/info.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询优惠劵列表
+export function listInfo(query) {
+  return request({
+    url: '/coupon/info/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠劵详细
+export function getInfo(id) {
+  return request({
+    url: '/coupon/info/' + id,
+    method: 'get'
+  })
+}
+
+// 新增优惠劵
+export function addInfo(data) {
+  return request({
+    url: '/coupon/info',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改优惠劵
+export function updateInfo(data) {
+  return request({
+    url: '/coupon/info',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除优惠劵
+export function delInfo(id) {
+  return request({
+    url: '/coupon/info/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出优惠劵
+export function exportInfo(query) {
+  return request({
+    url: '/coupon/info/export',
+    method: 'get',
+    params: query
+  })
+}

+ 71 - 0
Yijia-SaaS/yijia-ui/src/api/customer/card.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡(储蓄卡)列表
+export function listCard(query) {
+  return request({
+    url: '/customer/card/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡(储蓄卡)列表
+export function listSum(query) {
+  return request({
+    url: '/customer/card/listSum',
+    method: 'get',
+    params: query
+  })
+}
+// 查询客户电子会员卡(储蓄卡)列表
+export function selectCard(query) {
+  return request({
+    url: '/customer/card/selectCard',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询客户电子会员卡(储蓄卡)详细
+export function getCard(id) {
+  return request({
+    url: '/customer/card/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡(储蓄卡)
+export function addCard(data) {
+  return request({
+    url: '/customer/card',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡(储蓄卡)
+export function updateCard(data) {
+  return request({
+    url: '/customer/card',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡(储蓄卡)
+export function delCard(id) {
+  return request({
+    url: '/customer/card/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡(储蓄卡)
+export function exportCard(query) {
+  return request({
+    url: '/customer/card/export',
+    method: 'get',
+    params: query
+  })
+}

+ 19 - 0
Yijia-SaaS/yijia-ui/src/api/customer/cardReport.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员汇总数据
+export function listSum(query) {
+  return request({
+    url: '/customer/cardsetting/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员汇总数据
+export function amtList(query) {
+  return request({
+    url: '/customer/cardsetting/list',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 0
Yijia-SaaS/yijia-ui/src/api/customer/cardSettingDetail.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡充值优惠设置明细列表
+export function listDetail(query) {
+  return request({
+    url: '/customer/detail/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listDetailInfo(query) {
+  return request({
+    url: '/customer/detail/listDetailInfo',
+    method: 'get',
+    params: query
+  })
+}
+// 查询客户电子会员卡充值优惠设置明细详细
+export function getDetail(id) {
+  return request({
+    url: '/customer/detail/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡充值优惠设置明细
+export function addDetail(data) {
+  return request({
+    url: '/customer/detail',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡充值优惠设置明细
+export function updateDetail(data) {
+  return request({
+    url: '/customer/detail',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡充值优惠设置明细
+export function delDetail(id) {
+  return request({
+    url: '/customer/detail/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡充值优惠设置明细
+export function exportDetail(query) {
+  return request({
+    url: '/customer/detail/export',
+    method: 'get',
+    params: query
+  })
+}

+ 81 - 0
Yijia-SaaS/yijia-ui/src/api/customer/consumption.js

@@ -0,0 +1,81 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡消费记录列表
+export function listConsumption(query) {
+  return request({
+    url: '/customer/consumption/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡消费记录详细
+export function getConsumption(id) {
+  return request({
+    url: '/customer/consumption/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡消费记录
+export function addConsumption(data) {
+  return request({
+    url: '/customer/consumption',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡消费记录
+export function updateConsumption(data) {
+  return request({
+    url: '/customer/consumption',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡消费记录
+export function delConsumption(id) {
+  return request({
+    url: '/customer/consumption/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡消费记录
+export function exportConsumption(query) {
+  return request({
+    url: '/customer/consumption/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡消费记录列表
+export function xfAmtQuery(query) {
+  return request({
+    url: '/customer/consumption/xfAmtQuery',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询客户电子会员卡消费记录列表
+export function listXdata(query) {
+  return request({
+    url: '/customer/consumption/listXdata',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function listQydataXF(query) {
+  return request({
+    url: '/customer/consumption/listQydataXF',
+    method: 'get',
+    params: query
+  })
+}

+ 79 - 0
Yijia-SaaS/yijia-ui/src/api/customer/recharge.js

@@ -0,0 +1,79 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡充值记录列表
+export function listRecharge(query) {
+  return request({
+    url: '/customer/recharge/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡充值记录详细
+export function getRecharge(id) {
+  return request({
+    url: '/customer/recharge/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡充值记录
+export function addRecharge(data) {
+  return request({
+    url: '/customer/recharge',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡充值记录
+export function updateRecharge(data) {
+  return request({
+    url: '/customer/recharge',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡充值记录
+export function delRecharge(id) {
+  return request({
+    url: '/customer/recharge/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡充值记录
+export function exportRecharge(query) {
+  return request({
+    url: '/customer/recharge/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡充值记录列表
+export function czAmtQuery(query) {
+  return request({
+    url: '/customer/recharge/czAmtQuery',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listQydataCZ(query) {
+  return request({
+    url: '/customer/recharge/listQydataCZ',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡(储蓄卡)列表
+export function selectCardDetail(query) {
+  return request({
+    url: '/customer/recharge/selectCardDetail',
+    method: 'get',
+    params: query
+  })
+}

+ 42 - 0
Yijia-SaaS/yijia-ui/src/views/coupon/common/couponTable.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="tabCoupone">
+    <el-tabs v-model="activeName" >
+      <el-tab-pane label="所有劵" name="some" :key="'some'">
+        <child1></child1>
+      </el-tab-pane>
+      <el-tab-pane label="待发劵" name="daifa" :key="'daifa'">
+        <child2></child2>
+      </el-tab-pane>
+      <el-tab-pane label="已发放" name="yifa" :key="'yifa'">
+        <child3></child3>
+      </el-tab-pane>
+      <el-tab-pane label="已下线" name="xiaxian" :key="'xiaxian'">
+        <child3></child3>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+  import tabChild1 from '../info/index.vue'
+  // import tabChild2 from '../pay/index.vue'
+  // import tabChild3 from '../manage/index.vue'
+  export default {
+    name: 'tabCoupone',
+    components:{
+      child1:tabChild1
+    },
+    data() {
+      return {
+        activeName: 'info'
+      };
+    },
+    methods: {
+    }
+  };
+</script>
+<style>
+  .tabZujian {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+</style>

+ 333 - 0
Yijia-SaaS/yijia-ui/src/views/coupon/info/index.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="优惠劵类别" prop="couponType">
+        <el-select v-model="queryParams.couponType" placeholder="请选择优惠劵类型 1现金劵,2折扣券,3兑换券" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      
+      <el-form-item label="油品名称" prop="oilName">
+        <el-input
+          v-model="queryParams.oilName"
+          placeholder="请输入油品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发放状态" prop="grantStatus">
+        <el-select v-model="queryParams.grantStatus" placeholder="请选择发放状态" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </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-button  type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['coupon:info:add']">创建优惠劵</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" v-if="false"/>
+      <el-table-column label="优惠劵ID" align="center" prop="couponId"  />
+      <el-table-column label="优惠劵名称" align="center" prop="couponName" />
+      <el-table-column label="油品名称" align="center" prop="oilName" />
+      <el-table-column label="优惠劵类型" align="center" prop="couponType" v-if="false" />
+      <el-table-column label="使用门槛" align="center" prop="useDiscountType" />
+      <el-table-column label="1 柴油,2 汽油" align="center" prop="oilType" v-if="false" />
+      <el-table-column label="面值" align="center" prop="couponAmt" />
+      <el-table-column label="优惠劵数量" align="center" prop="couponNum" />
+      <el-table-column label="有效时间类型" align="center" prop="effectiveTimeType" v-if="false"  />
+      <el-table-column label="固定时间-有效开始时间" align="center" prop="effectiveTimeStart" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.effectiveTimeStart, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="固定时间-有效结束时间" align="center" prop="effectiveTimeEnd" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.effectiveTimeEnd, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="有效天数" align="center" prop="effectiveDayNum" />
+      <el-table-column label="优惠劵领取数量" align="center" prop="couponReceiveNum" />
+      <el-table-column label="有效状态,1未生效" align="center" prop="status" />
+      <!-- <el-table-column label="发放平台,1.微信 2支付宝" align="center" prop="openPlatform" /> -->
+      <el-table-column label="发放状态" align="center" prop="grantStatus" />
+      <el-table-column label="创建人" align="center" prop="createBy" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <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="['coupon:info:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['coupon:info: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"
+    />
+
+    <!-- 添加或修改优惠劵对话框 -->
+    <el-dialog :title="title" :visible.sync="open"  append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+        <el-form-item label="优惠劵ID" prop="couponId">
+          <el-input v-model="form.couponId" placeholder="请输入优惠劵ID" />
+        </el-form-item>
+        <el-form-item label="优惠劵名称" prop="couponName">
+          <el-input v-model="form.couponName" placeholder="请输入优惠劵名称" />
+        </el-form-item>
+        <el-form-item label="优惠劵类型" prop="couponType">
+          <el-select v-model="form.couponType" placeholder="请选择优惠劵类型 1现金劵,2折扣券,3兑换券">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="油品" prop="oilName">
+          <!-- <el-input v-model="form.oilName" placeholder="请输入油品" /> -->
+        </el-form-item>
+        <el-form-item label="使用门槛类型" prop="useDiscountType">
+          <el-select v-model="form.useDiscountType" placeholder="请选择优惠劵使用门槛类型。 1.无门槛,2满减劵,3折扣">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="优惠劵面值" prop="couponAmt">
+          <el-input v-model="form.couponAmt" placeholder="请输入优惠劵面值" />元
+        </el-form-item>
+        <el-form-item label="优惠劵数量" prop="couponNum">
+          <el-input v-model="form.couponNum" placeholder="请输入优惠劵数量" />张
+        </el-form-item>
+        <el-form-item label="有效时间类型" prop="effectiveTimeType">
+          <el-select v-model="form.effectiveTimeType" placeholder="请选择有效时间类型 1固定时间,2领取后x天内有效">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="固定时间" >
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.effectiveTimeStart"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择固定时间-有效开始时间">
+          </el-date-picker>
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.effectiveTimeEnd"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择固定时间-有效结束时间">
+          </el-date-picker>
+        </el-form-item>
+   
+        <el-form-item label="有效天数" prop="effectiveDayNum">
+          <el-input v-model="form.effectiveDayNum" placeholder="请输入有效天数" />
+        </el-form-item>
+        <el-form-item label="每人限领取数量" prop="couponReceiveNum">
+          <el-input v-model="form.couponReceiveNum" placeholder="请输入优惠劵领取数量" />
+        </el-form-item>
+        <el-form-item label="发放平台,1.微信 2支付宝" prop="openPlatform">
+          <el-input v-model="form.openPlatform" placeholder="请输入发放平台,1.微信 2支付宝" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/coupon/info";
+
+export default {
+  name: "Info",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 优惠劵表格数据
+      infoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        couponId: null,
+        couponName: null,
+        couponType: null,
+        useDiscountType: null,
+        oilName: null,
+        oilType: null,
+        couponAmt: null,
+        couponNum: null,
+        effectiveTimeType: null,
+        effectiveTimeStart: null,
+        effectiveTimeEnd: null,
+        effectiveDayNum: null,
+        couponReceiveNum: null,
+        openPlatform: null,
+        grantStatus: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询优惠劵列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then(response => {
+        this.infoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        couponId: null,
+        couponName: null,
+        couponType: null,
+        useDiscountType: null,
+        oilName: null,
+        oilType: null,
+        couponAmt: null,
+        couponNum: null,
+        effectiveTimeType: null,
+        effectiveTimeStart: null,
+        effectiveTimeEnd: null,
+        effectiveDayNum: null,
+        couponReceiveNum: null,
+        openPlatform: null,
+        grantStatus: "0",
+        status: "0",
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    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.reset();
+      this.open = true;
+      this.title = "添加优惠劵";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getInfo(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改优惠劵";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateInfo(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addInfo(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除优惠劵编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delInfo(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有优惠劵数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportInfo(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 414 - 0
Yijia-SaaS/yijia-ui/src/views/customer/card/index.vue

@@ -0,0 +1,414 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="微信用户唯一标识unionId" prop="unionId">
+        <el-input
+          v-model="queryParams.unionId"
+          placeholder="请输入微信用户唯一标识unionId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="公众号openId" prop="blogOpenid">
+        <el-input
+          v-model="queryParams.blogOpenid"
+          placeholder="请输入公众号openId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="小程序openId" prop="minaOpenid">
+        <el-input
+          v-model="queryParams.minaOpenid"
+          placeholder="请输入小程序openId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="会员编号" prop="customerNo">
+        <el-input
+          v-model="queryParams.customerNo"
+          placeholder="请输入会员编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户名" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="用户手机号" prop="mobilePhone">
+        <el-input
+          v-model="queryParams.mobilePhone"
+          placeholder="请输入用户手机号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="电子储蓄卡余额" prop="amt">
+        <el-input
+          v-model="queryParams.amt"
+          placeholder="请输入电子储蓄卡余额"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="电子会员卡类型:1,汽油;2.柴油;" prop="cardOilsType">
+        <el-select v-model="queryParams.cardOilsType" placeholder="请选择电子会员卡类型:1,汽油;2.柴油;" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="油站ID" prop="stationId">
+        <el-input
+          v-model="queryParams.stationId"
+          placeholder="请输入油站ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油站名称" prop="stationName">
+        <el-input
+          v-model="queryParams.stationName"
+          placeholder="请输入油站名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="最近使用时间" prop="recentlyTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.recentlyTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择最近使用时间">
+        </el-date-picker>
+      </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="['customer:card:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['customer:card:edit']"
+        >修改</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="['customer:card:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['customer:card:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="cardList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="微信用户唯一标识unionId" align="center" prop="unionId" />
+      <el-table-column label="公众号openId" align="center" prop="blogOpenid" />
+      <el-table-column label="小程序openId" align="center" prop="minaOpenid" />
+      <el-table-column label="会员编号" align="center" prop="customerNo" />
+      <el-table-column label="客户名" align="center" prop="customerName" />
+      <el-table-column label="用户手机号" align="center" prop="mobilePhone" />
+      <el-table-column label="电子储蓄卡余额" align="center" prop="amt" />
+      <el-table-column label="电子会员卡类型:1,汽油;2.柴油;" align="center" prop="cardOilsType" />
+      <el-table-column label="油站ID" align="center" prop="stationId" />
+      <el-table-column label="油站名称" align="center" prop="stationName" />
+      <el-table-column label="最近使用时间" align="center" prop="recentlyTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.recentlyTime, '{y}-{m}-{d}') }}</span>
+        </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="['customer:card:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['customer:card: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"
+    />
+
+    <!-- 添加或修改客户电子会员卡(储蓄卡)对话框 -->
+    <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="微信用户唯一标识unionId" prop="unionId">
+          <el-input v-model="form.unionId" placeholder="请输入微信用户唯一标识unionId" />
+        </el-form-item>
+        <el-form-item label="公众号openId" prop="blogOpenid">
+          <el-input v-model="form.blogOpenid" placeholder="请输入公众号openId" />
+        </el-form-item>
+        <el-form-item label="小程序openId" prop="minaOpenid">
+          <el-input v-model="form.minaOpenid" placeholder="请输入小程序openId" />
+        </el-form-item>
+        <el-form-item label="会员编号" prop="customerNo">
+          <el-input v-model="form.customerNo" placeholder="请输入会员编号" />
+        </el-form-item>
+        <el-form-item label="客户名" prop="customerName">
+          <el-input v-model="form.customerName" placeholder="请输入客户名" />
+        </el-form-item>
+        <el-form-item label="用户手机号" prop="mobilePhone">
+          <el-input v-model="form.mobilePhone" placeholder="请输入用户手机号" />
+        </el-form-item>
+        <el-form-item label="电子储蓄卡余额" prop="amt">
+          <el-input v-model="form.amt" placeholder="请输入电子储蓄卡余额" />
+        </el-form-item>
+        <el-form-item label="电子会员卡类型:1,汽油;2.柴油;" prop="cardOilsType">
+          <el-select v-model="form.cardOilsType" placeholder="请选择电子会员卡类型:1,汽油;2.柴油;">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="油站ID" prop="stationId">
+          <el-input v-model="form.stationId" placeholder="请输入油站ID" />
+        </el-form-item>
+        <el-form-item label="油站名称" prop="stationName">
+          <el-input v-model="form.stationName" placeholder="请输入油站名称" />
+        </el-form-item>
+        <el-form-item label="最近使用时间" prop="recentlyTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.recentlyTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择最近使用时间">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCard, getCard, delCard, addCard, updateCard, exportCard } from "@/api/customer/card";
+
+export default {
+  name: "Card",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡(储蓄卡)表格数据
+      cardList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        unionId: null,
+        blogOpenid: null,
+        minaOpenid: null,
+        customerNo: null,
+        customerName: null,
+        mobilePhone: null,
+        amt: null,
+        cardOilsType: null,
+        stationId: null,
+        stationName: null,
+        recentlyTime: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询客户电子会员卡(储蓄卡)列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.stationId=this.$store.selectDeptId;
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      listCard(this.queryParams).then(response => {
+        this.cardList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        unionId: null,
+        blogOpenid: null,
+        minaOpenid: null,
+        customerNo: null,
+        customerName: null,
+        mobilePhone: null,
+        amt: null,
+        cardOilsType: null,
+        stationId: null,
+        stationName: null,
+        createTime: null,
+        recentlyTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    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.reset();
+      this.open = true;
+      this.title = "添加客户电子会员卡(储蓄卡)";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCard(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改客户电子会员卡(储蓄卡)";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCard(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCard(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除客户电子会员卡(储蓄卡)编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCard(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户电子会员卡(储蓄卡)数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportCard(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 185 - 0
Yijia-SaaS/yijia-ui/src/views/customer/cardSettingDetail/index.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="app-container">
+    <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="" prop="presentAmt">
+        <el-input
+          v-model="queryParams.presentAmt"
+          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-table v-loading="loading" :data="detailList" >
+      <el-table-column label="电子会员卡充值规则" align="center" prop="parentId" >
+        <template slot-scope="scope">
+          <span v-show="scope.row.oilName=='1'">汽油</span>
+          <span v-show="scope.row.oilName=='2'">柴油</span>
+          <span>充值金额大于等于{{scope.row.discountAmtStart}}元小于{{scope.row.discountAmtEnd}}元赠送</span>
+          <span v-show="scope.row.settingRuleType==1">{{scope.row.presentAmt}}元</span>
+          <span v-show="scope.row.settingRuleType==2">{{scope.row.presentAmt}}%</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="已开通油卡类型" align="center" prop="cardOilsType" :formatter="cardOilsTypeFormatter" width="120px;"/>
+      <el-table-column label="充值活动设置" align="center" prop="discountTimeSetting" :formatter="discountTimeSettingFormatter" width="100px;"/>
+      <el-table-column label="周期类型" align="center" prop="discountTimeType" :formatter="discountTimeTypeFormatter" width="90px;"/>
+      <el-table-column label="赠送比例" align="center" width="90px;" >
+        <template slot-scope="scope1">
+           <span >{{scope1.row.presentScale}}</span>
+           <span v-show="scope1.row.presentScale!=null&&scope1.row.presentScale!=''">%</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="电子卡支付产生积分可享受倍数" align="center" width="90px;" >
+        <template slot-scope="scope2">
+           <span >{{scope2.row.enjoyIntegralMultiple}}</span>
+           <span v-show="scope2.row.enjoyIntegralMultiple!=null&&scope2.row.enjoyIntegralMultiple!=''">倍</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否叠加优惠劵" align="center" prop="isDiscountCoupon" :formatter="isDiscountCouponFormatter" width="90px;"/>
+      <el-table-column label="是否叠加营销活动" align="center" prop="isMarket" :formatter="isMarketFormatter" width="90px;"/>
+      <el-table-column label="是否叠加等级设置" align="center" prop="isGradeSetting" :formatter="isGradeSettingFormatter" width="90px;"/>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listDetailInfo} from "@/api/customer/cardSettingDetail";
+export default {
+  name: "Detail",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值优惠设置明细表格数据
+      detailList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        parentId: null,
+        settingRuleType: null,
+        discountAmtTerm: null,
+        presentAmt: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    cardOilsTypeFormatter(row, column){
+      if(row.cardOilsType === '1'){
+        return '汽油卡'
+      }else if(row.cardOilsType === '2'){
+        return '柴油卡'
+      }else if(row.cardOilsType === '1,2'){
+        return '汽油卡,柴油卡'
+      }
+    },
+    discountTimeSettingFormatter(row, column){
+      if(row.discountTimeSetting === '1'){
+        return '开启'
+      }else if(row.discountTimeSetting === '2'){
+        return '关闭'
+      }
+    },
+    discountTimeTypeFormatter(row, column){
+      if(row.discountTimeSetting === '1'){
+        return '每周指定日'
+      }else if(row.discountTimeSetting === '2'){
+        return '每月指定日'
+      }else if(row.discountTimeSetting === '2'){
+        return '固定活动日'
+      }
+    },
+    isDiscountCouponFormatter(row, column){
+      if(row.isDiscountCoupon === '0'){
+        return '是'
+      }else if(row.isDiscountCoupon === '1'){
+        return '否'
+      }
+    },
+    isMarketFormatter(row, column){
+      if(row.isMarket === '0'){
+        return '是'
+      }else if(row.isMarket === '1'){
+        return '否'
+      }
+    },
+    isGradeSettingFormatter(row, column){
+      if(row.isGradeSetting === '0'){
+        return '是'
+      }else if(row.isGradeSetting === '1'){
+        return '否'
+      }
+    },
+    /** 查询客户电子会员卡充值优惠设置明细列表 */
+    getList() {
+      this.loading = true;
+      listDetailInfo(this.queryParams).then(response => {
+        this.detailList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        parentId: null,
+        settingRuleType: null,
+        discountAmtTerm: null,
+        presentAmt: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+  }
+};
+</script>

+ 218 - 0
Yijia-SaaS/yijia-ui/src/views/customer/consumption/index.vue

@@ -0,0 +1,218 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="客户名" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+     <el-form-item label="油品" prop="cardOilsType">
+        <el-select
+          v-model="queryParams.cardOilsType"
+          placeholder="请选择油品"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in oilOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="消费时间" prop="">
+        <el-date-picker
+          v-model="dateRangeCreatedDate"
+          type="daterange"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+         >
+        </el-date-picker>
+      </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-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['customer:record:export']" >导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
+      <el-table-column label="id" align="center" prop="id" v-if="false" />
+      <el-table-column label="消费单号" align="center" prop="orderNo" />
+      <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+      <el-table-column label="电子卡号" align="center" prop="customerNo" />
+      <el-table-column label="会员名" align="center" prop="customerName" />
+      <el-table-column label="油品" align="center" prop="cardOilsType" :formatter="cardOilsTypeFotmat"/>
+      <el-table-column label="电子会员卡消费充值类型:+,充值;-,消费;" align="center" prop="usageType" v-if="false" />
+      <el-table-column label="电子会员卡充值消费类型:1.微信;2.POS机" align="center" prop="payType" v-if="false"/>
+      <el-table-column label="消费金额" align="center" prop="amt" />
+      <el-table-column label="余额" align="center" prop="balance"  />
+      <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+      <el-table-column label="油站名称" align="center" prop="stationName" />
+      <el-table-column label="支付时间" align="center" prop="payDate" width="150">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="150">
+        <template slot-scope="scope1">
+          <span>{{ parseTime(scope1.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否消费成功:0,未成功;1,成功" align="center" prop="status" v-if="false"/>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listConsumption, exportConsumption } from "@/api/customer/consumption";
+
+export default {
+  name: "Record",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值消费记录表格数据
+      recordList: [],
+      oilOptions:[],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: "-",
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        stationId: null,
+        stationName: null, 
+        status: 1
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("oil").then(response => {
+      this.oilOptions = response.data;
+    });
+  },
+  methods: {
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '2'){
+        return '柴油'
+      }else if(row.cardOilsType === '1'){
+        return '汽油'
+      }
+    },
+    /** 查询客户电子会员卡充值消费记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      listConsumption(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
+        this.recordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: null,
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        createTime: null,
+        stationId: null,
+        stationName: null,
+        status: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    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
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.queryParams.stationId= this.$store.selectDeptId;
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户电子会员卡充值记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportConsumption(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 216 - 0
Yijia-SaaS/yijia-ui/src/views/customer/recharge/index.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="客户名" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油品" prop="cardOilsType">
+        <el-select
+          v-model="queryParams.cardOilsType"
+          placeholder="请选择油品"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in oilOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="充值时间" prop="">
+        <el-date-picker
+          v-model="dateRangeCreatedDate"
+          type="daterange"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+         >
+        </el-date-picker>
+      </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-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['customer:record:export']" >导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
+      <el-table-column label="id" align="center" prop="id" v-if="false" />
+      <el-table-column label="充值单号" align="center" prop="orderNo" />
+      <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+      <el-table-column label="电子卡号" align="center" prop="customerNo" />
+      <el-table-column label="会员名" align="center" prop="customerName" />
+      <el-table-column label="油品" align="center" prop="cardOilsType" :formatter="cardOilsTypeFotmat"/>
+      <el-table-column label="电子会员卡消费充值类型:+,充值;-,消费;" align="center" prop="usageType" v-if="false" />
+      <el-table-column label="充值金额" align="center" prop="amt" />
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="消费方式" align="center" prop="payType" :formatter="payTypeFotmat"/>
+      <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+      <el-table-column label="油站名称" align="center" prop="stationName" />
+      <el-table-column label="油站名称" align="center" prop="create_time" v-if="false"/>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listRecharge, exportRecharge } from "@/api/customer/recharge";
+
+export default {
+  name: "Record",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值消费记录表格数据
+      recordList: [],
+      oilOptions:[],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: "+",
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        stationId: null,
+        stationName: null,
+        status: 1
+      },
+      
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("oil").then(response => {
+      this.oilOptions = response.data;
+    });
+  },
+  methods: {
+    payTypeFotmat(row, column){
+      if(row.payType === '1'){
+        return '小程序'
+      }else if(row.payType === '2'){
+        return 'POS'
+      }
+    },
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '1'){
+        return '汽油'
+      }else if(row.cardOilsType === '2'){
+        return '柴油'
+      }
+    },
+    /** 查询客户电子会员卡充值消费记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      listRecharge(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
+        this.recordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: null,
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        createTime: null,
+        stationId: null,
+        stationName: null,
+        status: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    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
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.queryParams.stationId= this.$store.selectDeptId;
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户电子会员卡充值记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportRecharge(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 647 - 0
Yijia-SaaS/yijia-ui/src/views/customer/report/customerReport copy.vue

@@ -0,0 +1,647 @@
+<template>
+  <el-scrollbar style="height:100%">
+    <div>
+      <div>
+        <el-form
+          :model="queryParams"
+          style="margin-left: 20px;"
+          ref="queryForm"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
+         <el-row :gutter="10" class="panel-group">
+            <el-col :xs="12" :sm="12" :lg="6">
+              <div class="flex xiaoe">
+                <div style="font-size: 28px;">电子会员总量</div>
+                <div style="line-height: 62px;font-size: 44px;">{{ cardNum }}</div>
+              </div>
+            </el-col>
+         
+            <el-col :xs="12" :sm="12" :lg="6">
+              <div class="flex xiaoliang">
+                <div style="font-size: 28px;">总余额</div>
+                <div style="line-height: 62px;font-size: 32px;">{{hzAmt }}</div>
+              </div>
+            </el-col>
+          </el-row>
+          <el-form-item>
+            <el-button size="mini" @click="dayDataSource">今天</el-button>
+            <el-button size="mini" @click="yesDataSource">昨天</el-button>
+            <el-button size="mini" @click="workDataSource">本周</el-button>
+            <el-button size="mini" @click="monthDataSource">本月</el-button>
+            <el-date-picker
+              style="margin: 0px 10px;"
+              size="mini"
+              v-model="dateRangeCreatedDate"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+            <el-button  size="mini" @click="queryDataSource">查询</el-button>
+          </el-form-item>
+        </el-form>
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">数据概览</span>
+        <el-row :gutter="10" class="panel-group">
+          <el-col :xs="12" :sm="12" :lg="6">
+            <div class="flex xiaoliang">
+              <div style="font-size: 28px;">充值总额</div>
+              <div style="line-height: 62px;font-size: 44px;">{{ form.czAmt }}</div>
+            </div>
+          </el-col>
+         
+          <el-col :xs="12" :sm="12" :lg="6">
+            <div class="flex xiaoliang">
+              <div style="font-size: 28px;">消费额度</div>
+              <div style="line-height: 62px;font-size: 44px;">{{ form.xfAmt}}</div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+      <div style="width:100%; height: 360px;background: #FFFFFF;">
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">充值/消费走势</span>
+        <div ref="myChart" style="width:100%; height: 350px;margin: 0px 25px;"></div>
+      </div>
+      <div style="width:100%; height: 181px;">
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">详情:</span>
+        <el-table v-loading="loading" :data="dayReportList">
+          <el-table-column label="日期" align="center" prop="createTime">
+              <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="充值总额度" align="center" prop="czamt" />
+          <el-table-column label="消费总额度" align="center" prop="xfamt" v-if="false" />
+          <el-table-column label="电子会员数量" align="center" prop="cumnum" />
+          <el-table-column label="余额" align="center" prop="cumamt" />
+          <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="handleLook(scope.row)"
+              >详情</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- <pagination class="pagination-container"
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNo"
+          :limit.sync="queryParams.pageSetting"
+          @pagination="dayReportDetail"
+          style="display:inline-block;float:right "
+        /> -->
+        <div  style="display:inline-block;float:right ">
+          <el-pagination
+            style="padding-top: 15px"
+            @size-change="findSizeChange"
+            @current-change="findPage"
+            :current-page.sync="pageNow"
+            background
+            :pager-count="6"
+            :page-sizes="[5,10,20,50,100]"
+            :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total">
+          </el-pagination>
+        </div>
+      </div> 
+      <el-dialog :title="title" width="800px"  :visible.sync="open" append-to-body>
+        <el-table v-loading="loading" :data="dayReportDetailsList">
+          <el-table-column label="订单单号" align="center" prop="orderNo" />
+          <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+          <el-table-column label="会员号ID" align="center" prop="customerNo" />
+          <el-table-column label="会员名" align="center" prop="customerName" />
+          <el-table-column label="油品" align="center" prop="cardOilsType" :formatter="cardOilsTypeFotmat"/>
+          <el-table-column label="订单类型" align="center" prop="usageType" :formatter="usageTypeFotmat"/>
+          <el-table-column label="消费金额" align="center" prop="amt" />
+          <el-table-column label="余额" align="center" prop="balance" />
+          <el-table-column label="消费方式" align="center" prop="payType" :formatter="payTypeFotmat"/>
+          <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+          <el-table-column label="油站名称" align="center" prop="stationName" />
+          <el-table-column label="油站名称" align="center" prop="create_time" v-if="false"/>
+        </el-table>
+        <div  class="pagination-container">
+          <el-pagination
+            style="padding-top: 15px"
+            @size-change="sizeChange"
+            @current-change="currentChange"
+            :current-page.sync="pageNow2"
+            background
+            :pager-count="6"
+            :page-sizes="[5,10,20,50,100]"
+            :page-size="setting"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total1">
+          </el-pagination>
+        </div>
+      </el-dialog>
+    </div>
+  </el-scrollbar>
+</template>
+
+<script>
+import echarts from "echarts";
+require("echarts/theme/macarons"); // echarts theme
+import {listSum,selectCard} from "@/api/customer/card";
+import { xfAmtQuery,listXdata,listQydataXF } from "@/api/customer/consumption";
+import { czAmtQuery,listQydataCZ,selectCardDetail } from "@/api/customer/recharge";
+export default {
+  name: "source",
+  data() {
+    return {
+      charts: null,
+      size:10,
+      pageNow:1,
+      pageNow2:1,
+      setting:10,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      total1: 0,
+      hzAmt: 0,
+      cardNum:0,
+      // 优惠劵管理表格数据
+      couponList: [],
+      dayReportDetailsList: [],
+      dateRangeCreatedDate: [],
+      //x轴数据
+      xdata: [],
+      //92#汽油数据
+      czdata: [],
+      //95#汽油数据
+      xfdata: [],
+      // 弹出层标题
+      title: "",
+      rows:[],
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageSetting:10,
+        pageNum:1,
+        createdDate: null,
+        stationId:null,
+        stationName: null,
+        beginTime: null,
+        endTime: null,
+        payDate: null,
+        status:"1"
+      },
+      // 查询参数
+      queryInfo: {
+        pageSetting:10,
+        pageNo:1,
+        createDate: null
+      },
+      query:{
+        stationId:null
+      },
+      //日报数据
+      dayReportList: [],
+      // 表单参数
+      form: {
+        czAmt: 0,
+        xfAmt: 0
+      },
+      // 表单校验
+      rules: {}
+    };
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.queryParams.beginTime = this.getMonthDate();
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      setTimeout(() => {
+        this.initChart();
+      }, 1000);
+    });
+  },
+  created() {
+    this.dayDataSource();
+    this.getHZlist();
+    //获取折线图的数据
+    this.reset();
+    this.queryParams.beginTime = this.getMonthDate();
+    this.queryParams.endTime = this.getEndFormatDate(new Date());
+    this.queryParams.stationId=this.$store.selectDeptId;
+    this.getDatas();
+    
+  },
+  methods: {
+    usageTypeFotmat(row, column){
+      if(row.usageType === '+'){
+        return '充值'
+      }else if(row.usageType === '-'){
+        return '消费'
+      }
+    },
+    payTypeFotmat(row, column){
+      if(row.payType === '1'){
+        return '小程序'
+      }else if(row.payType === '2'){
+        return 'POS'
+      }
+    },
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '1'){
+        return '汽油'
+      }else if(row.cardOilsType === '2'){
+        return '柴油'
+      }
+    },
+    initChart() {
+      // 初始化echarts
+      this.charts = echarts.init(this.$refs.myChart, "macarons");
+      this.charts.setOption(
+        {
+          xAxis: {
+            data: this.xdata,
+            boundaryGap: false,
+            axisTick: {
+              show: false
+            }
+          },
+          tooltip: {
+            trigger: "axis",
+            axisPointer: {
+              type: "cross"
+            },
+            padding: [5, 10]
+          },
+          yAxis: {
+            axisTick: {
+              show: false
+            }
+          },
+          legend: {
+            data: [ "充值","消费"]
+          },
+          animation: false,
+          series: [
+            {
+              name: "充值",
+              itemStyle: {
+                normal: {
+                  color: "#FF005A",
+                  lineStyle: {
+                    color: "#FF005A",
+                    width: 2
+                  }
+                }
+              },
+              smooth: true,
+              type: "line",
+              data: this.czdata
+            },
+            {
+              name: "消费",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#3888fa",
+                  lineStyle: {
+                    color: "#3888fa",
+                    width: 2
+                  }
+                }
+              },
+              data: this.xfdata
+            }
+          ]
+        },
+        true
+      );
+    },
+    getXData() {
+      return listXdata(this.queryParams).then(response => {
+        this.xdata = [];
+        if(response.hasOwnProperty('rows')){
+          for (let i in response.rows) {
+            this.xdata.push(response.rows[i].createTime);
+          }
+        }
+      });
+    },
+
+    getQyDataCZ() {
+      return listQydataCZ(this.queryParams).then(response => {
+        this.czdata = [];
+        if(response.hasOwnProperty('rows')){
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createTime);
+            data.push(response.rows[i].amt);
+            this.czdata.push(data);
+          }
+        }
+      });
+    },
+
+    getQydataXF() {
+      return listQydataXF(this.queryParams).then(response => {
+        this.xfdata = [];
+        if(response.hasOwnProperty('rows')){
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createTime);
+            data.push(response.rows[i].amt);
+            this.xfdata.push(data);
+          }
+        }
+      });
+    },
+    //获取折线图用到的数据
+    getDatas() {
+      Promise.all([
+        this.getXData(),
+        this.getQyDataCZ(),
+        this.getQydataXF(),
+      ]).then(res => {
+        this.initChart();
+      });
+    },
+    /** 查询电子会员数据 */
+    getList() {
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      xfAmtQuery(this.queryParams).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.form.xfAmt = response.data.amt;
+        }
+      });
+      czAmtQuery(this.queryParams).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.form.czAmt = response.data.amt;
+        }
+      });
+      this.dayReportDetail();
+    },
+    getHZlist(){
+      //汇总电子会员数据
+      this.query.stationId=this.$store.selectDeptId;
+      if(this.query.stationId==null || this.query.stationId==""){
+        this.query.stationId =this.$store.state.user.deptId;
+      }
+      listSum(this.query).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.cardNum= response.data.num;
+          this.hzAmt = response.data.amt;
+        }
+      });
+      
+    },
+    findPage(val){
+      this.pageNow = val;
+      this.dayReportDetail();
+    },
+    findSizeChange(size) {
+      //将val赋值给size
+      this.size = size;
+      //重新去后台查询数据
+      this.dayReportDetail();
+    },
+   
+    dayReportDetail(){
+      this.loading = false;
+      this.queryParams.pageNo =this.pageNow;
+      this.queryParams.pageSetting =this.size;
+      selectCard(this.queryParams).then(response => {
+       this.dayReportList= response.rows;
+        this.total = response.total;
+      });
+    },
+    //本日的数据
+    dayDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.getNowFormatDate(new Date());
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      this.getList();
+    },
+    //昨天的数据
+    yesDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.getFormatDate(new Date());
+      this.queryParams.endTime = this.getNowFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      this.getList();
+    },
+    //本周的数据
+    workDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.getDates();
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      this.getDatas();
+      this.getList();
+    },
+    //本月数据
+    monthDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.getMonthDate();
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      this.getDatas();
+      this.getList();
+    },
+    //按照指定日期
+    queryDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.dateRangeCreatedDate[0];
+      this.queryParams.endTime = this.dateRangeCreatedDate[1];
+      this.queryParams.stationId=this.$store.selectDeptId;
+      this.getDatas();
+      this.getList();
+    },
+    //今天
+    getNowFormatDate(date) {
+      let seperator1 = "-";
+      let month = date.getMonth() + 1;
+      let strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate1 =
+        date.getFullYear() + seperator1 + month + seperator1 + strDate;
+      return currentdate1;
+    },
+    //明天
+    getEndFormatDate(myDate) {
+      let date = myDate.getDate();
+      date = date + 1;
+      myDate.setDate(date);
+      let seperator2 = "-";
+      let month = myDate.getMonth() + 1;
+      let strDate = myDate.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate2 =
+        myDate.getFullYear() + seperator2 + month + seperator2 + strDate;
+      return currentdate2;
+    },
+    //昨天
+    getFormatDate(myDate) {
+      let date = myDate.getDate();
+      date = date - 1;
+      myDate.setDate(date);
+      let seperator3 = "-";
+      let month = myDate.getMonth() + 1;
+      let strDate = myDate.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate3 =
+        myDate.getFullYear() + seperator3 + month + seperator3 + strDate;
+      return currentdate3;
+    },
+    getDates() {
+      var new_Date = new Date();
+      var timesStamp = new_Date.getTime();
+      var currenDay = new_Date.getDay();
+      var dates = new Date(
+        timesStamp + 24 * 60 * 60 * 1000 * (0 - ((currenDay + 6) % 7))
+      )
+        .toLocaleDateString()
+        .replace(/[年月]/g, "-")
+        .replace(/[日上下午]/g, "");
+      let s = dates.replace(/-/g, "/");
+      var dt = new Date(s);
+      var m = dt.getMonth() + 1;
+      var d = dt.getDate();
+      m = m < 10 ? "0" + m : m;
+      d = d < 10 ? "0" + d : d;
+      dates = dt.getFullYear() + "-" + m + "-" + d;
+      return dates;
+    },
+    //本月第一天
+    getMonthDate() {
+      let date = new Date();
+      let seperator1 = "-";
+      let month = date.getMonth() + 1;
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      let currentdate =
+        date.getFullYear() + seperator1 + month + seperator1 + "01";
+      return currentdate;
+    },
+    // 表单重置
+    reset() {
+      this.queryParams = {
+        pageSetting:10,
+        pageNo:1,
+        createDate: null,
+        stationId: null,
+        stationName: null,
+        beginTime:null,
+        endTime:null
+      };
+      this.form = {
+        czAmt: 0,
+        xfAmt: 0
+      };
+      this.queryInfo={
+        pageSetting:10,
+        pageNo:1,
+        createDate: null
+      };
+    },
+
+    /** 查看详情按钮操作 */
+    handleLook(row) {
+      this.rows=row;
+      this.getLookOrder(row);
+    },
+    sizeChange(psize){
+      //将val赋值给size
+      this.setting = psize;
+      this.getLookOrder(this.rows);
+    },
+    currentChange(val) {
+      this.pageNow2 = val;
+      //重新去后台查询数据
+      this.getLookOrder(this.rows);
+    },
+    getLookOrder(row) {
+      const createDate = row.createTime;
+      this.queryInfo.createDate =createDate.substring(0,10);
+      this.queryInfo.pageNo =this.pageNow2;
+      this.queryInfo.pageSetting =this.setting;
+      return selectCardDetail(this.queryInfo).then(response => {
+        this.dayReportDetailsList = response.rows;
+        this.total1 = response.total;
+        this.open = true;
+        this.title = "电子会员明细";
+      });
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.flex {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 270px;
+  flex-direction: column;
+}
+.flex-qy {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.flex-qy-sx {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+}
+.panel-group {
+  padding-left: 10px;
+}
+
+.flex-sr {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  flex-direction: column;
+}
+.sr-font {
+  font-size: 20px;
+  color: #f4a645;
+}
+</style>

+ 421 - 0
Yijia-SaaS/yijia-ui/src/views/customer/report/customerReport.vue

@@ -0,0 +1,421 @@
+<template>
+  <el-scrollbar style="height:100%">
+    <div>
+      <div>
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">数据概览</span>
+        <el-row :gutter="10" class="panel-group">
+          <el-col :xs="12" :sm="12" :lg="6">
+            <div class="flex xiaoliang">
+              <div style="font-size: 28px;">电子会员余额</div>
+              <div style="line-height: 62px;font-size: 32px;">{{hzAmt }}元</div>
+            </div>
+          </el-col>
+          <el-col :xs="12" :sm="12" :lg="6">
+            <div class="flex xiaoe">
+              <div style="font-size: 28px;">电子会员总数</div>
+              <div style="line-height: 62px;font-size: 32px;">{{ cardNum }}个</div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+      <div style="width:100%; height: 181px;">
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">详情:</span>
+        <el-table v-loading="loading" :data="dayReportList">
+          <el-table-column label="日期" align="center" prop="createTime">
+              <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="充值金额" align="center" prop="czamt" />
+          <el-table-column label="消费金额" align="center" prop="xfamt"/>
+          <el-table-column label="新增电子会员" align="center" prop="cardnum" />
+        </el-table>
+        <div  style="float:right">
+          <el-pagination
+            style="padding-top: 15px;"
+            @size-change="findSizeChange"
+            @current-change="findPage"
+            :current-page.sync="pageNow"
+            background
+            :pager-count="6"
+            :page-sizes="[5,10,20,50,100]"
+            :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total">
+          </el-pagination>
+        </div>
+      </div> 
+      <el-dialog :title="title" width="800px"  :visible.sync="open" append-to-body>
+        <el-table v-loading="loading" :data="dayReportDetailsList">
+          <el-table-column label="订单单号" align="center" prop="orderNo" />
+          <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+          <el-table-column label="会员号ID" align="center" prop="customerNo" />
+          <el-table-column label="会员名" align="center" prop="customerName" />
+          <el-table-column label="油品" align="center" prop="cardOilsType" :formatter="cardOilsTypeFotmat"/>
+          <el-table-column label="订单类型" align="center" prop="usageType" :formatter="usageTypeFotmat"/>
+          <el-table-column label="消费金额" align="center" prop="amt" />
+          <el-table-column label="余额" align="center" prop="balance" />
+          <el-table-column label="消费方式" align="center" prop="payType" :formatter="payTypeFotmat"/>
+          <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+          <el-table-column label="油站名称" align="center" prop="stationName" />
+          <el-table-column label="油站名称" align="center" prop="create_time" v-if="false"/>
+        </el-table>
+        <div  class="pagination-container">
+          <el-pagination
+            style="padding-top: 15px"
+            @size-change="sizeChange"
+            @current-change="currentChange"
+            :current-page.sync="pageNow2"
+            background
+            :pager-count="6"
+            :page-sizes="[5,10,20,50,100]"
+            :page-size="setting"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total1">
+          </el-pagination>
+        </div>
+      </el-dialog>
+    </div>
+  </el-scrollbar>
+</template>
+
+<script>
+
+import {listSum,selectCard} from "@/api/customer/card";
+import { xfAmtQuery } from "@/api/customer/consumption";
+import { czAmtQuery,selectCardDetail } from "@/api/customer/recharge";
+export default {
+  name: "source",
+  data() {
+    return {
+      charts: null,
+      size:10,
+      pageNow:1,
+      pageNow2:1,
+      setting:10,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      total1: 0,
+      hzAmt: 0,
+      cardNum:0,
+      // 优惠劵管理表格数据
+      couponList: [],
+      dayReportDetailsList: [],
+      dateRangeCreatedDate: [],
+      //x轴数据
+      xdata: [],
+      //92#汽油数据
+      czdata: [],
+      //95#汽油数据
+      xfdata: [],
+      // 弹出层标题
+      title: "",
+      rows:[],
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageSetting:10,
+        pageNum:1,
+        createdDate: null,
+        stationId:null,
+        stationName: null,
+        beginTime: null,
+        endTime: null,
+        payDate: null,
+        status:"1"
+      },
+      // 查询参数
+      queryInfo: {
+        pageSetting:10,
+        pageNo:1,
+        createDate: null
+      },
+      query:{
+        stationId:null
+      },
+      //日报数据
+      dayReportList: [],
+      // 表单参数
+      form: {
+        czAmt: 0,
+        xfAmt: 0
+      },
+      // 表单校验
+      rules: {}
+    };
+  },
+ 
+  created() {
+    this.dayDataSource();
+    this.getHZlist();
+    //获取折线图的数据
+    this.reset();
+    this.queryParams.beginTime = this.getMonthDate();
+    this.queryParams.endTime = this.getEndFormatDate(new Date());
+    this.queryParams.stationId=this.$store.selectDeptId;
+  },
+  methods: {
+    usageTypeFotmat(row, column){
+      if(row.usageType === '+'){
+        return '充值'
+      }else if(row.usageType === '-'){
+        return '消费'
+      }
+    },
+    payTypeFotmat(row, column){
+      if(row.payType === '1'){
+        return '小程序'
+      }else if(row.payType === '2'){
+        return 'POS'
+      }
+    },
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '1'){
+        return '汽油'
+      }else if(row.cardOilsType === '2'){
+        return '柴油'
+      }
+    },
+    /** 查询电子会员数据 */
+    getList() {
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      xfAmtQuery(this.queryParams).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.form.xfAmt = response.data.amt;
+        }
+      });
+      czAmtQuery(this.queryParams).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.form.czAmt = response.data.amt;
+        }
+      });
+      this.dayReportDetail();
+    },
+    getHZlist(){
+      //汇总电子会员数据
+      this.query.stationId=this.$store.selectDeptId;
+      if(this.query.stationId==null || this.query.stationId==""){
+        this.query.stationId =this.$store.state.user.deptId;
+      }
+      listSum(this.query).then(response => {
+        if (response.hasOwnProperty('data')) {
+          this.cardNum= response.data.num;
+          this.hzAmt = response.data.amt;
+        }
+      });
+    },
+    findPage(val){
+      this.pageNow = val;
+      this.dayReportDetail();
+    },
+    findSizeChange(size) {
+      //将val赋值给size
+      this.size = size;
+      //重新去后台查询数据
+      this.dayReportDetail();
+    },
+    dayReportDetail(){
+      this.loading = false;
+      this.queryParams.pageNo =this.pageNow;
+      this.queryParams.pageSetting =this.size;
+      selectCard(this.queryParams).then(response => {
+       this.dayReportList= response.rows;
+        this.total = response.total;
+      });
+    },
+    //本日的数据
+    dayDataSource() {
+      this.reset();
+      this.queryParams.beginTime = this.getNowFormatDate(new Date());
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
+      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
+        this.queryParams.stationId =this.$store.state.user.deptId;
+      }
+      this.getList();
+    },
+    //今天
+    getNowFormatDate(date) {
+      let seperator1 = "-";
+      let month = date.getMonth() + 1;
+      let strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate1 =
+        date.getFullYear() + seperator1 + month + seperator1 + strDate;
+      return currentdate1;
+    },
+    //明天
+    getEndFormatDate(myDate) {
+      let date = myDate.getDate();
+      date = date + 1;
+      myDate.setDate(date);
+      let seperator2 = "-";
+      let month = myDate.getMonth() + 1;
+      let strDate = myDate.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate2 =
+        myDate.getFullYear() + seperator2 + month + seperator2 + strDate;
+      return currentdate2;
+    },
+    //昨天
+    getFormatDate(myDate) {
+      let date = myDate.getDate();
+      date = date - 1;
+      myDate.setDate(date);
+      let seperator3 = "-";
+      let month = myDate.getMonth() + 1;
+      let strDate = myDate.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      let currentdate3 =
+        myDate.getFullYear() + seperator3 + month + seperator3 + strDate;
+      return currentdate3;
+    },
+    getDates() {
+      var new_Date = new Date();
+      var timesStamp = new_Date.getTime();
+      var currenDay = new_Date.getDay();
+      var dates = new Date(
+        timesStamp + 24 * 60 * 60 * 1000 * (0 - ((currenDay + 6) % 7))
+      )
+        .toLocaleDateString()
+        .replace(/[年月]/g, "-")
+        .replace(/[日上下午]/g, "");
+      let s = dates.replace(/-/g, "/");
+      var dt = new Date(s);
+      var m = dt.getMonth() + 1;
+      var d = dt.getDate();
+      m = m < 10 ? "0" + m : m;
+      d = d < 10 ? "0" + d : d;
+      dates = dt.getFullYear() + "-" + m + "-" + d;
+      return dates;
+    },
+    //本月第一天
+    getMonthDate() {
+      let date = new Date();
+      let seperator1 = "-";
+      let month = date.getMonth() + 1;
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      let currentdate =
+        date.getFullYear() + seperator1 + month + seperator1 + "01";
+      return currentdate;
+    },
+    // 表单重置
+    reset() {
+      this.queryParams = {
+        pageSetting:10,
+        pageNo:1,
+        createDate: null,
+        stationId: null,
+        stationName: null,
+        beginTime:null,
+        endTime:null
+      };
+      this.form = {
+        czAmt: 0,
+        xfAmt: 0
+      };
+      this.queryInfo={
+        pageSetting:10,
+        pageNo:1,
+        createDate: null
+      };
+    },
+
+    /** 查看详情按钮操作 */
+    handleLook(row) {
+      this.rows=row;
+      this.getLookOrder(row);
+    },
+    sizeChange(psize){
+      //将val赋值给size
+      this.setting = psize;
+      this.getLookOrder(this.rows);
+    },
+    currentChange(val) {
+      this.pageNow2 = val;
+      //重新去后台查询数据
+      this.getLookOrder(this.rows);
+    },
+    getLookOrder(row) {
+      const createDate = row.createTime;
+      this.queryInfo.createDate =createDate.substring(0,10);
+      this.queryInfo.pageNo =this.pageNow2;
+      this.queryInfo.pageSetting =this.setting;
+      return selectCardDetail(this.queryInfo).then(response => {
+        this.dayReportDetailsList = response.rows;
+        this.total1 = response.total;
+        this.open = true;
+        this.title = "电子会员明细";
+      });
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.flex {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 170px;
+  flex-direction: column;
+}
+.flex-qy {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.flex-qy-sx {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+}
+.panel-group {
+  padding-left: 10px;
+}
+
+.flex-sr {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  flex-direction: column;
+}
+.sr-font {
+  font-size: 20px;
+  color: #f4a645;
+}
+</style>