|
|
@@ -18,6 +18,34 @@
|
|
|
@size-change="sizeChange"
|
|
|
@refresh-change="refreshChange"
|
|
|
@on-load="onLoad">
|
|
|
+ <template slot-scope="{type,size}" slot="createTimeSearch">
|
|
|
+ <el-radio-group v-model="query.createTime" :size="size" style="float: left">
|
|
|
+ <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
|
|
|
+ <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
|
|
|
+ :size="size"
|
|
|
+ @change="searchStateChange"
|
|
|
+ style="width: 280px;margin-left:5px;float: left"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"></avue-date>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{type,size}" slot="keySearch">
|
|
|
+ <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
|
|
|
+ style="width: 300px;margin: 1px 5px 1px 0;">
|
|
|
+ <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
|
|
|
+ @click="searchStateChange"></el-button>
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
|
|
|
+ <!-- <el-button type="primary" :size="size">导出已生成列表</el-button>-->
|
|
|
+ </template>
|
|
|
<template slot="menuLeft">
|
|
|
<span style="font-family: '宋体'">
|
|
|
用户付款总额:
|
|
|
@@ -54,12 +82,17 @@
|
|
|
<script>
|
|
|
import {getList, censusPrice, getDetail, add, update, remove} from "@/api/ldt_bills/bills";
|
|
|
import {mapGetters} from "vuex";
|
|
|
+ import moment from "_moment@2.29.1@moment";
|
|
|
+ import FileUtil from "@/util/fileUtil";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
- query: {},
|
|
|
+ query: {
|
|
|
+ createTime: -1,
|
|
|
+ createTimeRange: [],
|
|
|
+ },
|
|
|
loading: true,
|
|
|
censusPrice:{},
|
|
|
page: {
|
|
|
@@ -81,6 +114,8 @@
|
|
|
editBtn:false,
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
+ searchBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
dialogClickModal: false,
|
|
|
column: [
|
|
|
{
|
|
|
@@ -167,7 +202,6 @@
|
|
|
},
|
|
|
{
|
|
|
label: "交易类型",
|
|
|
- search: true,
|
|
|
prop: "type",
|
|
|
type: "select",
|
|
|
dicData:[{
|
|
|
@@ -220,7 +254,6 @@
|
|
|
},
|
|
|
{
|
|
|
label: "支付状态",
|
|
|
- search: true,
|
|
|
prop: "payStatus",
|
|
|
type: "select",
|
|
|
dicData:[{
|
|
|
@@ -347,12 +380,25 @@
|
|
|
addDisplay: false,
|
|
|
editDisplay: false,
|
|
|
search: true,
|
|
|
+ searchSpan: 24,
|
|
|
+ searchOrder: 0,
|
|
|
+ searchslot: true,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入通知时间",
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "关键字",
|
|
|
+ prop: "key",
|
|
|
+ hide: true,
|
|
|
+ search: true,
|
|
|
+ searchslot: true,
|
|
|
+ searchOrder: 1,
|
|
|
+ searchSpan: 24,
|
|
|
+ editDisplay: false,
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
data: []
|
|
|
@@ -376,6 +422,60 @@
|
|
|
return ids.join(",");
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ //监听创建时间变化
|
|
|
+ "query.createTime": {
|
|
|
+ handler(value) {
|
|
|
+ //防止重复调用
|
|
|
+ if (value !== undefined) {
|
|
|
+ this.query.createTimeRange = [];
|
|
|
+ switch (value) {
|
|
|
+ case -1:
|
|
|
+ this.query.createTimeStart = undefined;
|
|
|
+ this.query.createTimeEnd = undefined;
|
|
|
+ break;
|
|
|
+ case 1: //今天
|
|
|
+ this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
|
|
|
+ this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
+ break;
|
|
|
+ case 2: //昨天
|
|
|
+ this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
|
|
|
+ this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
|
|
|
+ break;
|
|
|
+ case 3: //近7天
|
|
|
+ this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
|
|
|
+ this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
+ break;
|
|
|
+ case 4: //近30天
|
|
|
+ this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
|
|
|
+ this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
+ break;
|
|
|
+ case 5: //本月
|
|
|
+ this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
|
|
|
+ this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
|
|
|
+ break;
|
|
|
+ case 6: //本年
|
|
|
+ this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
|
|
|
+ this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //监听创建时间变化
|
|
|
+ "query.createTimeRange": {
|
|
|
+ handler(value) {
|
|
|
+ //防止重复调用
|
|
|
+ if (value.length === 2) {
|
|
|
+ this.query.createTimeStart = value[0];
|
|
|
+ this.query.createTimeEnd = value[1];
|
|
|
+ this.query.createTime = undefined;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getCensusPrice();
|
|
|
},
|