Commit 0bd5a630 authored by guoyou's avatar guoyou

数据统计导出

parent 50ea9a1d
...@@ -32,7 +32,7 @@ export function received_statistics(params) { ...@@ -32,7 +32,7 @@ export function received_statistics(params) {
// 订单统计导出 // 订单统计导出
export function excelExport(query) { export function excelExport(query) {
return fetch({ return fetch({
url: '/api/order/orderStatistics/excel', url: 'api/order/admin/order/received_statistics/export',
method: 'post', method: 'post',
data: query, data: query,
responseType: 'blob' responseType: 'blob'
......
...@@ -532,10 +532,10 @@ export default { ...@@ -532,10 +532,10 @@ export default {
} }
} else { } else {
let name = this.companyList.filter(item => item.id == this.amendCompany.companyId) let name = this.companyList.filter(item => item.id == this.amendCompany.companyId)
this.amendCompany.companyName = name[0].name this.amendCompany.companyName = name[0].name
this.amendCompany.jobId = this.staffTitleFrom.jobId this.amendCompany.jobId = this.staffTitleFrom.jobId
this.amendCompany.positionId = this.staffTitleFrom.positionId this.amendCompany.positionId = this.staffTitleFrom.positionId
this.amendCompany.isQuit = 0 this.amendCompany.isQuit = this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.setApi(this.amendCompany) this.setApi(this.amendCompany)
} }
}, },
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
placeholder="请选择时间范围" placeholder="请选择时间范围"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
@change="changeTime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="统计周期"> <el-form-item label="统计周期">
...@@ -280,6 +281,14 @@ export default { ...@@ -280,6 +281,14 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
//时间关闭
changeTime(val){
if (!val) {
this.time = null
this.listQuery.endDate = null
this.listQuery.startDate = null
}
},
//导出 //导出
downloadExcel() { downloadExcel() {
this.excelLoading = true this.excelLoading = true
...@@ -310,7 +319,10 @@ export default { ...@@ -310,7 +319,10 @@ export default {
}, },
//搜索 //搜索
search() { search() {
if (!!this.time) { // console.log(this.time);
console.log(!!this.time[0]);
if (!!this.time[0]) {
this.listQuery.startDate = formatDate( this.listQuery.startDate = formatDate(
new Date(this.time[0]), new Date(this.time[0]),
'yyyy-MM-dd' 'yyyy-MM-dd'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment