master
胡锐 1 year ago
parent 5137406d0f
commit 09fa8f3e73
  1. 179
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.html
  2. 0
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.scss
  3. 25
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.spec.ts
  4. 161
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.ts
  5. 16
      src/app/admin/trade-checking/trade-checking-routing.module.ts
  6. 25
      src/app/admin/trade-checking/trade-checking.module.ts
  7. 132
      src/app/admin/trade-checking/trade-checking/trade-checking.component.html
  8. 0
      src/app/admin/trade-checking/trade-checking/trade-checking.component.scss
  9. 25
      src/app/admin/trade-checking/trade-checking/trade-checking.component.spec.ts
  10. 121
      src/app/admin/trade-checking/trade-checking/trade-checking.component.ts
  11. 23
      src/app/admin/trade-order/trade-order-detail/trade-order-detail.component.html
  12. 56
      src/app/admin/trade-order/trade-order-list/trade-order-list.component.html
  13. 4
      src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts
  14. 5
      src/app/app-common.module.ts
  15. 5
      src/app/app-routing.module.ts
  16. 1
      src/app/pipes/index.ts
  17. 21
      src/app/pipes/trade-order/create-type.pipe.ts
  18. 27
      src/app/services/trade-checking.service.ts
  19. 5
      src/styles.scss

