|
@@ -11,6 +11,9 @@
|
|
|
>报表导出</div>
|
|
|
<!-- 搜索类型 -->
|
|
|
<el-form :inline="true" class="searchForm" v-model.trim="searchForm">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model.trim="searchForm.phone" @keyup.enter.native="search" placeholder="手机号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<!-- <el-form-item prop="organId">
|
|
|
<el-select
|
|
|
class="multiple"
|
|
@@ -27,7 +30,7 @@
|
|
|
:value="item.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item>
|
|
|
<el-date-picker
|
|
|
v-model.trim="orderDate"
|
|
@@ -55,7 +58,7 @@
|
|
|
:value="item.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item>
|
|
|
<el-select
|
|
|
v-model.trim="searchForm.status"
|
|
@@ -98,7 +101,12 @@
|
|
|
<el-table-column align="center" prop="actualAmount" label="实付金额"></el-table-column>
|
|
|
<el-table-column align="center" label="用户姓名">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.username }}
|
|
|
+ <div v-if="scope.row.user">{{ scope.row.user.username }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="手机号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.user">{{ scope.row.user.phone }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="paymentChannel" label="交易方式">
|
|
@@ -126,15 +134,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import { tenantPaymentOrder } from '@/api/orderManager'
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { tenantPaymentOrder } from "@/api/orderManager";
|
|
|
// import { getEmployeeOrgan } from '@/api/buildTeam'
|
|
|
-import store from '@/store'
|
|
|
-import { orderStatus, dealStatus } from '@/utils/searchArray'
|
|
|
-import axios from 'axios'
|
|
|
-import qs from 'qs'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import load from '@/utils/loading'
|
|
|
+import store from "@/store";
|
|
|
+import { orderStatus, dealStatus } from "@/utils/searchArray";
|
|
|
+import axios from "axios";
|
|
|
+import qs from "qs";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import load from "@/utils/loading";
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: "income",
|
|
@@ -148,7 +156,8 @@ export default {
|
|
|
orderEndDate: null,
|
|
|
status: "SUCCESS",
|
|
|
paymentType: null,
|
|
|
- organId: null
|
|
|
+ organId: null,
|
|
|
+ phone:null
|
|
|
},
|
|
|
tableList: [],
|
|
|
organList: [],
|
|
@@ -171,15 +180,17 @@ export default {
|
|
|
// });
|
|
|
var now = new Date();
|
|
|
|
|
|
- var startDate =
|
|
|
- new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
|
|
|
- .toISOString()
|
|
|
- .slice(0, 10);
|
|
|
- // + " 00:00:00" + " 23:59:59"
|
|
|
- var endDate =
|
|
|
- new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
|
|
|
- .toISOString()
|
|
|
- .slice(0, 10);
|
|
|
+ var startDate = new Date(
|
|
|
+ Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
|
|
|
+ )
|
|
|
+ .toISOString()
|
|
|
+ .slice(0, 10);
|
|
|
+ // + " 00:00:00" + " 23:59:59"
|
|
|
+ var endDate = new Date(
|
|
|
+ Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
|
|
|
+ )
|
|
|
+ .toISOString()
|
|
|
+ .slice(0, 10);
|
|
|
this.orderDate = [];
|
|
|
this.orderDate.push(startDate);
|
|
|
this.orderDate.push(endDate);
|
|
@@ -213,6 +224,9 @@ export default {
|
|
|
data.orderStartDate = searchForm.orderStartDate;
|
|
|
data.orderEndDate = searchForm.orderEndDate;
|
|
|
}
|
|
|
+ if(searchForm.phone){
|
|
|
+ data.phone = searchForm.phone
|
|
|
+ }
|
|
|
const options = {
|
|
|
method: "POST",
|
|
|
headers: {
|
|
@@ -228,45 +242,47 @@ export default {
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let nowTime = new Date();
|
|
|
- let ymd =
|
|
|
- nowTime.getFullYear() +
|
|
|
- "" +
|
|
|
- (nowTime.getMonth() + 1) +
|
|
|
- "" +
|
|
|
- nowTime.getDate() +
|
|
|
- "" +
|
|
|
- nowTime.getHours() +
|
|
|
- "" +
|
|
|
- nowTime.getMinutes();
|
|
|
- let fname = "报表导出" + new Date().getTime(); //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then(res => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then(res => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let nowTime = new Date();
|
|
|
+ let ymd =
|
|
|
+ nowTime.getFullYear() +
|
|
|
+ "" +
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
+ "" +
|
|
|
+ nowTime.getDate() +
|
|
|
+ "" +
|
|
|
+ nowTime.getHours() +
|
|
|
+ "" +
|
|
|
+ nowTime.getMinutes();
|
|
|
+ let fname = "报表导出" + new Date().getTime(); //下载文件的名字
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ load.endLoading();
|
|
|
})
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请连接管理员');
|
|
|
- load.endLoading();
|
|
|
- });
|
|
|
+ .catch(error => {
|
|
|
+ this.$message.error("导出数据失败,请连接管理员");
|
|
|
+ load.endLoading();
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
@@ -316,7 +332,8 @@ export default {
|
|
|
orderEndDate: null,
|
|
|
paymentStatus: null,
|
|
|
paymentType: null,
|
|
|
- organId: null
|
|
|
+ organId: null,
|
|
|
+ phone:null
|
|
|
};
|
|
|
this.getList();
|
|
|
}
|