|
@@ -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>
|