@ -0,0 +1,179 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">清算起始日期</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-date-picker style="width: 100%;" (ngModelChange)="searchSettleTime(1, $event)" [nzDisabledDate]="disabledDate" [nzShowToday]="false" [nzAllowClear]="false" [nzFormat]="'yyyy-MM-dd'" formControlName="settleTimeS"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">清算终止日期</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-date-picker style="width: 100%;" (ngModelChange)="searchSettleTime(2, $event)"[nzDisabledDate]="disabledDate" [nzShowToday]="false" [nzAllowClear]="false" [nzFormat]="'yyyy-MM-dd'" formControlName="settleTimeE"></nz-date-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">
<article nz-typography>
<p>
<span nz-typography nzType="warning"><strong>汇总:</strong></span>
笔数 <span nz-typography nzType="warning"><strong>{{dataObject.totalTradeNum}}</strong></span>
交易金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalTradeAmount}}</strong></span> 元、
手续费 <span nz-typography nzType="warning"><strong>{{dataObject.totalShdFeeAmount}}</strong></span> 元、
应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span>
<button nz-button nzType="primary" style="float: right;" (click)="showPrint()">打印</button>
</p>
</article>
<!--数组表格 -->
<nz-table #basicTable
nzBordered
nzShowSizeChanger
nzSize="middle"
[nzData]="dataObject.settleDetailList"
[nzTotal]="dataObject.settleDetailList.length"
[nzLoading]="tableLoading"
[nzScroll]="{ x: '595px'}">
<thead>
<tr>
<th nzWidth="90px">清算日期</th>
<th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th>
<!-- <th nzWidth="40px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.settleDay}}</td>
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.tradeAmount}}</td>
<td>{{data.settleAmount}}</td>
<td>{{data.shdFeeAmount}}</td>
<td>{{data.tradeNum}}</td>
<!-- <td nzRight="0px" class="table-td-operation">
<a (click)="showDetailModal(data.settleDay)">明细</a>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
<nz-modal [nzVisible]="dataDetailModal" nzWidth="1000px" nzTitle="明细" [nzFooter]="null" (nzOnCancel)="closeDetailModal()">
<nz-table #detailTable nzSize="middle" [nzData]="dataObject.settleDetailList">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Address</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of detailTable.data">
<td>{{data.name}}</td>
<td>{{data.age}}</td>
<td>{{data.address}}</td>
<td>
<a>Action 一 {{data.name}}</a>
<nz-divider nzType="vertical"></nz-divider>
<a>Delete</a>
</td>
</tr>
</tbody>
</nz-table>
</nz-modal>
<!--startprint-->
<div id="print-content" style="display: none">
<div class="inner-content">
<article nz-typography>
<p>
<span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span>
</p>
</article>
<article nz-typography>
<p>
<span nz-typography nzType="warning"><strong>汇总:</strong></span>
笔数 <span nz-typography nzType="warning"><strong>{{dataObject.totalTradeNum}}</strong></span>
交易金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalTradeAmount}}</strong></span> 元、
手续费 <span nz-typography nzType="warning"><strong>{{dataObject.totalShdFeeAmount}}</strong></span> 元、
应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span>
</p>
</article>
<!--数组表格 -->
<nz-table #basicTable
nzBordered
nzSize="middle"
[nzData]="dataObject.settleDetailList"
[nzTotal]="dataObject.settleDetailList.length"
[nzLoading]="tableLoading"
[nzScroll]="{ x: '595px'}">
<thead>
<tr>
<th nzWidth="90px">清算日期</th>
<th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th>
<!-- <th nzWidth="40px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.settleDay}}</td>
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.tradeAmount}}</td>
<td>{{data.settleAmount}}</td>
<td>{{data.shdFeeAmount}}</td>
<td>{{data.tradeNum}}</td>
<!--<td nzRight="0px" class="table-td-operation">
<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">明细</a>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
<img style="z-index: 0;margin: -70px 0px 0px 500px; position: absolute;" src="https://pay.dctpay.com/filesystem/b6b7e8860b6135101334aa840eb7e17d.png">
</div>
<!--endprint-->

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TradeCheckingDetailComponent } from './trade-checking-detail.component';
describe('TradeCheckingDetailComponent', () => {
let component: TradeCheckingDetailComponent;
let fixture: ComponentFixture<TradeCheckingDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TradeCheckingDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TradeCheckingDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,161 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {PlatformService} from '../../../services/platform.service';
import {MerService} from '../../../services/mer.service';
import {TradeCheckingService} from '../../../services/trade-checking.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
@Component({
selector: 'app-trade-checking-detail',
templateUrl: './trade-checking-detail.component.html',
styleUrls: ['./trade-checking-detail.component.scss']
})
export class TradeCheckingDetailComponent implements OnInit {
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
merArray = [];
dataObject = {
totalTradeNum: 0,
totalTradeAmount: 0,
totalSettleAmount: 0,
totalShdFeeAmount: 0,
settleDetailList: []
};
dataDetailModal = false;
dataDetailObject = false;
currentDate = new Date();
constructor(private modal: NzModalService,
private message: NzMessageService,
private form: FormBuilder,
private platformService: PlatformService,
private merService: MerService,
private tradeCheckingService: TradeCheckingService) {
}
ngOnInit(): void {
this.currentDate.setDate(this.currentDate.getDate() - 1);
this.searchForm = this.form.group({
merNo: [null],
settleTimeS: [ this.currentDate.getTime() ],
settleTimeE: [ this.currentDate.getTime() ],
});
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData();
}
});
}
/**
*
*/
requestData() {
this.tableLoading = true;
this.tradeCheckingService.queryCheckingDetail(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
this.dataObject = data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.tableLoading = false;
});
}
/**
*
* @param whereObject
*/
search(whereObject: object) {
whereObject['settleTimeS'] = new Date(whereObject['settleTimeS']).getTime();
whereObject['settleTimeE'] = new Date(whereObject['settleTimeE']).getTime();
this.whereObject = whereObject;
this.requestData();
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
this.searchForm.controls['merNo'].setValue(this.merArray.length > 0 ? this.merArray[0]['merNo'] : null);
this.searchForm.controls['settleTimeS'].setValue(this.currentDate.getTime());
this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime());
}
showDetailModal(settleDay: string) {
this.dataDetailModal = true;
}
closeDetailModal() {
this.dataDetailModal = false;
}
disabledDate = (current: Date): boolean => {
// Can not select days before today and today
return differenceInCalendarDays(current, new Date()) > 0;
};
searchSettleTime(dateType: number, selectDate: Date) {
if (new Date().getDate() === selectDate.getDate()) {
this.modal.error({
nzTitle: '提示',
nzContent: '无法选择当日,当日还未清算'
});
// 起始时间
if (dateType === 1) {
this.searchForm.controls['settleTimeS'].setValue(this.currentDate.getTime());
// 终止时间
} else if (dateType === 2) {
this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime());
}
}
}
showPrint() {
console.log(document.getElementById('print-content').innerHTML);
const oblHtml = window.document.body.innerHTML;
const bdhtml = document.getElementById('print-content').innerHTML;
window.document.body.innerHTML = bdhtml;
window.print();
document.body.innerHTML = oblHtml;
window.location.reload();
}
// 此处为图文打印
printQrCode(idstr) {
/* const imgUrlStr = 'https://weiliicimg9.pstatp.com/weili/l/905526294583705654.jpg';
let iframe = document.createElement('IFRAME'),
doc = null,
img = new Image();
img.src = imgUrlStr;
iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
document.body.appendChild(iframe);
doc = iframe.contentWindow.document;
doc.write('<h2>Print Pictures and Words</h2>');
doc.body.append(img);
console.log(doc.body.innerHTML);
doc.close();
const newWindow = window.open('', '');
newWindow.document.write(doc.body.innerHTML);
newWindow.print();
newWindow.close();*/
/* iframe.onload = function() { //
iframe.contentWindow.focus();
iframe.contentWindow.print();
document.body.removeChild(iframe);
};*/
}
}

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {TradeCheckingComponent} from './trade-checking/trade-checking.component';
import {TradeCheckingDetailComponent} from './trade-checking-detail/trade-checking-detail.component';
const routes: Routes = [
{ path: 'tradeChecking', component: TradeCheckingComponent },
{ path: 'tradeCheckingDetail', component: TradeCheckingDetailComponent },
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class TradeCheckingRoutingModule { }

@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TradeCheckingRoutingModule } from './trade-checking-routing.module';
import { TradeCheckingComponent } from './trade-checking/trade-checking.component';
import { TradeCheckingDetailComponent } from './trade-checking-detail/trade-checking-detail.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {AppCommonModule} from '../../app-common.module';
@NgModule({
declarations: [TradeCheckingComponent, TradeCheckingDetailComponent],
imports: [
CommonModule,
TradeCheckingRoutingModule,
NgZorroAntdModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
AppCommonModule,
]
})
export class TradeCheckingModule { }

