pull/1/head
parent
3119cecb82
commit
31715635f4
@ -0,0 +1,5 @@ |
|||||||
|
.table-td-operation { |
||||||
|
a { |
||||||
|
margin-left: 8px; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
<!-- start 面包屑 --> |
||||||
|
<app-breadcrumb></app-breadcrumb> |
||||||
|
<!-- end 面包屑 --> |
||||||
|
|
||||||
|
<!--条件搜索--> |
||||||
|
<div class="inner-content"> |
||||||
|
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> |
||||||
|
<div nz-row> |
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="6">时间区间</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="16"> |
||||||
|
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="finishTime"></nz-range-picker> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-row> |
||||||
|
<div nz-col nzSpan="24" class="search-button"> |
||||||
|
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button> |
||||||
|
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div class="inner-content"> |
||||||
|
<span>共计 {{total}} 条数据</span> |
||||||
|
<div class="operating-button"> |
||||||
|
<!-- <button nz-button nzType="primary" class="right-btn" (click)="downloadTemplate(searchForm.value)" ><i nz-icon nzType="download" nzTheme="outline"></i>导出订单</button>--> |
||||||
|
</div> |
||||||
|
<nz-table |
||||||
|
class="table" |
||||||
|
#ajaxTable |
||||||
|
nzShowSizeChanger |
||||||
|
[nzFrontPagination]="false" |
||||||
|
[nzData]="requestData" |
||||||
|
[nzLoading]="loading" |
||||||
|
[nzTotal]="total" |
||||||
|
[(nzPageIndex)]="pageNum" |
||||||
|
[(nzPageSize)]="pageSize" |
||||||
|
(nzPageIndexChange)="getRequest(false , searchForm.value)" |
||||||
|
(nzPageSizeChange)="getRequest(false , searchForm.value)"> |
||||||
|
<thead nzSingleSort> |
||||||
|
<tr> |
||||||
|
<th nzWidth="50px">编号</th> |
||||||
|
<th nzWidth="180px">时间</th> |
||||||
|
<th nzWidth="180px">数量</th> |
||||||
|
<th nzWidth="180px">支付金额</th> |
||||||
|
<th nzWidth="180px">充值金额</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr *ngFor="let data of ajaxTable.data; let i = index"> |
||||||
|
<td>{{i+1}}</td> |
||||||
|
<td>{{data.day}}</td> |
||||||
|
<td>{{data.count}}</td> |
||||||
|
<td>{{data.payPrice}}</td> |
||||||
|
<td>{{data.orderPrice}}</td> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
</div> |
@ -0,0 +1,63 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
import {RechargeService} from '../../../services/recharge.service'; |
||||||
|
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; |
||||||
|
import {NzMessageService} from 'ng-zorro-antd'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-order-statistical', |
||||||
|
templateUrl: './order-statistical.component.html', |
||||||
|
styleUrls: ['./order-statistical.component.scss'] |
||||||
|
}) |
||||||
|
export class OrderStatisticalComponent implements OnInit { |
||||||
|
searchForm: FormGroup; // 搜索框
|
||||||
|
requestData = []; // 列表数据
|
||||||
|
total: number; // 页码
|
||||||
|
pageNum = 1; // 页码
|
||||||
|
pageSize = 10; // 条码
|
||||||
|
loading = true; |
||||||
|
|
||||||
|
constructor( |
||||||
|
private recharge: RechargeService, |
||||||
|
private form: FormBuilder, |
||||||
|
private message: NzMessageService, |
||||||
|
) { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
this.searchForm = this.form.group({ |
||||||
|
finishTime: [null], |
||||||
|
}); |
||||||
|
this.getRequest(true, this.searchForm.value); |
||||||
|
} |
||||||
|
|
||||||
|
// 查询列表
|
||||||
|
public getRequest(reset: boolean = false, whereObject: object) { |
||||||
|
|
||||||
|
if (whereObject['finishTime'] != null && whereObject['finishTime'].length !== 0) { |
||||||
|
whereObject['finishTimeS'] = whereObject['finishTime'][0].getTime(); |
||||||
|
whereObject['finishTimeE'] = whereObject['finishTime'][1].getTime(); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
this.loading = false; |
||||||
|
if (reset) { |
||||||
|
this.pageNum = 1; |
||||||
|
} |
||||||
|
whereObject['pageNum'] = this.pageNum; |
||||||
|
whereObject['pageSize'] = this.pageSize; |
||||||
|
this.recharge.getOrderCountList(whereObject, data => { |
||||||
|
console.log(data); |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.requestData = data['return_data'].list; |
||||||
|
this.total = data['return_data'].total; |
||||||
|
} else { |
||||||
|
this.message.error(data['return_msg']); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
// 重置
|
||||||
|
public resetForm(): void { |
||||||
|
this.searchForm.reset(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<p>user-statistical works!</p> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-user-statistical', |
||||||
|
templateUrl: './user-statistical.component.html', |
||||||
|
styleUrls: ['./user-statistical.component.scss'] |
||||||
|
}) |
||||||
|
export class UserStatisticalComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue