提交代码

master
胡锐 1 year ago
parent ec4be641ed
commit e4162b166c
  1. 86
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.html
  2. 44
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.ts
  3. 64
      src/app/admin/trade-checking/trade-checking/trade-checking.component.html
  4. 34
      src/app/admin/trade-checking/trade-checking/trade-checking.component.ts
  5. 4
      src/app/app-common.module.ts
  6. 17
      src/app/pipes/trade-order/settle-type.pipe.ts
  7. 32
      src/app/services/trade-checking.service.ts
  8. 4
      src/environments/environment.ts

@ -2,7 +2,7 @@
<app-breadcrumb></app-breadcrumb> <app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 --> <!-- end 面包屑 -->
<!--条件搜索--> <!--条件搜索-->
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
<div class="inner-content"> <div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)"> <form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row> <div nz-row>
@ -10,7 +10,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label> <nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="merNo" [nzDropdownMatchSelectWidth]="false"> <nz-select nzAllowClear nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option> <nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
@ -34,6 +34,24 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">商户交易号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input type="text" nz-input formControlName="outTradeNo" />
</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">
<input type="text" nz-input formControlName="accTradeNo" />
</nz-form-control>
</nz-form-item>
</div>
</div> </div>
<div nz-row> <div nz-row>
@ -53,39 +71,57 @@
交易金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalTradeAmount}}</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.totalShdFeeAmount}}</strong></span> 元、
应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span> 应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span>
<button nz-button nzType="primary" style="float: right;" (click)="showPrint()">打印</button> <button nz-button nzType="primary" style="float: right;" (click)="download()">下载</button>
</p> </p>
</article> </article>
<!--数组表格 --> <!--数组表格 -->
<nz-table #basicTable <nz-table #basicTable
nzBordered nzBordered
nzShowSizeChanger nzShowSizeChanger
nzSize="middle" nzSize="small"
[nzData]="dataObject.settleDetailList" [nzFrontPagination]="false"
[nzTotal]="dataObject.settleDetailList.length" [nzData]="dataObject.settleDetailList.list"
[nzTotal]="dataObject.settleDetailList.total"
[nzLoading]="tableLoading" [nzLoading]="tableLoading"
[nzScroll]="{ x: '595px'}"> (nzPageIndexChange)="requestData($event, pageSize)"
(nzPageSizeChange)="requestData(pageNum, $event)"
[nzScroll]="{ x: '2150px'}"
>
<thead> <thead>
<tr> <tr>
<th nzWidth="90px">清算日期</th> <th nzWidth="35px">序号</th>
<th nzWidth="100px">商户号</th> <th nzWidth="120px">商户号</th>
<th nzWidth="130px">商户名称</th> <th nzWidth="150px">商户名称</th>
<th nzWidth="120px">交易时间</th>
<th nzWidth="80px">交易金额</th> <th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th> <th nzWidth="80px">交易手续费</th>
<th nzWidth="80px">手续费</th> <th nzWidth="80px">应结算金额</th>
<th nzWidth="80px">交易笔数</th> <th nzWidth="80px">交易类型</th>
<th nzWidth="80px">支付渠道</th>
<th nzWidth="160px">商户交易号</th>
<th nzWidth="160px">渠道交易号</th>
<th nzWidth="80px">清算日期</th>
<th nzWidth="60px">手续费率</th>
<th nzWidth="160px">原商户交易号</th>
<!-- <th nzWidth="40px" nzRight="0px">操作</th>--> <!-- <th nzWidth="40px" nzRight="0px">操作</th>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data;let i = index"> <tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.settleDay}}</td> <td>{{i + 1}}</td>
<td>{{data.merNo}}</td> <td>{{data.merNo}}</td>
<td>{{data.merName}}</td> <td>{{data.merName}}</td>
<td>{{data.tradeAmount}}</td> <td>{{data.tradeTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.settleAmount}}</td> <td>{{data.tradeType == 2?'-'+data.tradeAmount : data.tradeAmount}}</td>
<td>{{data.shdFeeAmount}}</td> <td>{{data.tradeType == 2?'-'+data.shdFeeAmt : data.shdFeeAmt}}</td>
<td>{{data.tradeNum}}</td> <td>{{data.tradeType == 2?'-'+data.settleAmount : data.settleAmount}}</td>
<td>{{data.tradeType | settleType }}</td>
<td>{{data.payMode | payMode}}</td>
<td>{{data.outTradeNo}}</td>
<td>{{data.accTradeNo}}</td>
<td>{{data.settleDate | date:'yyyy-MM-dd'}}</td>
<td>{{data.feeRate + '%'}}</td>
<td>{{data.orgOutTradeNo}}</td>
<!-- <td nzRight="0px" class="table-td-operation"> <!-- <td nzRight="0px" class="table-td-operation">
<a (click)="showDetailModal(data.settleDay)">明细</a> <a (click)="showDetailModal(data.settleDay)">明细</a>
</td>--> </td>-->
@ -93,7 +129,7 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-spin>
<nz-modal [nzVisible]="dataDetailModal" nzWidth="1000px" nzTitle="明细" [nzFooter]="null" (nzOnCancel)="closeDetailModal()"> <nz-modal [nzVisible]="dataDetailModal" nzWidth="1000px" nzTitle="明细" [nzFooter]="null" (nzOnCancel)="closeDetailModal()">
<nz-table #detailTable nzSize="middle" [nzData]="dataObject.settleDetailList"> <nz-table #detailTable nzSize="middle" [nzData]="dataObject.settleDetailList">
<thead> <thead>
@ -121,7 +157,7 @@
<!--startprint--> <!--startprint-->
<div id="print-content" style="display: none"> <!--<div id="print-content" style="display: none">
<nz-layout> <nz-layout>
<nz-content> <nz-content>
<div class="inner-content"> <div class="inner-content">
@ -139,7 +175,7 @@
应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span> 应结算金额 <span nz-typography nzType="warning"><strong>{{dataObject.totalSettleAmount}}</strong></span>
</p> </p>
</article> </article>
<!--数组表格 --> &lt;!&ndash;数组表格 &ndash;&gt;
<nz-table #basicTable <nz-table #basicTable
nzBordered nzBordered
nzSize="middle" nzSize="middle"
@ -156,7 +192,7 @@
<th nzWidth="80px">清算金额</th> <th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th> <th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th> <th nzWidth="80px">交易笔数</th>
<!-- <th nzWidth="40px" nzRight="0px">操作</th>--> &lt;!&ndash; <th nzWidth="40px" nzRight="0px">操作</th>&ndash;&gt;
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -168,9 +204,9 @@
<td>{{data.settleAmount}}</td> <td>{{data.settleAmount}}</td>
<td>{{data.shdFeeAmount}}</td> <td>{{data.shdFeeAmount}}</td>
<td>{{data.tradeNum}}</td> <td>{{data.tradeNum}}</td>
<!--<td nzRight="0px" class="table-td-operation"> &lt;!&ndash;<td nzRight="0px" class="table-td-operation">
<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">明细</a> <a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">明细</a>
</td>--> </td>&ndash;&gt;
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
@ -178,6 +214,6 @@
<img style="z-index: 0;margin: -150px 0px 0px 75%; position: absolute;width: 175px;height: 150px;" src="https://pay.dctpay.com/filesystem/b6b7e8860b6135101334aa840eb7e17d.png"> <img style="z-index: 0;margin: -150px 0px 0px 75%; position: absolute;width: 175px;height: 150px;" src="https://pay.dctpay.com/filesystem/b6b7e8860b6135101334aa840eb7e17d.png">
</nz-content> </nz-content>
</nz-layout> </nz-layout>
</div> </div>-->
<!--endprint--> <!--endprint-->