@ -0,0 +1,132 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">清算起始日期</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-date-picker style="width: 100%;" (ngModelChange)="searchSettleTime(1, $event)" [nzDisabledDate]="disabledDate" [nzShowToday]="false" [nzAllowClear]="false" [nzFormat]="'yyyy-MM-dd'" formControlName="settleTimeS"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">清算终止日期</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-date-picker style="width: 100%;" (ngModelChange)="searchSettleTime(2, $event)"[nzDisabledDate]="disabledDate" [nzShowToday]="false" [nzAllowClear]="false" [nzFormat]="'yyyy-MM-dd'" formControlName="settleTimeE"></nz-date-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">
<article nz-typography>
<p>
<span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span>
<button nz-button nzType="primary" style="float: right;" (click)="showPrint()">打印</button>
</p>
</article>
<!--数组表格 -->
<nz-table #basicTable
nzBordered
nzShowSizeChanger
nzSize="middle"
[nzData]="dataObjectArray"
[nzTotal]="dataObjectArray.length"
[nzLoading]="tableLoading"
[nzShowPagination]="false"
[nzScroll]="{ x: '595px'}">
<thead>
<tr>
<th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.totalTradeAmount}}</td>
<td>{{data.totalSettleAmount}}</td>
<td>{{data.totalShdFeeAmount}}</td>
<td>{{data.totalTradeNum}}</td>
</tr>
</tbody>
</nz-table>
</div>
<!--startprint-->
<div id="print-content" style="display: none">
<div class="inner-content">
<article nz-typography>
<p>
<span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span>
</p>
</article>
<!--数组表格 -->
<nz-table #basicTable2
nzBordered
nzShowSizeChanger
nzSize="middle"
[nzData]="dataObjectArray"
[nzTotal]="dataObjectArray.length"
[nzLoading]="tableLoading"
[nzShowPagination]="false"
[nzScroll]="{ x: '550px'}">
<thead>
<tr>
<th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable2.data;let i = index">
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.totalTradeAmount}}</td>
<td>{{data.totalSettleAmount}}</td>
<td>{{data.totalShdFeeAmount}}</td>
<td>{{data.totalTradeNum}}</td>
</tr>
</tbody>
</nz-table>
</div>
<img style="z-index: 0;margin: -100px 0px 0px 500px; position: absolute;" src="https://pay.dctpay.com/filesystem/b6b7e8860b6135101334aa840eb7e17d.png">
</div>
<!--endprint-->

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TradeCheckingComponent } from './trade-checking.component';
describe('TradeCheckingComponent', () => {
let component: TradeCheckingComponent;
let fixture: ComponentFixture<TradeCheckingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TradeCheckingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TradeCheckingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,121 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {PlatformService} from '../../../services/platform.service';
import {TradeCheckingService} from '../../../services/trade-checking.service';
import {MerService} from '../../../services/mer.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
@Component({
selector: 'app-trade-checking',
templateUrl: './trade-checking.component.html',
styleUrls: ['./trade-checking.component.scss']
})
export class TradeCheckingComponent implements OnInit {
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
merArray = [];
dataObjectArray = [];
dataObject = {};
currentDate = new Date();
constructor(private modal: NzModalService,
private message: NzMessageService,
private form: FormBuilder,
private platformService: PlatformService,
private merService: MerService,
private tradeCheckingService: TradeCheckingService) {
}
ngOnInit(): void {
this.currentDate.setDate(this.currentDate.getDate() - 1);
this.searchForm = this.form.group({
merNo: [null],
settleTimeS: [ this.currentDate.getTime() ],
settleTimeE: [ this.currentDate.getTime() ],
});
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData();
}
});
}
/**
*
*/
requestData() {
this.tableLoading = true;
this.tradeCheckingService.queryChecking(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
this.dataObjectArray = Array(data['return_data']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.tableLoading = false;
});
}
/**
*
* @param whereObject
*/
search(whereObject: object) {
whereObject['settleTimeS'] = new Date(whereObject['settleTimeS']).getTime();
whereObject['settleTimeE'] = new Date(whereObject['settleTimeE']).getTime();
this.whereObject = whereObject;
this.requestData();
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
this.searchForm.controls['merNo'].setValue(this.merArray.length > 0 ? this.merArray[0]['merNo'] : null);
this.searchForm.controls['settleTimeS'].setValue(this.currentDate.getTime());
this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime());
}
disabledDate = (current: Date): boolean => {
// Can not select days before today and today
return differenceInCalendarDays(current, new Date()) > 0;
};
searchSettleTime(dateType: number, selectDate: Date) {
if (new Date().getDate() === selectDate.getDate()) {
this.modal.error({
nzTitle: '提示',
nzContent: '无法选择当日,当日还未清算'
});
// 起始时间
if (dateType === 1) {
this.searchForm.controls['settleTimeS'].setValue(this.currentDate.getTime());
// 终止时间
} else if (dateType === 2) {
this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime());
}
}
}
showPrint() {
console.log(document.getElementById('print-content').innerHTML);
const oblHtml = window.document.body.innerHTML;
const bdhtml = document.getElementById('print-content').innerHTML;
window.document.body.innerHTML = bdhtml;
window.print();
document.body.innerHTML = oblHtml;
window.location.reload();
}
}

