|
@@ -0,0 +1,175 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
|
|
|
+ <el-form-item label="补贴时间" prop="createTime">
|
|
|
+ <el-date-picker v-model="createDate" type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"
|
|
|
+ :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <Pagination uri="/module/statistics/subsidyList" :request-params="queryParams" ref="pagination" :showIndex="false">
|
|
|
+ <el-table-column label="原始金额" align="center" prop="originalAmount">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.originalAmount }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="真实金额" align="center" prop="realAmount">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.realAmount }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="优惠金额" align="center" prop="couponAmount">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.couponAmount }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="补贴金额" align="center" prop="subsidyAmount">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.subsidyAmount }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="服务商佣金" align="center" prop="commission">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.commission }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="盈利" align="center" prop="profit">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.profit }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="运力名称" align="center" prop="deliveryName">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.deliveryName != null">{{ scope.row.deliveryName }}</span>
|
|
|
+ <span v-else> -- </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="日期" align="center" prop="date">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.date }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </Pagination>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import Pagination from '@/components/Paginations'
|
|
|
+import moment from "moment";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "subsidyStatistics",
|
|
|
+ components: {
|
|
|
+ Pagination
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ date:[],
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 用户账户明细表格数据
|
|
|
+ memberBalanceLogList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ createDate: [],
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ nickname: undefined,
|
|
|
+ mobile: undefined,
|
|
|
+ merchantName: undefined,
|
|
|
+ memberType: undefined,
|
|
|
+ startTime: undefined,
|
|
|
+ endTime: undefined
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.queryParams.memberId = this.$route.query.id
|
|
|
+ this.createDate[0] =
|
|
|
+ this.formatDate(new Date().getTime() - 6 * 24 * 60 * 60 * 1000) +
|
|
|
+ " 00:00:00";
|
|
|
+ this.createDate[1] = this.formatDate(new Date().getTime()) + " 23:59:59";
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ formatDate(time) {
|
|
|
+ return moment(time).format("YYYY-MM-DD");
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: undefined,
|
|
|
+ memberId: undefined,
|
|
|
+ type: undefined,
|
|
|
+ desc: undefined,
|
|
|
+ source: undefined,
|
|
|
+ amount: undefined
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ if (this.createDate !== null && this.createDate !== "") {
|
|
|
+ if (this.createDate[0] !== undefined) {
|
|
|
+ this.queryParams.startTime = this.createDate[0];
|
|
|
+ this.queryParams.endTime = this.createDate[1];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.queryParams.startTime = "";
|
|
|
+ this.queryParams.endTime = "";
|
|
|
+ }
|
|
|
+ if(this.queryParams.startTime == '' || this.queryParams.endTime == '') {
|
|
|
+ this.flag = false;
|
|
|
+ this.$message.error("补贴时间查询条件不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var dateStart = new Date(this.queryParams.startTime);
|
|
|
+ var dateEnd = new Date(this.queryParams.endTime);
|
|
|
+ var dateDiff = dateEnd.getTime() - dateStart.getTime();
|
|
|
+ var subDay = Math.ceil(dateDiff / (24 * 3600 * 1000))
|
|
|
+ if(subDay > 31) {
|
|
|
+ this.flag = false;
|
|
|
+ this.$message.error("补贴时间查询条件不能大于31天!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$refs.pagination.handleSearch(true)
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.createDate = []
|
|
|
+ this.queryParams.startTime = "";
|
|
|
+ this.queryParams.endTime = "";
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|