@ -5,6 +5,7 @@ import {PlatformService} from '../../../services/platform.service';
import {MerService} from '../../../services/mer.service'; import {MerService} from '../../../services/mer.service';
import {TradeCheckingService} from '../../../services/trade-checking.service'; import {TradeCheckingService} from '../../../services/trade-checking.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import {environment} from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-trade-checking-detail', selector: 'app-trade-checking-detail',
@ -14,20 +15,25 @@ import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
export class TradeCheckingDetailComponent implements OnInit { export class TradeCheckingDetailComponent implements OnInit {
tableLoading = true; tableLoading = true;
searchForm: FormGroup; searchForm: FormGroup;
pageNum: number; pageNum = 1;
pageSize = 10;
whereObject: any = {}; whereObject: any = {};
merArray = []; merArray = [];
loadingObject = {
spinning: false,
msg: '处理中'
};
dataObject = { dataObject = {
totalTradeNum: 0, totalTradeNum: 0,
totalTradeAmount: 0, totalTradeAmount: 0,
totalSettleAmount: 0, totalSettleAmount: 0,
totalShdFeeAmount: 0, totalShdFeeAmount: 0,
settleDetailList: [] settleDetailList: {
total: 0,
list: []
}
}; };
dataDetailModal = false; dataDetailModal = false;
dataDetailObject = false;
currentDate = new Date(); currentDate = new Date();
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
@ -41,6 +47,8 @@ export class TradeCheckingDetailComponent implements OnInit {
this.currentDate.setDate(this.currentDate.getDate() - 1); this.currentDate.setDate(this.currentDate.getDate() - 1);
this.searchForm = this.form.group({ this.searchForm = this.form.group({
merNo: [null], merNo: [null],
outTradeNo: [null],
accTradeNo: [null],
settleTimeS: [ this.currentDate.getTime() ], settleTimeS: [ this.currentDate.getTime() ],
settleTimeE: [ this.currentDate.getTime() ], settleTimeE: [ this.currentDate.getTime() ],
}); });
@ -49,7 +57,7 @@ export class TradeCheckingDetailComponent implements OnInit {
this.merArray = data['return_data']['list']; this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) { if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']); this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData(); this.requestData(this.pageNum, this.pageSize);
} }
}); });
} }
@ -57,8 +65,12 @@ export class TradeCheckingDetailComponent implements OnInit {
/** /**
* *
*/ */
requestData() { requestData(pageNum: number, pageSize: number) {
this.tableLoading = true; this.tableLoading = true;
this.pageNum = pageNum;
this.pageSize = pageSize;
this.searchForm.value['pageNum'] = pageNum;
this.searchForm.value['pageSize'] = pageSize;
this.tradeCheckingService.queryCheckingDetail(this.searchForm.value, data => { this.tradeCheckingService.queryCheckingDetail(this.searchForm.value, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.dataObject = data['return_data']; this.dataObject = data['return_data'];
@ -80,7 +92,7 @@ export class TradeCheckingDetailComponent implements OnInit {
whereObject['settleTimeS'] = new Date(whereObject['settleTimeS']).getTime(); whereObject['settleTimeS'] = new Date(whereObject['settleTimeS']).getTime();
whereObject['settleTimeE'] = new Date(whereObject['settleTimeE']).getTime(); whereObject['settleTimeE'] = new Date(whereObject['settleTimeE']).getTime();
this.whereObject = whereObject; this.whereObject = whereObject;
this.requestData(); this.requestData(1, 10);
} }
/** /**
@ -93,6 +105,22 @@ export class TradeCheckingDetailComponent implements OnInit {
this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime()); this.searchForm.controls['settleTimeE'].setValue(this.currentDate.getTime());
} }
download() {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.tradeCheckingService.exportCheckingDetail(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
window.location.href = environment.imageUrl + data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.loadingObject.spinning = false;
});
}
showDetailModal(settleDay: string) { showDetailModal(settleDay: string) {
this.dataDetailModal = true; this.dataDetailModal = true;
} }

@ -2,7 +2,7 @@
<app-breadcrumb></app-breadcrumb> <app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 --> <!-- end 面包屑 -->
<!--条件搜索--> <!--条件搜索-->
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
<div class="inner-content"> <div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)"> <form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row> <div nz-row>
@ -10,7 +10,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label> <nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="merNo" [nzDropdownMatchSelectWidth]="false"> <nz-select nzAllowClear nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option> <nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
@ -48,8 +48,13 @@
<div class="inner-content"> <div class="inner-content">
<article nz-typography> <article nz-typography>
<p> <p>
<span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span> <span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}},</strong></span>
<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;left: 5px;" (click)="download()">下载</button>
<button nz-button nzType="primary" style="float: right;" (click)="showPrint()">打印</button> <button nz-button nzType="primary" style="float: right;" (click)="showPrint()">打印</button>
</p> </p>
</article> </article>
@ -57,35 +62,36 @@
<nz-table #basicTable <nz-table #basicTable
nzBordered nzBordered
nzShowSizeChanger nzShowSizeChanger
nzSize="middle" nzSize="small"
[nzData]="dataObjectArray" [nzData]="dataObject.settleList"
[nzTotal]="dataObjectArray.length" [nzTotal]="dataObject.settleList.length"
[nzLoading]="tableLoading" [nzLoading]="tableLoading"
[nzShowPagination]="false"
[nzScroll]="{ x: '595px'}"> [nzScroll]="{ x: '595px'}">
<thead> <thead>
<tr> <tr>
<th nzWidth="90px">清算日期</th>
<th nzWidth="100px">商户号</th> <th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th> <th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易笔数</th>
<th nzWidth="80px">交易金额</th> <th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th> <th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th> <th nzWidth="80px">应结算金额</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data;let i = index"> <tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.settleDay}}</td>
<td>{{data.merNo}}</td> <td>{{data.merNo}}</td>
<td>{{data.merName}}</td> <td>{{data.merName}}</td>
<td>{{data.totalTradeAmount}}</td> <td>{{data.tradeNum}}</td>
<td>{{data.totalSettleAmount}}</td> <td>{{data.tradeAmount}}</td>
<td>{{data.totalShdFeeAmount}}</td> <td>{{data.shdFeeAmount}}</td>
<td>{{data.totalTradeNum}}</td> <td>{{data.settleAmount}}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-spin>
<!--startprint--> <!--startprint-->
@ -97,35 +103,44 @@
<p> <p>
<span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span> <span nz-typography><strong>清算日期: {{this.searchForm.value.settleTimeS | date: 'yyyy-MM-dd'}} 至 {{this.searchForm.value.settleTimeE | date: 'yyyy-MM-dd'}}</strong></span>
</p> </p>
<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> </article>
<!--数组表格 --> <!--数组表格 -->
<nz-table #basicTable2 <nz-table #basicTable2
nzBordered nzBordered
nzShowSizeChanger nzShowSizeChanger
nzSize="middle" nzSize="middle"
[nzData]="dataObjectArray" [nzData]="dataObject.settleList"
[nzTotal]="dataObjectArray.length" [nzTotal]="dataObject.settleList.length"
[nzLoading]="tableLoading" [nzLoading]="tableLoading"
[nzShowPagination]="false" [nzShowPagination]="false"
[nzScroll]="{ x: '550px'}"> [nzScroll]="{ x: '550px'}">
<thead> <thead>
<tr> <tr>
<th nzWidth="90px">清算日期</th>
<th nzWidth="100px">商户号</th> <th nzWidth="100px">商户号</th>
<th nzWidth="130px">商户名称</th> <th nzWidth="130px">商户名称</th>
<th nzWidth="80px">交易笔数</th>
<th nzWidth="80px">交易金额</th> <th nzWidth="80px">交易金额</th>
<th nzWidth="80px">清算金额</th>
<th nzWidth="80px">手续费</th> <th nzWidth="80px">手续费</th>
<th nzWidth="80px">交易笔数</th> <th nzWidth="80px">应结算金额</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable2.data;let i = index"> <tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.settleDay}}</td>
<td>{{data.merNo}}</td> <td>{{data.merNo}}</td>
<td>{{data.merName}}</td> <td>{{data.merName}}</td>
<td>{{data.totalTradeAmount}}</td> <td>{{data.tradeNum}}</td>
<td>{{data.totalSettleAmount}}</td> <td>{{data.tradeAmount}}</td>
<td>{{data.totalShdFeeAmount}}</td> <td>{{data.shdFeeAmount}}</td>
<td>{{data.totalTradeNum}}</td> <td>{{data.settleAmount}}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
@ -134,4 +149,5 @@
</nz-content> </nz-content>
</nz-layout> </nz-layout>
</div> </div>
<!--endprint--> <!--endprint-->

@ -5,6 +5,7 @@ import {PlatformService} from '../../../services/platform.service';
import {TradeCheckingService} from '../../../services/trade-checking.service'; import {TradeCheckingService} from '../../../services/trade-checking.service';
import {MerService} from '../../../services/mer.service'; import {MerService} from '../../../services/mer.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import {environment} from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-trade-checking', selector: 'app-trade-checking',
templateUrl: './trade-checking.component.html', templateUrl: './trade-checking.component.html',
@ -15,11 +16,18 @@ export class TradeCheckingComponent implements OnInit {
searchForm: FormGroup; searchForm: FormGroup;
pageNum: number; pageNum: number;
whereObject: any = {}; whereObject: any = {};
loadingObject = {
spinning: false,
msg: '处理中'
};
merArray = []; merArray = [];
dataObject = {
dataObjectArray = []; totalTradeNum: 0,
dataObject = {}; totalTradeAmount: 0,
totalSettleAmount: 0,
totalShdFeeAmount: 0,
settleList: []
};
currentDate = new Date(); currentDate = new Date();
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
@ -53,7 +61,7 @@ export class TradeCheckingComponent implements OnInit {
this.tableLoading = true; this.tableLoading = true;
this.tradeCheckingService.queryChecking(this.searchForm.value, data => { this.tradeCheckingService.queryChecking(this.searchForm.value, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.dataObjectArray = Array(data['return_data']); this.dataObject = data['return_data'];
} else { } else {
this.modal.error({ this.modal.error({
nzTitle: '提示', nzTitle: '提示',
@ -112,6 +120,22 @@ export class TradeCheckingComponent implements OnInit {
} }
} }
download() {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.tradeCheckingService.exportChecking(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
window.location.href = environment.imageUrl + data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.loadingObject.spinning = false;
});
}
showPrint() { showPrint() {
console.log(document.getElementById('print-content').innerHTML); console.log(document.getElementById('print-content').innerHTML);
const oblHtml = window.document.body.innerHTML; const oblHtml = window.document.body.innerHTML;

@ -26,6 +26,7 @@ import {
} from './pipes'; } from './pipes';
import {DeviceOrderStatusPipe} from './pipes/device/device-order-status.pipe'; import {DeviceOrderStatusPipe} from './pipes/device/device-order-status.pipe';
import {DeviceOrderPayTypePipe} from './pipes/device/device-order-pay-type.pipe'; import {DeviceOrderPayTypePipe} from './pipes/device/device-order-pay-type.pipe';
import {SettleTypePipe} from './pipes/trade-order/settle-type.pipe';
const PIPES = [ const PIPES = [
TimesPipe, TimesPipe,
@ -47,7 +48,8 @@ const PIPES = [
DeviceOrderStatusPipe, DeviceOrderStatusPipe,
DeviceOrderPayTypePipe, DeviceOrderPayTypePipe,
PlatformTypePipe, PlatformTypePipe,
CreateTypePipe CreateTypePipe,
SettleTypePipe
]; ];
@NgModule({ @NgModule({

@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'settleType'
})
export class SettleTypePipe implements PipeTransform {
transform(code: number): string {
switch (code) {
case 1:
return '交易支付';
case 2:
return '交易退款';
}
}
}

@ -13,15 +13,47 @@ export class TradeCheckingService {
private commonsService: CommonsService private commonsService: CommonsService
) { } ) { }
/**
*
* @param paramObject
* @param callBack
*/
queryChecking(paramObject: object, callBack) { queryChecking(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/queryChecking?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => { this.http.get(environment.baseUrl + 'tradeOrder/queryChecking?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
/**
*
* @param paramObject
* @param callBack
*/
queryCheckingDetail(paramObject: object, callBack) { queryCheckingDetail(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/queryCheckingDetail?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => { this.http.get(environment.baseUrl + 'tradeOrder/queryCheckingDetail?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
/**
*
* @param paramObject
* @param callBack
*/
exportChecking(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/exportChecking?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param paramObject
* @param callBack
*/
exportCheckingDetail(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'tradeOrder/exportCheckingDetail?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data);
});
}
} }

@ -5,10 +5,10 @@
export const environment = { export const environment = {
production: false, production: false,
// baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://gratia-pay.dctpay.com/filesystem/', imageUrl: 'https://gratia-pay.dctpay.com/filesystem/',
obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com', obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
// baseUrl: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'http://localhost:9602/filesystem/', // imageUrl: 'http://localhost:9602/filesystem/',
// obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com', // obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
}; };

Loading…
Cancel
Save