@ -11,21 +11,22 @@
<nz-tabset>
<nz-tab nzTitle="交易详情">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="商户号">{{dataObject.order['merNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户名称">{{dataObject.order['merName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户简称">{{dataObject.order['merAbbreviate']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="门店名称">{{dataObject.order['storeName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="设备编号SN">{{dataObject.order['deviceSn']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付模式">{{dataObject.order['payMode'] | payMode}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="平台类型">{{dataObject.order['platformType'] | platformType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户交易单号">{{dataObject.order['outTradeNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="账户端交易单号">{{dataObject.order['accTradeNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易金额">{{dataObject.order['tradeAmount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户优惠金额">{{dataObject.order['accMdiscountAmount'] ? dataObject.order['accMdiscountAmount'] : 0}} </nz-descriptions-item>
<nz-descriptions-item nzTitle="用户优惠金额">{{dataObject.order['accDiscountAmount'] ? dataObject.order['accDiscountAmount'] : 0}} </nz-descriptions-item>
<nz-descriptions-item nzTitle="实际交易金额">{{dataObject.order['tradeActualAmount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易方式">{{dataObject.order['payMode'] | payMode}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{dataObject.order['status'] | tradeOrderStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户订单号">{{dataObject.order['outTradeNo']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="dataObject.order['accTradeNo'] != null" nzTitle="用户订单号">{{dataObject.order['accTradeNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易金额">{{dataObject.order['tradeAmount']}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="实际交易金额">{{dataObject.order['tradeActualAmount']}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="商户优惠金额">{{dataObject.order['accMdiscountAmount'] ? dataObject.order['accMdiscountAmount'] : 0}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="用户优惠金额">{{dataObject.order['accDiscountAmount'] ? dataObject.order['accDiscountAmount'] : 0}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="银行卡类型">{{dataObject.order['cardType'] | cardType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="入账账户">{{dataObject.order['platformMerNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建方式">{{dataObject.order['createType'] | createType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{dataObject.order['createTime'] | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付时间">{{dataObject.order['payTime'] | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="取消时间">{{dataObject.order['cancelTime'] | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="退款详情" *ngIf="dataObject.orderRefund != null">

@ -8,28 +8,20 @@
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="merName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户订单号</nz-form-label>
<nz-form-label [nzSpan]="8">商户交易单号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="outTradeNo" />
</nz-form-control>
</nz-form-item>
</div>
<!--<div nz-col nzSpan="8">
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">用户订单号</nz-form-label>
<nz-form-label [nzSpan]="8">账户端交易单号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="accTradeNo" />
</nz-form-control>
</nz-form-item>
</div>-->
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付模式</nz-form-label>
@ -72,6 +64,30 @@
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="userObjectType !== 5">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="merNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="userObjectType !== 5">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="merName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="userObjectType !== 5">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户简称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="merAbbreviate" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="userObjectType !== 5">
<nz-form-item>
<nz-form-label [nzSpan]="8">门店名称</nz-form-label>
@ -107,38 +123,46 @@
[nzScroll]="{ x: '1150px'}">
<thead>
<tr>
<th nzWidth="100px"></th>
<th nzWidth="180px">商户</th>
<th nzWidth="150px">商户名称</th>
<th nzWidth="150px">商户简称</th>
<th nzWidth="150px">门店名称</th>
<th nzWidth="270px">商户订单号</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="270px">商户交易单号</th>
<th nzWidth="270px">账户端交易单号</th>
<th nzWidth="100px">交易方式</th>
<th nzWidth="100px">交易金额</th>
<th nzWidth="100px">门店优惠</th>
<th nzWidth="130px">优惠券优惠</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="100px">状态</th>
<th nzWidth="90px">创建方式</th>
<th nzWidth="160px">创建时间</th>
<th nzWidth="160px">支付时间</th>
<th nzWidth="160px">入账商户号</th>
<th nzWidth="100px">特殊字符</th>
<th nzWidth="100px">业务员</th>
<th nzWidth="150px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i + 1}}</td>
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.merAbbreviate}}</td>
<td>{{data.storeName?data.storeName:'无'}}</td>
<td>{{data.outTradeNo}}</td>
<td>{{data.accTradeNo}}</td>
<td>{{data.payMode | payMode}}</td>
<td>¥{{data.tradeAmount}}</td>
<td>¥{{data.storeDiscountActualPrice?data.storeDiscountActualPrice:0}}</td>
<td>¥{{data.userDiscountActualPrice?data.userDiscountActualPrice:0}}</td>
<td>¥{{data.tradeActualAmount?data.tradeActualAmount:0}}</td>
<td>{{data.status | tradeOrderStatus}}</td>
<td>{{data.createType | createType}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.platformMerNo}}</td>
<td>{{data.specialField}}</td>
<td>{{data.salesmanName}}</td>
<td nzRight="0px" class="table-td-operation">
<a [routerLink]="['/admin/trade-order/trade-order-detail']" [queryParams]="{outTradeNo: data.outTradeNo}">详情</a>

@ -47,11 +47,13 @@ export class TradeOrderListComponent implements OnInit {
this.searchForm = this.form.group({
salesmanId: [null],
merNo: [null],
merId: [null],
merName: [null],
merAbbreviate: [null],
storeName: [null],
outTradeNo: [null],
// accTradeNo: [null],
accTradeNo: [null],
payMode: [null],
payTime: [null],
payTimeS: [null],

@ -22,7 +22,7 @@ import {
CardTypePipe,
MerStatusPipe,
CompleteStatusPipe,
MerTypePipe, DeviceStatusPipe, PlatformTypePipe, DeviceTypePipe, DeviceOrderTypePipe,
MerTypePipe, DeviceStatusPipe, PlatformTypePipe, DeviceTypePipe, DeviceOrderTypePipe, CreateTypePipe,
} from './pipes';
import {DeviceOrderStatusPipe} from './pipes/device/device-order-status.pipe';
import {DeviceOrderPayTypePipe} from './pipes/device/device-order-pay-type.pipe';
@ -46,7 +46,8 @@ const PIPES = [
DeviceOrderTypePipe,
DeviceOrderStatusPipe,
DeviceOrderPayTypePipe,
PlatformTypePipe
PlatformTypePipe,
CreateTypePipe
];
@NgModule({

@ -53,6 +53,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/trade-order/trade-order.module').then(m => m.TradeOrderModule),
canActivate: [InitGuardService]
},
{
path: 'trade-checking',
loadChildren: () => import('./admin/trade-checking/trade-checking.module').then(m => m.TradeCheckingModule),
canActivate: [InitGuardService]
},
{
path: 'store-device',
loadChildren: () => import('./admin/store-device/store-device.module').then(m => m.StoreDeviceModule),

@ -8,6 +8,7 @@ export * from './trade-order/pay-mode.pipe';
export * from './trade-order/trade-order-status.pipe';
export * from './trade-order/trade-order-refund-status.pipe';
export * from './trade-order/card-type.pipe';
export * from './trade-order/create-type.pipe';
export * from './mer/mer-status.pipe';
export * from './mer/mer-type.pipe';
export * from './mer/complete-status.pipe';

@ -0,0 +1,21 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'createType'
})
export class CreateTypePipe implements PipeTransform {
transform(createType: number): unknown {
switch (createType) {
case 1:
return '扫一扫';
case 2:
return '被扫';
case 3:
return 'API';
default:
return '未知';
}
}
}

@ -0,0 +1,27 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class TradeCheckingService {
constructor(
private http: HttpClient,
private commonsService: CommonsService
) { }
queryChecking(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/queryChecking?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data);
});
}
queryCheckingDetail(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/queryCheckingDetail?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data);
});
}
}

@ -7,6 +7,11 @@
--main-color: #1890ff; // or any global you wish to share with components
--gray: #f0f0f0;
}
@media print {
nz-sider {
display: none;
}
}
.fl {
float: left;
}

Loading…
Cancel
Save